{
  "openapi": "3.1.0",
  "info": {
    "title": "Check Networks API",
    "x-logo": {
      "url": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSI1NzMuOSIgaGVpZ2h0PSI1NjMuOSIgdmlld0JveD0iMCAwIDU3My45IDU2My45Ij4KICA8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMjkuMy4xLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogMi4xLjAgQnVpbGQgMTUxKSAgLS0+CiAgPGRlZnM+CiAgICA8c3R5bGU+CiAgICAgIC5zdDAgewogICAgICAgIGZpbGw6ICMyNTNhNTQ7CiAgICAgIH0KCiAgICAgIC5zdDEgewogICAgICAgIGZpbGw6ICNhNWI1YzI7CiAgICAgIH0KCiAgICAgIC5zdDIgewogICAgICAgIGZpbGw6ICNkZDVmMTM7CiAgICAgIH0KCiAgICAgIC5zdDMgewogICAgICAgIGZpbGw6ICMwZjViOWE7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgPC9kZWZzPgogIDxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00MTMuNCwyNy4zYy0yLDIuOC0zLjUsNS41LTQuNCw4LjItLjEuNC0uNi43LTEuMS41LDAsMCwwLDAsMCwwLTI4LjktMTMuMi02MC43LTIyLjItOTIuNS0yNC41LTMxLTIuMy02MS43LjUtOTIuMiw4LjMtMi44LjctOC44LDIuNC0xOCw1LjItLjQuMS0uOS0uMS0xLjEtLjUtMS4yLTMuMS0yLjctNS44LTQuNi04LjEtLjItLjMtLjItLjYsMC0uOCwwLDAsLjEsMCwuMi0uMSw2LjItMS44LDEyLjktNCwxOC4yLTUuNCw1NC0xNC4zLDEwNy41LTEzLjMsMTYwLjYsMyw1LjIsMS42LDExLDMuNywxNy40LDYuMiw4LjEsMy4yLDEzLjgsNS42LDE3LjEsNy4xLjMuMS40LjUuMy44LDAsMCwwLDAsMCwuMVoiLz4KICA8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMzM4LjQsODEuMmMtMTYuOC0xMS44LTM0LjUtMjEuNy01My4yLTI5LjctMjUuNi0xMC45LTUxLjQtMTYuNS03OC44LTE4LjktMi42LS4yLTUuOC0uMy05LjMtLjMtLjMsMC0uNi0uMi0uNy0uNS0yLjEtOC41LTctMTQuMS0xNC43LTE3LTEzLjgtNS4xLTI4LjcsNC4yLTMwLjMsMTguNC0uNyw2LjIuNywxMS44LDQuMSwxNi45LjMuNC4yLjktLjEsMS4yLTEsLjktMiwxLjktMi45LDMtNS4yLDYuNS0xMS42LDE1LTE5LjIsMjUuNC0zLjYsNC45LTcuNCwxMC45LTExLjQsMTcuOC01LjUsOS42LTksMTUuNy0xMC40LDE4LjQtOS41LDE4LTE3LjMsMzYuNC0yMy43LDU1LDAsMCwwLC4yLDAsLjIsMCwuNC4zLjcuNy43LDIuOSwwLDUuNi43LDguMywyLjEsMCwwLDAsMCwwLDAsLjIsMCwuNSwwLC42LS4zLDExLjMtMzQsMjcuMy02NS41LDQ3LjktOTQuNSw1LjMtNy41LDExLjItMTQuOSwxNy40LTIyLjEuMi0uMi41LS4zLjctLjEsNC4xLDIsOC40LDIuNywxMywyLjEsMTAuNC0xLjQsMTcuMS03LDE5LjktMTYuOCwwLS4zLjQtLjUuNy0uNSwzMC4zLDEuMiw1OS40LDgsODcuMiwyMC4yLDE3LjEsNy41LDMzLDE2LjUsNDcuOSwyNywuMS4xLjQsMCwuNSwwbDUuOS03LjRzMCwwLDAsMGMwLDAsMC0uMiwwLS4zWiIvPgogIDxjaXJjbGUgY2xhc3M9InN0MyIgY3g9IjQzNi45IiBjeT0iNDUuNiIgcj0iMjEuMSIvPgogIDxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xNDMuOSw1MmMuMS4zLDAsLjYtLjIuNywwLDAsMCwwLDAsMC05LDQuOC0xOC4yLDEwLjYtMjcuNiwxNy41LS44LjYtNC42LDMuNi0xMS4zLDguOS00LjQsMy41LTguMSw2LjYtMTAuOSw5LjMtMTcsMTYuMS0zMS43LDM0LjItNDQuMSw1NC4xLS4yLjQtLjcuNS0xLjEuMiwwLDAtLjEsMC0uMi0uMi0yLjItMi42LTUuMS00LjUtOC42LTUuNi0uMywwLS40LS40LS4zLS42LDAsMCwwLDAsMC0uMSwzLjktNi41LDYuMy0xMC4zLDcuMi0xMS42LDIyLjgtMzMuNCw1MS45LTYwLjMsODcuMS04MC43LDEuNi0uOSwzLjUtMS45LDUuNy0zLC4yLS4xLjUsMCwuNi4yLDAsMCwwLDAsMCwuMS41LDMuOCwxLjgsNy4zLDMuNywxMC42WiIvPgogIDxwYXRoIGNsYXNzPSJzdDMiIGQ9Ik00MTEuOSw1Ny4yYy43LS42LDEuNy0uNCwyLjMuM2wyLjQsMy4xYzEsMS4zLDEuNSwyLjYsMS4yLDIuOSwwLDAsMCwwLDAsMGwtMzAuNywyNC4zYy0uNC4zLTEuNS0uNS0yLjUtMS44LDAsMCwwLDAsMCwwbC0yLjQtMy4xYy0uNi0uNy0uNC0xLjcuMy0yLjNsMjkuNS0yMy40WiIvPgogIDxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik01NTIsMTc1LjVjMCwuMywwLC43LS40LjcsMCwwLS4xLDAtLjIsMC0zLjYtLjItNi45LjQtMTAuMSwxLjgtLjUuMi0xLDAtMS4yLS41LDAsMCwwLDAsMCwwLTQuNS0xMi4xLTguOC0xOS41LTE2LjQtMzMuMy0xLjMtMi40LTMuMi01LjQtNS42LTktNC01LjktOC45LTEzLjUtMTMuOC0xOS4zLTMuNy00LjMtNi45LTguOC0xMS4xLTEzLjYtMTEuMS0xMi42LTIzLjMtMjMuOC0zNi40LTMzLjgtLjMtLjItLjMtLjctLjEtMSwwLDAsMCwwLDAsMCwyLjUtMi40LDQuNi01LjEsNi4zLTguMi4xLS4yLjQtLjMuNy0uMiwwLDAsMCwwLDAsMCwyMiwxNi44LDQxLDM2LjQsNTcuMyw1OC43LDMuNCw0LjcsNi4yLDguOSw4LjMsMTIuNSwzLjMsNS43LDYuOCwxMC45LDEwLjEsMTcuNCw0LjYsOSw4LjIsMTYuNywxMC45LDIyLjksMSwyLjQsMS42LDQsMS44LDQuN1oiLz4KICA8Y2lyY2xlIGNsYXNzPSJzdDIiIGN4PSIzNjAuMyIgY3k9IjEwNS45IiByPSIyNS4yIi8+CiAgPHBhdGggY2xhc3M9InN0MSIgZD0iTTExNi42LDE4OC40Yy0uNy40LTEuNi4zLTIuMS0uNGwtMy41LTQuOWMtLjUtLjYtLjMtMS41LjMtMmwxMy43LTEwLjFjMCwwLC4xLDAsLjItLjEsNS40LTIuOSw5LjctNS45LDEzLjctOC4zLDkuNi01LjcsMTguNC0xMC41LDI2LjMtMTQuNiwyLjYtMS4zLDUuNC0yLjQsNy44LTMuNiw2LjUtMy40LDEzLjItNi41LDIwLjItOS40LDI0LjktMTAuMyw0OS4yLTE4LjEsNzIuOS0yMy4yLDE2LjQtMy42LDI4LjYtNS44LDM2LjUtNi44LDEwLjItMS4yLDE3LjctMiwyMi43LTIuMy43LDAsMS40LjUsMS40LDEuMiwwLDAsMCwwLDAsMHY2LjVjMCwuNy0uNSwxLjItMS4yLDEuMiwwLDAsMCwwLS4xLDAtMS42LDAtMjIuNywyLjItMzIuMiwzLjgtMTIuNSwyLTI0LjQsNC42LTM1LjksNy44LTUuNywxLjYtMTAuNCwyLjktMTQuMSwzLjktNC42LDEuMi05LjMsMi43LTEzLjksNC4zLTI0LjksOC42LTQ2LjMsMTcuNy02NC4zLDI3LjMtMTUuMiw4LjEtMjksMTYuNC00MS42LDI0LjktNCwyLjctNi4zLDQuMy02LjksNC42WiIvPgogIDxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik01MjguMywxODIuOWMuNy42LjgsMS43LjIsMi40LDAsLjEtLjIuMi0uMy4zLTEsLjctMS44LDEuNy0yLjMsMy0uMy44LTEuMiwxLjItMiwuOC0uMSwwLS4zLS4xLS40LS4yLTMuMi0yLjctNi45LTUuOC0xMS4yLTkuNC01LjYtNC42LTkuNC03LjYtMTEuNC05LjEtOC41LTYuMi0xOC4xLTEyLjUtMjktMTktNS41LTMuMy0xMi42LTYuNy0xOS0xMC4yLTMuOC0yLjEtNi42LTMuNS04LjUtNC4yLTQuNC0xLjgtNy43LTMuNi0xMS41LTUtNC4yLTEuNS04LjktMy40LTE0LjEtNS41LTMuMi0xLjMtMjAuNi03LjgtMjUuOC04LjYtMS0uMi0xLjctMS4xLTEuNi0yLjIsMCwwLDAsMCwwLDBsLjktNS4yYy4yLTEsMS4xLTEuNywyLjEtMS41LDAsMCwuMSwwLC4yLDAsMi43LjcsNC4yLDEuMSw0LjQsMS4yLDUuNSwyLjIsMTEuOSwzLjYsMTgsNS44LDkuMiwzLjIsMTguNiw3LDI4LjIsMTEuMywyLC45LDcuNywzLjcsMTcuMSw4LjQsOC44LDQuNCwxNC4zLDguMiwyMi42LDEyLjksOC40LDQuOCwxNS40LDEwLjQsMjUuMiwxNy41LDEuOSwxLjQsNi43LDUuNCwxNC4yLDEyLjIsMS42LDEuNCwyLjcsMy4xLDQuMSw0LjRaIi8+CiAgPHBhdGggY2xhc3M9InN0MCIgZD0iTTM3OS4zLDEzMC45Yy0uMS0uMSwwLS4zLDAtLjRsNi41LTYuNGMwLDAsLjIsMCwuMywwLDAsMCwwLDAsMCwwLDIwLjksMjIsMzguNSw0Ni44LDUyLjcsNzQuMSw0LjksOS41LDguNCwxNi44LDEwLjUsMjEuOCwyLjgsNyw1LjUsMTIsOCwxOC45LDcuNiwyMC44LDEzLjQsNDAuMSwxNy41LDYxLjksNS4xLDI2LjksNi40LDU0LDMuOSw4MS4yLDAsMCwwLDAtLjEsMCwwLDAsMCwwLDAsMGwtOC45LTEuNWMtLjIsMC0uNC0uMy0uNC0uNS43LTkuNSwxLjEtMTQuOSwxLjEtMTYuNC4yLTIxLjUtMS40LTQxLjMtNC44LTU5LjMtNy42LTM5LjUtMjEuMy03Ni44LTQxLjItMTExLjktOS4zLTE2LjMtMjAuMi0zMi4yLTMyLjgtNDcuOC0zLjktNC44LTguMy05LjItMTIuNC0xNFoiLz4KICA8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjg3LjUsMjAwLjdjLTE2LjksMjMuNi0zMi40LDQ4LjMtNDYuNSw3My43LDAsLjEtLjMuMi0uNC4xbC02LjktNGMtLjItLjEtLjMtLjQtLjItLjUsMCwwLDAsMCwwLDAsMTEuNS0yMC45LDI0LjItNDEuNiwzOC4xLTYyLjEsNC44LTcuMSw3LjYtMTEuMiw4LjUtMTIuNS45LTEuMiwzLjktNS4zLDkuMS0xMi4xLDE0LjktMTkuNywzMC41LTM4LjQsNDYuNi01NiwuMS0uMi40LS4yLjYsMCwwLDAsMCwwLDAsMGw2LDUuM2MuMS4xLjEuMywwLC40LTE5LjUsMjEuNS0zOCw0NC4xLTU0LjksNjcuN1oiLz4KICA8ZWxsaXBzZSBjbGFzcz0ic3QwIiBjeD0iMjkuOSIgY3k9IjE2NC4zIiByeD0iMTkuOCIgcnk9IjIwLjEiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzQuNyAxOTMpIHJvdGF0ZSgtODkuNikiLz4KICA8cmVjdCBjbGFzcz0ic3QwIiB4PSI0Ni43IiB5PSIxNzUuNCIgd2lkdGg9IjkiIGhlaWdodD0iMTIuOCIgcng9Ii40IiByeT0iLjQiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMjEuOSAxMDYuMykgcm90YXRlKC01MC43KSIvPgogIDxlbGxpcHNlIGNsYXNzPSJzdDMiIGN4PSI4My40IiBjeT0iMjA4LjIiIHJ4PSIyOC40IiByeT0iMjguMSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEzOS42IDIzMS44KSByb3RhdGUoLTc0LjIpIi8+CiAgPGVsbGlwc2UgY2xhc3M9InN0MiIgY3g9IjU1MS4yIiBjeT0iMjA4LjIiIHJ4PSIyMi43IiByeT0iMjMuMSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTI0LjEgODAuNykgcm90YXRlKC04LjIpIi8+CiAgPHBhdGggY2xhc3M9InN0MCIgZD0iTTE0LjcsMzAzLjFjLjcsNy4yLDIsMTQuNywzLjksMjIuNywyLjQsMTQsNi4zLDI3LjcsMTEuOCw0MS4yLDMuMSw3LjYsNi4xLDE1LjcsOS43LDIyLjUsMi43LDUuMSw0LjgsMTAsOC4xLDE1LjcsNi4xLDEwLjcsMTIuNCwyMC40LDE4LjksMjkuMS4yLjIsMy4zLDQuNiw0LjgsNi42LDQuNCw1LjksNy4xLDkuMyw4LjEsMTAuMyw0LjUsNC40LDguNCw4LjUsMTEuOCwxMi4xLDUuOSw2LjQsMTMsMTEuOCwxOS43LDE3LjUsOC43LDcuNSwxNS45LDEyLDI1LDE4LjMsMy42LDIuNSw3LjEsNC43LDEwLjUsNi41LDkuNCw1LjMsMTksMTAuMiwyOC44LDE0LjYuMiwwLC40LDAsLjUtLjFzMC0uNC0uMS0uNWgwYy05LjctNy4zLTE4LjgtMTMuOC0yNy41LTIyLjYtMi45LTIuOS03LjUtNi0xMC43LTkuNi0xMS42LTEzLjEtMTgtMjAuMy0yNS43LTMyLjItLjMtLjUtLjktLjctMS41LS41LTguMiwzLjMtMTguNSwyLjMtMjUuMy0zLjQtMTMuNi0xMS40LTEyLjYtMzEuOSwyLjMtNDEuNi40LS4zLjYtLjkuNS0xLjQtMi42LTcuNS00LjUtMTIuOS02LjQtMjAuNS03LjItMjguMy0xMS4xLTU2LjktMTEuNy04NS44LS40LTE5LjguNy0zOS4zLDMuMy01OC40LDAsMCwuMS0uMi4yLS4xLDAsMCwwLDAsMCwwbDksMS41Yy4yLDAsLjQuMi4zLjUtMS40LDEwLjctMi4yLDIwLjMtMi41LDI4LjYtLjUsMTIuOC0uNiwyNC45LS4yLDM2LjIuNSwxNSwyLjIsMzEuMSw1LjEsNDguMiwxLjgsMTAuNyw0LjcsMjEsNy4zLDMyLDEuMSw0LjcsMy4zLDkuOSw0LjYsMTQuMywwLC4zLjQuNS43LjUsOC40LS43LDE1LjMsMS41LDIwLjgsNi42LDUuMyw0LjksOC4xLDExLDguNiwxOC4zLjQsNi45LTIsMTMuMS03LjIsMTguOC0uMi4yLS4yLjUsMCwuNywxNi4yLDIzLjIsMzUuOSw0My4xLDU5LjIsNTkuNmw3LjcsNS4yYy4yLjIuNS4yLjguMi41LDAsLjgtLjEsMS4xLS4zLDAsLjIsMCwuNC4yLjYsMCwuMS4yLjMuNS40LDEzLjIsNy4zLDI1LjgsMTIuOSwzNy44LDE2LjcsMjYsOC4yLDU0LjcsMTAuNiw4Mi4xLDYuOCwzNC42LTQuOCw2NS43LTE4LDkzLjMtMzkuOCwxNy4zLTEzLjYsMzIuMy0yOS44LDQ1LTQ4LjQuMS0uMi4zLS4yLjUtLjFsOC44LDMuNmMuMSwwLC4yLjIuMS4zLDAsMCwwLDAsMCwwLTcuMywxMC4xLTE0LjksMTkuNy0yMywyOC42LTEuMSwxLjMtNS4zLDUuMy0xMi41LDEyLjItNC4zLDQuMS04LjYsNy45LTEzLjEsMTEuNS0xMC4zLDguMS0yMS4xLDE1LjEtMzIuMiwyMC45LS4yLDAtLjIuMy0uMi41LDAsMCwwLDAsMCwwbC4yLjNjMCwuMS4zLjIuNC4xLDE2LjItNS43LDMwLjctMTIuMiw0My41LTE5LjQsMTQuNi04LjIsMjUuOS0xNS40LDM0LTIxLjgsMTIuOC0xMC4xLDIwLjktMTcsMjQuMy0yMC43LDQuOS01LjMsMTMuOC0xMy44LDE5LjMtMjEsNS4zLTcsNy45LTEwLjUsOC0xMC42LDguNy0xMS43LDE2LjQtMjMuOCwyMy0zNi4zLDMuOC03LjMsOS43LTE5LjUsMTMuNS0yOS42LDguMi0yMS43LDEzLjYtNDQuMywxNS45LTY3LjguNy03LjEsMS0xNC41LjktMjIuNCwwLS4yLS4xLS4zLS4zLS4zLDAsMC0uMiwwLS4yLjEtLjIuMi0uMy41LS40LDEtMy41LDE2LjMtOS4xLDMyLjItMTYuOCw0Ny44LTMuNSw3LjEtNy41LDE1LTExLjcsMjEuOC02LjgsMTEuMS0xMi40LDE5LjYtMTYuNywyNS40LTIuNCwzLjMtNy43LDkuOS0xNS45LDE5LjktLjIuMy0uNi4zLS45LDAsMCwwLDAsMC0uMS0uMS0xLjYtMi4zLTMuNS00LjItNS44LTUuOC0uMy0uMi0uNC0uNy0uMi0xLDAsMCwwLDAsMCwwLDQuMi00LjcsOC4xLTguOCwxMi4xLTE0LjMsNC43LTYuNSw3LjMtMTAuMSw3LjgtMTAuOSw5LjUtMTMuOCwxNy42LTI4LjEsMjQuNC00Mi45LDktMTkuNSwxNC42LTM4LjUsMTcuNS01OC42LjgtNS40LDEuMS0xMy41LjktMjQuMSwwLS4zLjItLjYuNi0uNiw0LjUtLjUsOC45LTIsMTMuMS00LjMuMy0uMi43LDAsLjkuMywwLDAsMCwuMiwwLC4yLjQsNC40LjgsNy45LDEuMiwxMC4zLDcuMyw0NS4yLDIsOTMuOC0xNC44LDEzNi40LTMuNCw4LjctNS4yLDEzLjctOC41LDIwLjMtNi45LDEzLjQtMTEuOSwyMi42LTE1LDI3LjYtMTAuOCwxNy40LTIyLjksMzMtMzYuMyw0Ni43LS44LjgtMy4zLDMuNC03LjYsNy45LTIuOSwzLTUuNiw1LjYtNy45LDcuNi0xMS42LDEwLTIxLjQsMTcuOC0yOS4zLDIzLjItNjMuMyw0My40LTE0MS42LDYxLjEtMjE3LjUsNDUuMy00OC44LTEwLjEtOTQuNC0zMi40LTEzMi02NC40LTQuNi0zLjktMTIuMS0xMS4xLTIyLjUtMjEuNi01LjctNS44LTEwLTExLjYtMTUuNy0xOC4xLTEuNy0yLTMuOC00LjctNi4yLTcuOS0xMS40LTE1LjUtMjAuOC0zMS4xLTI4LjItNDYuNy03LjMtMTUuNS0xMy41LTMyLjYtMTguNS01MS4yLTMuMy0xMi41LTUuNC0yNS45LTctMzkuMy0uNi00LjktMS0xMi44LTEuNC0yMy43LS45LTMzLjEsNC4xLTY1LjEsMTUuMS05NiwwLS4yLjItLjIuNC0uMiwwLDAsMCwwLDAsMCwzLjMsMS43LDYuOCwyLjcsMTAuNCwzLjEuMywwLC41LjMuNS42LDAsMCwwLDAsMCwuMS0yLjEsNi0zLjksMTEuMi01LjUsMTcuNS0yLjUsMTAuMS00LjQsMjAuMy01LjgsMzAuOC0yLjgsMjAuNS0zLDQxLjEtLjUsNjJaIi8+CiAgPHBhdGggY2xhc3M9InN0MSIgZD0iTTQ1OC41LDIyMS45Yy0uMy0uOS4yLTIsMS4yLTIuMywwLDAsLjEsMCwuMiwwLDMuOS0uOCw5LjItMS45LDE2LTMuMSw0LS43LDI0LjYtNCwzMS4zLTQuOCw0LjItLjUsOC4yLTEuMSwxMi4yLTEuOS41LDAsLjkuMiwxLC43LDAsMCwwLDAsMCwwbC45LDYuN2MwLC40LS4yLjgtLjcuOS01LjguOC0xOS40LDMuMS00MC43LDYuOC00LjcuOC0xMC4zLDIuMS0xNi45LDMuNi0xLjMuMS0yLjUtLjYtMi45LTEuOWwtMS41LTQuOFoiLz4KICA8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMTEyLjMsMjMzYy0uNy0uNS0uOS0xLjUtLjUtMi4yLDAsMCwwLDAsMCwwbDIuNy00LjFjLjctMS4xLDEuNS0xLjksMS42LTEuOGw4Miw1NC4zYy4yLDAtLjMsMS4xLTEuMSwyLjIsMCwwLDAsMCwwLDBsLTIuNyw0LjFjLS41LjctMS41LjktMi4yLjRsLTc5LjgtNTIuOFoiLz4KICA8cGF0aCBjbGFzcz0ic3QxIiBkPSJNMzQ0LjUsMjU5LjJjMCwwLS4yLDAtLjMsMC0yMS40LDYuNS00My41LDE0LjEtNjYuMywyMi42LTksMy40LTE2LjIsNi4zLTIxLjYsOC43LS44LjQtMS43LDAtMi4xLS44LDAsMCwwLS4xLDAtLjJsLTEuNy01LjJjLS4zLTEuMS4yLTIuMiwxLjMtMi41LDYuNS0yLjEsMTIuMi00LjMsMTcuMy02LjUsNS42LTIuNCwxMS4zLTQuNywxNy4yLTYuOCwxOC4yLTYuNCwzNi0xMi42LDUzLjYtMTguMSwxNy42LTUuNSwzNS43LTEwLjUsNTQuNC0xNS43LDYtMS43LDI5LjMtNi44LDM1LjgtOC44LDEuMS0uMywyLjIuMywyLjUsMS4zbDEuNiw1LjJjLjMuOC0uMiwxLjctMS4xLDIsMCwwLS4xLDAtLjIsMC01LjgsMS4xLTEzLjQsMi44LTIyLjcsNS4xLTIzLjYsNi00Ni4xLDEyLjQtNjcuNCwxOS4yLS4xLDAtLjIsMC0uMywwWiIvPgogIDxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0xOC42LDMyNS44Yy0xLjktNy45LTMuMS0xNS41LTMuOS0yMi43bDcuOC0yMC42YzAsMCwwLS4xLDAtLjIsMi0zLjYsMy41LTYuOSw0LjctOS45LDEuNy00LjUsNC4yLTgsNi42LTEyLjYsMi41LTQuNyw1LjItOS4xLDguMi0xMy4xLDUuMi02LjksNy41LTEwLjYsMTIuMy0xNi41LjItLjIuNS0uMy44LDAsMCwwLDAsMCwwLDBsNSw2LjVjLjIuMy4yLjcsMCwxLTIuNywzLTUsNS44LTYuNyw4LjctNSw4LTExLDE1LjktMTQuNiwyMy01LjYsMTEuMy0xMC40LDIyLjktMTQuNCwzNS0uNywyLTEuNiw1LjYtMi44LDEwLjctLjgsMy41LTEuOCw3LTMsMTAuNloiLz4KICA8Y2lyY2xlIGNsYXNzPSJzdDMiIGN4PSIyMjEuOCIgY3k9IjI5Ny42IiByPSIyNy4zIi8+CiAgPHBhdGggY2xhc3M9InN0MCIgZD0iTTM0My42LDM1Ny40YzMwLjYsMTQuOSw2MS4zLDI4LjksOTIuOSw0MS42LjEsMCwuMi4yLjEuMywwLDAsMCwwLDAsMGwtMy4xLDcuNmMwLC4yLS4zLjMtLjUuMiwwLDAsMCwwLDAsMC0yLjUtMS4xLTUuMi0yLjItOC0zLjMtMjguNC0xMS42LTU2LjktMjQuMy04NS40LTM4LjItMjguNS0xMy45LTU2LjEtMjguNC04Mi44LTQzLjYtMi42LTEuNS01LjItMi45LTcuNS00LjItLjIsMC0uMi0uMy0uMS0uNSwwLDAsMCwwLDAsMGw0LTcuMmMwLS4xLjItLjIuMy0uMWgwYzI5LjUsMTcsNTkuNSwzMi41LDkwLjEsNDcuNFoiLz4KICA8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMTU4LjUsMzY0LjdjLTEzLjYsMTQuOC0yNi4yLDMwLjYtMzguMSw0Ni41LS4xLjItLjQuMi0uNiwwLDAsMCwwLDAsMCwwbC02LTQuOGMtLjMtLjItLjMtLjYtLjEtLjksMTEuOS0xNiwyNC44LTMxLjYsMzguNi00Ni42LDEzLjgtMTUuMSwyOC4yLTI5LjIsNDMuMS00Mi41LjMtLjIuNy0uMi45LDBsNS4zLDUuNmMuMi4yLjIuNSwwLC42LDAsMCwwLDAsMCwwLTE0LjgsMTMuMi0yOS41LDI3LjItNDMsNDJaIi8+CiAgPHBhdGggY2xhc3M9InN0MyIgZD0iTTIxNC41LDMzMC41bC03LjQtMy4xczAsMCwwLDBjMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDBzMCwwLDAsMGMwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMGwtMTEsMzNjLTYuOSwyMS42LTExLjksNDMuNy0xNSw2Ni4xLTEuMSw3LjYtMS4zLDEzLjgtMi4xLDIwLjctLjUsNC41LS44LDkuNy0uOCwxNS41LS4yLDE1LjMuMywzMC44LDEuNCw0Ni40bDcuNyw1LjJjLjIuMi41LjIuOC4yLjUsMCwuOC0uMSwxLjEtLjMtLjQtOC45LTEuOC0xOC44LTIuMS0yNi40LTEuMS0yNC42LjQtNDguOCw0LjctNzIuNiwzLTE2LjYsNy4xLTMzLjYsMTIuNC01MWwxMS4xLTMzLjZjMC0uMSwwLS4yLS4xLS4zWiIvPgogIDxjaXJjbGUgY2xhc3M9InN0MyIgY3g9IjQ2Ni44IiBjeT0iNDE4LjEiIHI9IjI4LjgiLz4KICA8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMzE1LjUsNDcyLjRjLTQwLjcsNS40LTgxLjcsNC40LTEyMy4xLTMtLjUsMC0uOC0uNS0uNy0xbC43LTcuNWMwLS4zLjMtLjUuNi0uNSwwLDAsMCwwLDAsMCw0MC42LDcsODEsNy44LDEyMS4zLDIuNSw0MC4yLTUuNCw3OS0xNi44LDExNi40LTM0LjIuMy0uMS42LDAsLjcuMywwLDAsMCwwLDAsMGwyLjcsN2MuMi40LDAsLjktLjUsMS4xLTM4LDE4LTc3LjQsMjkuNy0xMTgsMzUuMVoiLz4KICA8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMTI4LjgsNDUxLjdjLS4xLDAtLjItLjItLjEtLjMsMCwwLDAsMCwwLDBsNC4zLTcuNWMuMS0uMi40LS4zLjYtLjIsMTIuMiw0LjcsMjQuNCw4LjYsMzYuNCwxMS44LjIsMCwuNC4zLjQuNWwtLjgsNy45YzAsLjItLjIuMy0uNC4zLDAsMCwwLDAsMCwwLTEzLjgtMy40LTI3LjMtNy41LTQwLjUtMTIuNFoiLz4KPC9zdmc+",
      "altText": "Check Networks"
    },
    "version": "2.0.0-pre.6",
    "license": {
      "name": "Check Networks API Terms",
      "url": "https://help.checknetworks.tools/api/terms/"
    },
    "contact": {
      "name": "Support Team",
      "email": "support@checknetworks.com.au",
      "url": "https://checknetworks.com.au/contact/"
    },
    "description": "The Check Networks API lets you run your services from your own systems:\nqualify and order NBN and Opticomm data services, manage phone numbers,\nSIP trunks and SMS, raise support tickets, receive webhooks, and read your\naccount and billing.\n\n\nThe reference is published at `https://api.checknetworks.tools/docs`. The\nOpenAPI document behind it, for generating a client, is at\n`https://api.checknetworks.tools/docs/openapi.json`.\n\n\nEndpoints marked **Coming Soon** are published early so you can build\nagainst them. Until they go live they answer `501 - Not Implemented`.\n\n# Getting Started\n\n1. **Create an API Client** in the Wholesale Portal, under Company\n   Settings → Integrations → API Keys, and choose the scopes it may use.\n   The Client Secret is shown once.\n2. **Request an access token** from `POST /oauth/token` with\n   `grant_type=client_credentials`, your `client_id` and `client_secret`,\n   and the scopes you need as a space-separated `scope`\n   (e.g. `scope=data:read tickets:read`).\n3. **Call `GET /ping`** with the token to confirm it works and see the\n   key, account and scopes it carries, the address we saw and which\n   environment answered.\n4. **Send the token on every request**:\n   `Authorization: Bearer <access token>`. Tokens last one hour; request a\n   new one when it expires.\n\nThe API is for Check Networks customers. If you do not have access to the\nWholesale Portal, contact your Account Manager or our Sales Team.\n\n**Build against the sandbox** (`https://api.checknetworks.dev/v2`): a\nseparate copy of the platform, with its own account, keys and test\naddresses, where nothing reaches a carrier. Orders there move through the\ncarriers' own steps in minutes and fire your webhooks as production does.\nAsk your Account Manager for one. In production every call runs against\nyour real account, and a carrier write places a real order. A few calls\nthat act on our live network answer `501` in the sandbox.\n\nTo test your retries, send `CN-Sandbox-Simulate: 429`, `502` or `503` on\nany sandbox call: it answers that status in the usual error shape, with\n`Retry-After: 60` on a 429 or 503, and runs nothing. Production ignores\nthe header.\n\n# Scopes\n\nEach endpoint lists the scope it needs. A token carries only the scopes\nyou asked for **and** your API Client is allowed; any others are dropped\nwithout an error. With no `scope` at all, a token carries none and every\nendpoint refuses it. The `scope` field of the token response is the\nrecord of what a token carries, so check it first when you get a\n`403 - Forbidden`.\n\nEvery data endpoint, under `/nbn`, `/opticomm` and `/data` alike, uses the\n`data:*` scopes.\n\n# Conventions\n\n- Field names are `camelCase`.\n- Money is a decimal string in Australian dollars (`\"49.95\"`), with a\n  `currency` field alongside (always `AUD` today).\n- A single object comes back in `result`, and a list in `results`.\n- Every list of your own records takes `page` and `perPage` and returns\n  `total`, `page` and `perPage` with `results`. `perPage` defaults to\n  **50** and runs from 1 to **200**; a value outside that, or a `page`\n  that is not a whole number of at least 1, is `422 - Unprocessable\n  Entity` naming the field, never quietly changed.\n- Lists take `sort` (a field the list names, `-` in front for\n  descending), `q` (a case-insensitive search, at most 100 characters,\n  over the fields the list names), `updatedSince`, `createdFrom` and\n  `createdTo` (an ISO 8601 date or date-time; a date alone is that day in\n  UTC, or in your zone when you send `CN-Time-Zone`). A filter such as `status` takes one or several values,\n  comma-separated, in any case. An unknown sort field or filter value is\n  `422`.\n- Lists that grow while you read them (payments, tickets, SMS, webhook\n  deliveries, call records) also return `nextCursor`, newest first: pass\n  it back as `cursor` until it is `null`. A cursor page carries `perPage`,\n  `nextCursor` and `results` only. A sorted list has no cursor.\n- An end user is named by its number, as `endUser`, everywhere a\n  response or a request names one; where a response shows its name too,\n  that is `endUserName`.\n- `expand` inlines a related record in full where a list or read names\n  it, such as `expand=endUser` on your services, which adds\n  `endUserDetail`.\n- Every time is UTC unless you ask for your own zone: send\n  `CN-Time-Zone` with an IANA zone name, such as `Australia/Perth`, and\n  every time in a JSON response comes in that zone with its offset\n  (`2026-11-22T09:30:00+08:00`), a date alone in a list filter is that day\n  in that zone, and the response echoes the header. A name that is not a\n  zone is `422` naming `CN-Time-Zone`. Downloads (CSV, NDJSON, PDF),\n  webhook deliveries and the carrier-shaped `/nbn` and `/opticomm` bodies\n  stay as they are. What you set comes back as you set it, whatever it\n  looks like: `metadata`, `externalRef`, your references\n  (`orderReference`, `customerReference`, `customerRef`,\n  `salesReference`, `paymentReference`, `paidReference`) and your own\n  `name`, `description`, `note` and `notes` text.\n- A create answers `201 - Created` with the new resource. Every other\n  success answers `200 - OK`.\n\n**Carrier-shaped endpoints.** Some `/nbn` and `/opticomm` endpoints mirror\nthe carrier's own API, so an integration written for the carrier works here\nunchanged. These return the carrier's own bodies and status codes, without\nthe `result` wrapper, and are not paginated: the `/nbn` service\nqualifications (`single_site`, `fibre_uplift`, `enterprise_ethernet`),\n`/nbn/address/search`, `/nbn/address/geocode`, `/nbn/address/{locId}`,\n`/nbn/planning/{locId}`, the `/nbn/product_qualification` `service_types`\nand `bandwidths`, the diagnostic test catalogue and Opticomm\n`productOrders`. Our account identifiers are removed and links point at this\nAPI. The `/nbn` ones also take Kinetix's query parameter names (`loc_id`,\n`service_ref`, `customer_authority_date`, `location_ref`, `service_type`)\nas well as ours. Lists of your own records under those paths, such as your\nNBN inventory, are paginated as usual. Where we add to a carrier's shape,\nthe field or parameter says \"Ours\": the premises `address` and\n`fibreBuildCategory` on an EE quote, and the search, filters, sort and\npaging of `GET /nbn/quotes`.\n\n# Errors\n\nErrors use standard HTTP status codes. The body tells you more:\n\n- **`code`** says what went wrong, such as `not_found`,\n  `key_revoked` or `duplicate_order`. Your code should check this. The\n  full list is on the `Error` schema.\n- **`reason`** explains it in words, for a person to read. The wording\n  can change.\n- **`messageId`** is this request's id, the same as the `CN-Message-Id`\n  header. Quote it to Support.\n- **`docUrl`** links to the code's entry in the\n  [error reference](https://help.checknetworks.tools/api/errors/),\n  which says what to do about it.\n- **`fields`** appears when the request failed validation, and names\n  each input that was wrong.\n- **`carrierCode`** appears when nbn or Opticomm refused the request,\n  and holds their own error code.\n\n| Status | Meaning |\n|---|---|\n| `400` | The body could not be parsed, or a required header is missing. On the carrier-shaped `/nbn` and `/opticomm` endpoints, also a bad input, as the carrier answers. |\n| `401` | The access token is missing, expired or invalid, or its key is past its end date (`key_expired`). |\n| `403` | Refused: `code` says why, such as `missing_scope`, `key_revoked`, `ip_not_allowed` or `account_suspended`. |\n| `404` | Not found. We give the same answer for something on another account. |\n| `405` | The path exists, but not for this method. |\n| `409` | The resource isn't in a state that allows this right now. |\n| `422` | An input was wrong (`validation_failed`, with `fields` naming it), or the request was refused on its merits. `reason` says why. |\n| `429` | Too many requests. See Rate Limits. |\n| `501` | The endpoint is Coming Soon, or isn't offered in the sandbox. Only the operations that list it can answer it. |\n| `5xx` | A problem on our side, or with the carrier. Try again shortly. |\n\nEvery error, an unknown path included, comes back as this JSON body,\nwhatever your `Accept` header says.\n\n# Idempotency\n\nA write (`POST`, `PUT`, `PATCH` or `DELETE`) can carry an\n`Idempotency-Key` header so that retrying it never does the work twice,\nfor example after a timeout where you never saw the response. Use a new\nunique value, such as a UUID, for each operation:\n\n`Idempotency-Key: 1f8e6b1a-9c4d-4a2e-8b3a-2f6d0c9e7a51`\n\nThe key is required wherever a repeated request could do real harm, in\nthree groups.\n\n**Calls that reach a carrier**, where a repeat could place a second real\norder: placing, answering, changing or cancelling an order\n(`/data/orders`, `/nbn/orders/...`, `/opticomm/productOrders`),\nsubmitting a bundle (`POST /bundles/{id}/submit`), ordering a number\n(`POST /numbers`), reserving, changing or cancelling a technician\nappointment, the carrier service tests and health reports (and\n`POST /data/services/{ref}/sessions/refresh`,\n`POST /data/services/{ref}/diagnostics` and\n`POST /data/radius/{ref}/session-check`), and Opticomm's\n`static_ip` GET. These share a limit of **30 per minute per account**,\non top of the general rate limit. A replay of a stored answer does not\ncount against it. A batch qualification (`POST /data/sq/batches`) asks\nthe carrier once for each row, so it needs the key too, but is not on\nthat limit.\n\n**Calls that bill or send**, where a repeat could charge you twice or\nsend twice: creating a trunk (`POST /trunks`), ordering a fax plan\n(`POST /fax/plans`), sending a fax (`POST /fax/documents`), requesting\nan NBN quote (`POST /nbn/quotes`), sending an SMS (`POST /sms`),\nordering colocation (`POST /colocation/orders`), and rotating a webhook\nsecret (`PATCH /webhooks/{webhookId}` with `rotateSecret: true`).\n\n**Writes on our side that must not run twice**: recording an end user's\nusage (`POST /end-users/{endUser}/usage` and `POST /usage/batch`), which\nwould bill them twice; importing end users (`POST /end-users/imports`),\nwhich would import the file twice; rotating your own API key\n(`POST /account/api-keys/self/rotate`), which would rotate it twice;\na bulk change to numbers (`POST /numbers/bulk`), which could release\nthem twice; and hanging up a call (`POST /voice/calls/{callId}/hangup`),\nwhich could hang up a second one.\n\nEach of these operations lists the header as required (the webhook\nsecret rotation says so in its description, as it needs the key only\nwith `rotateSecret`). Without a key they all answer `400` with the same\nbody.\n\nEvery other write (users, tickets, webhooks, a single number, RADIUS,\nprovisioning and the rest) accepts the key and honours it the same way,\nbut runs without one.\n\nHow a key behaves:\n\n| You send | You get |\n|---|---|\n| A new key | The request runs, and its response is stored. |\n| The same key and the same request | The stored response, with `Idempotent-Replayed: true`. Nothing runs again. |\n| The same key with a different request | `422` `idempotency_key_reused`. |\n| The same key while its first request is still running | `409` `idempotency_in_progress`, with `Retry-After`. Retry then. |\n| A key longer than 255 characters | `400`. |\n\nA `5xx` is stored like any other response, so retrying with the same key\nreturns the same `5xx` rather than running the write again. A request that\ntimed out may still have **succeeded**, so we keep the key spent rather\nthan risk a duplicate. Once you know the operation did not happen, send it\nunder a **new** key. If a key keeps answering `409` long after the first\ncall, contact Support: we never release a key on our own, because we\ncan't tell a slow request from one that stopped.\n\nKeys belong to your API Client and are kept for 30 days. A write sent\nwithout the header, where it is optional, is not deduplicated.\n\n# Rate Limits\n\nEach API Client may make **120 requests per minute** across the whole API,\nand your account **600 per minute** across all its API Clients together,\nso adding clients does not add capacity. Over either, requests answer\n`429 - Too Many Requests` until the minute passes. If you need more,\ncontact Support: we can raise your account's figure.\n\nThree groups of calls have a lower limit of their own, per account, on\ntop of those. Each of these operations names its limit in its\ndescription, as `Limit: ... (carrier write)`, `(webhook send)` or\n`(domain verify)`:\n\n| Calls | Limit |\n|---|---|\n| Carrier-reaching writes (listed under Idempotency) | 30 per minute. A replay of a stored answer does not count. |\n| Webhook test, redeliver and replay-dead, and sending an event again (`POST /events/{eventId}/deliveries`) | 10 per minute, shared |\n| Verifying an end-user portal domain | 5 per minute |\n\n`POST /end-users/lookup` allows 20 per minute for each API key, and says\nso as `Limit: 20 per minute for the key.`\n\n`POST /oauth/token` has its own limit: **30 per minute for each\n`client_id` from one address**, so systems behind one NAT do not share\nit, and 120 per minute from one address whatever the `client_id`.\n\nEvery response carries the limit that will stop you first, whichever of\nthese it is:\n\n| Header | What it says |\n|---|---|\n| `X-RateLimit-Limit` | The calls that limit allows in its minute. |\n| `X-RateLimit-Remaining` | The calls you have left in it. |\n| `X-RateLimit-Reset` | When it starts again, as a Unix time. |\n| `Retry-After` | On a `429` only: the seconds to wait before retrying. |\n\nA `429` always means a rate: wait and retry. A cap on what you hold, such\nas the 5 open install reservations, answers `409` instead, because\nwaiting does not change it.\n\n# Versioning\n\nThe current version is **v2**, at `/v2`\n(`https://api.checknetworks.tools/v2/account`). Every path also answers\nwithout the prefix (`https://api.checknetworks.tools/account`), and those\nunprefixed paths mean v2 **for good**: a later version gets its own\nprefix (`/v3`) and never changes what an unprefixed call does.\n\nEvery response, errors included, names the version that answered:\n\n```\nAPI-Version: 2\n```\n\nThere is no `/v1` here. v1 is the legacy API at `api.checknetworks.au`, a\nseparate platform being retired over time. If you still use it, talk to us\nabout moving across.\n\n**What counts as a breaking change.** Within v2 we only add: a new\nendpoint, a new optional parameter, a new field in a response, a new\nwebhook event type or a new error `code`. Build your client to ignore\nfields it does not know. Removing or renaming a field, endpoint or parameter, changing a\nfield's type or meaning, making an optional input required, or refusing\na request we used to accept is breaking, and happens only through the\ndeprecation below or a new version.\n\n# Deprecation\n\nNothing is deprecated today. When an endpoint or field is to be retired,\nyou get **at least 12 months' notice** before it stops working. We tell\nyou three ways: an entry here and in the changelog saying what to use\ninstead, an email to your account, and three headers on every response\nfrom the call:\n\n```\nDeprecation: @1798761599\nSunset: Fri, 31 Dec 2027 23:59:59 GMT\nLink: <https://api.checknetworks.tools/docs#section/Deprecation>; rel=\"deprecation\"; type=\"text/html\"\n```\n\nThe `Sunset` is at least 12 months after the `Deprecation`. The one\nexception is a security fix: when keeping a call would put accounts at\nrisk, we may retire it sooner, and say why.\n\n| Header | What it says |\n|---|---|\n| `Deprecation` | When it was deprecated: `@` and a Unix timestamp ([RFC 9745](https://www.rfc-editor.org/rfc/rfc9745.html)). |\n| `Sunset` | The last moment it answers, as an HTTP date ([RFC 8594](https://www.rfc-editor.org/rfc/rfc8594.html)). After that it answers `404`. |\n| `Link` | This section, which says what to use instead. |\n\nIt keeps working normally until the `Sunset`. We suggest logging a warning\nwhenever a response carries `Deprecation`, and raising an alert when the\n`Sunset` falls inside your next release cycle. Deprecated operations are\nalso marked `deprecated: true` in this document, so a generated client can\nflag them.\n\n# Support\n\nEvery response carries a **`CN-Message-Id`** header, our identifier for that\nrequest. Quote it when you contact Support about a call and we can find the\nexact request. It is on error responses too. We issue it; you can't set it.\nFor your own handle on a write, use `Idempotency-Key`.\n\nFor help with the API, email support@checknetworks.com.au. Our team can\nanswer questions and help you understand the API, but can't write your\nintegration for you.\n"
  },
  "servers": [
    {
      "url": "https://api.checknetworks.tools/v2",
      "description": "Production Server"
    },
    {
      "url": "https://api.checknetworks.tools",
      "description": "Production Server (unversioned — equivalent to /v2)"
    },
    {
      "url": "https://api.checknetworks.dev/v2",
      "description": "Sandbox Server (nothing reaches a carrier)"
    }
  ],
  "security": [
    {
      "OAuth2": []
    }
  ],
  "tags": [
    {
      "name": "API",
      "description": "Find this reference and check the API is up. No token needed."
    },
    {
      "name": "Authentication",
      "description": "Exchange your API Client's credentials for an access token, and check what a token carries. The first calls any integration makes."
    },
    {
      "name": "Account",
      "description": "Your account's details, balance, invoices, credit notes and payments.\n\n**Webhooks:** invoices and payments send [Account & Billing events](#tag/Webhook-Events-Account)."
    },
    {
      "name": "Partners",
      "description": "Your partners: invite them, set the end users, products and permissions each may reach, and remove them. And their commission: the monthly runs, their breakdown, clawbacks still to come off, and each partner's rates, read only."
    },
    {
      "name": "Address Search",
      "description": "Find an Australian address in our copy of G-NAF, with its NBN and Opticomm identifiers when we know them. Start here, then qualify the address you picked. Any token can use it."
    },
    {
      "name": "Data Service Qualification",
      "x-displayName": "Service Qualification",
      "description": "One qualification for a premises, whichever network serves it. The carrier-shaped qualification endpoints under NBN and Opticomm remain for the carriers' full documents."
    },
    {
      "name": "Data Orders",
      "x-displayName": "Orders",
      "description": "Place and follow orders on any data network, in one shape.\n\n**Webhooks:** status changes and technician appointments send [Orders & Appointments events](#tag/Webhook-Events-Orders)."
    },
    {
      "name": "Data Services",
      "x-displayName": "Services",
      "description": "Your data services on any network, in one shape, with their live status and their usage.\n\n**Webhooks:** a service going live, suspended, resumed or disconnected sends [Services events](#tag/Webhook-Events-Services)."
    },
    {
      "name": "Data Layer 2",
      "x-displayName": "Layer 2",
      "description": "Layer 2 handoff destinations, across NBN and Opticomm."
    },
    {
      "name": "Data Provisioning",
      "x-displayName": "Provisioning",
      "description": "Provision an order's service, whichever network delivers it.\n\n**Webhooks:** a service going live, suspended, resumed or disconnected sends [Services events](#tag/Webhook-Events-Services)."
    },
    {
      "name": "Data RADIUS",
      "x-displayName": "RADIUS",
      "description": "Your RADIUS users, their sessions and their realm.\n\n**Webhooks:** a realm request being approved or rejected sends [RADIUS Realms events](#tag/Webhook-Events-RADIUS)."
    },
    {
      "name": "Data Utilisation",
      "x-displayName": "Utilisation",
      "description": "NNI and POI utilisation at the POIs where you have a live data service, as the portal charts it."
    },
    {
      "name": "Data Bundles",
      "x-displayName": "Bundles",
      "description": "Order data services, numbers and a voice trunk together, in sequence,\neach item able to wait for the ones before it to go live, and submit\nthem in one call."
    },
    {
      "name": "Colocation",
      "description": "Your colocation services, ordering rack space, and remote-hands and\nextras requests, which are support tickets you follow on\n[Support Tickets](#tag/Support-Tickets)."
    },
    {
      "name": "VPN",
      "description": "Your VPN access groups and users, as the portal's VPN pages: what each\ngroup may reach, ordering users (billed per user each month), renaming,\nmoving and removing them, and a user's profile to download."
    },
    {
      "name": "Users",
      "description": "The staff users on your wholesale account: their roles, two-factor, notice choices and open invitations. An API key acts as an Admin here, so it can neither change nor remove an Owner, nor make anyone an Owner."
    },
    {
      "name": "Support Tickets",
      "description": "Raise and follow support tickets with Check Networks.\n\n**Webhooks:** new tickets, replies, status changes and ratings send [Support Tickets events](#tag/Webhook-Events-Tickets)."
    },
    {
      "name": "Network Outages",
      "description": "Check Networks outages affecting your services, from our outage register.\n\n**Webhooks:** outages opening, changing and closing send [Network Outages events](#tag/Webhook-Events-Outages)."
    },
    {
      "name": "Webhooks",
      "x-displayName": "Endpoints",
      "description": "Register the URLs that receive events, test them, and see and replay their deliveries.\n\nThe events are listed in this group by area. Read [How Delivery Works](#tag/Webhook-Delivery) first."
    },
    {
      "name": "Webhook Delivery",
      "x-displayName": "How Delivery Works",
      "description": "Each event is sent as a `POST` with a JSON body to every endpoint subscribed to it. Reply with any `2xx` status to acknowledge it, including for an event type you do not handle.\n\n### What a delivery carries\n\nThe body has `eventId`, `eventType`, `occurredAt`, `sequence` and `data`, plus `apiVersion` (`2`), `livemode` (`false` from the sandbox), `test` (`true` for a delivery you asked for with `POST /webhooks/{webhookId}/test`), `accountId` (your `clientNumber`) and `resourceUrl`, where to read the current state of what the event is about. Events can arrive late or out of order, so re-read `resourceUrl` before acting on one.\n\nThe headers carry `X-CN-Event-Id` (the `eventId`) and `X-CN-Delivery-Attempt` (`1` for the first try, counting up on each retry; a redelivery or replay is a new delivery and starts again at `1`).\n\nWithin a version, events only gain fields and new event types are only added. Ignore a field or type you do not know, and answer `2xx` to it.\n\n### Checking a delivery came from us\n\nEvery delivery carries an `X-CN-Signature: t=<unix seconds>,v1=<signature>` header. Check it: it is the only proof a delivery came from us. The secret itself is never sent, so nothing that logs your request headers can forge a delivery.\n\nThe signature is an HMAC-SHA256, in hex, of `<t>.<raw body>`, keyed with your endpoint secret. Work it out over the exact bytes you received, compare it in constant time, and reject a delivery whose `t` is more than 5 minutes old.\n\nFor a while after you rotate the secret, the header carries a second `v1` signed with the old one. Accept the delivery if any `v1` matches.\n\n### Retries\n\nWhat happens next depends on the status your endpoint answers:\n\n- A `5xx`, a timeout or a connection failure is tried again: 6 attempts in all over about 8.6 hours, waiting 1 minute, 5 minutes, 30 minutes, 2 hours and 6 hours between them. After the last one it is marked `dead`.\n- A `429` is tried again when your `Retry-After` header says, or on the same ladder if you send none.\n- A `408` is treated like a timeout and tried again on the ladder.\n- Any other `4xx` is **not retried**: it is marked `dead` at once, since the endpoint would answer the same way in six hours.\n- A `3xx` is **not followed and not retried**: it is marked `dead` at once. Register the final URL instead.\n\nEvery `dead` delivery counts toward the auto-disable below, whichever way it got there, with one exception: for 30 days after an event type is added, a `4xx` to it does not count, so an endpoint that does not know the new type yet is not turned off for it. The endpoint's `lastError` still shows the rejection.\n\nAfter 20 dead deliveries in a row, the endpoint is turned off (`disabledReason: auto`), your technical contact is emailed, and your other endpoints that take it get a `webhook.endpointDisabled` event. Events are still recorded while it is off. Turn it back on with `PATCH /webhooks/{webhookId}`, then replay the dead deliveries to catch up.\n\n### Duplicates and order\n\nAn event can arrive more than once, and out of order. Use `eventId` to ignore repeats, and `occurredAt` to put them in order: a redelivered or replayed event keeps both. `sequence` counts up for each endpoint as each delivery is queued, and a redelivery or a replay is a new delivery with a new `sequence`, so do not order by it. Better still, treat an event as a hint and re-read `resourceUrl`.\n\n### Answering\n\nWe wait 10 seconds for an answer, 5 of them to connect, and each endpoint has at most two deliveries in flight at once. Answer `2xx` quickly and do the work afterwards."
    },
    {
      "name": "Webhook Events Account",
      "x-displayName": "Account & Billing",
      "description": "Your account suspended and reinstated, and its invoices, payments, credit notes, disputes, overdue reminders, expiring cards and price rise notices. See also [Account](#tag/Account)."
    },
    {
      "name": "Webhook Events Tickets",
      "x-displayName": "Support Tickets",
      "description": "Your support tickets. See also [Support Tickets](#tag/Support-Tickets)."
    },
    {
      "name": "Webhook Events Orders",
      "x-displayName": "Orders & Appointments",
      "description": "Your data orders and their technician appointments. See also [Orders](#tag/Data-Orders)."
    },
    {
      "name": "Webhook Events Services",
      "x-displayName": "Services",
      "description": "Data services and SIP trunks going live, being suspended or resumed, and being disconnected; a cease the carrier has scheduled; and a data service's line test finishing or health report being ready."
    },
    {
      "name": "Webhook Events RADIUS",
      "x-displayName": "RADIUS Realms",
      "description": "Your PPPoE realm requests. See also [RADIUS](#tag/Data-RADIUS)."
    },
    {
      "name": "Webhook Events Outages",
      "x-displayName": "Network Outages",
      "description": "Outages and potential service degradation affecting your services. See also [Network Outages](#tag/Network-Outages)."
    },
    {
      "name": "Webhook Events Voice",
      "x-displayName": "Voice",
      "description": "Completed calls, voicemails, trunks going down and coming back, and caller ID authorisation decisions. See also [Voice](#tag/Voice), [SIP Trunks](#tag/SIP-Trunks) and [Caller ID Authorisations](#tag/Caller-ID-Authorisations)."
    },
    {
      "name": "Webhook Events Quotes",
      "x-displayName": "EE Quotes",
      "description": "Your Enterprise Ethernet fibre build quotes finishing at the carrier. See also [Quotes](#tag/Quotes)."
    },
    {
      "name": "Webhook Events Transit",
      "x-displayName": "IP Transit (Not Available Yet)",
      "description": "**Not available yet.** IP transit is not offered by API yet, so these events cannot be subscribed to and are never sent until it is. Blackholes placed, released and expired on your IP transit services. See also [Blackholes](#tag/IP-Transit-Blackholes)."
    },
    {
      "name": "Webhook Events End Users",
      "x-displayName": "End Users",
      "description": "Your end users created, changed, suspended and reactivated, an end user's spend reaching a tier of the monthly limit you set, an end user's dispute of your bill raised and decided, and the credit notes you issue to end users. See also [Spend Limits](#tag/End-User-Spend)."
    },
    {
      "name": "Webhook Events Usage",
      "x-displayName": "Credit & Usage",
      "description": "Credit warnings and call blocks for credit, your end users crossing their data allowance, and the usage alerts you set."
    },
    {
      "name": "Webhook Events SMS",
      "x-displayName": "SMS",
      "description": "Messages received on your numbers, and the outcome of messages you send. See also [SMS](#tag/SMS)."
    },
    {
      "name": "Webhook Events Fax",
      "x-displayName": "Fax",
      "description": "Faxes received on your numbers, and faxes sent or failed from your fax plans."
    },
    {
      "name": "Webhook Events Delegated Steps",
      "x-displayName": "Delegated Steps",
      "description": "A step you handed to a person by a one-use link, done by them. See also [Delegated Steps](#tag/Delegated-Steps)."
    },
    {
      "name": "Watch",
      "description": "Email a person when something you care about changes. The human counterpart to Webhooks, which send the same events to a machine."
    },
    {
      "name": "Search",
      "description": "Find a number, service, end user, ticket or invoice in one call, as the portal's header search does. Each type needs its own read scope."
    },
    {
      "name": "Address",
      "description": "Search nbn addresses and locations."
    },
    {
      "name": "Appointments",
      "description": "Reserve, change and cancel nbn appointments."
    },
    {
      "name": "Diagnostics",
      "description": "Run nbn diagnostic tests and read their results."
    },
    {
      "name": "Orders",
      "description": "Place and manage nbn product orders."
    },
    {
      "name": "Orders Delayed",
      "x-displayName": "Delayed Orders",
      "description": "Hold an nbn order for a later submit time, move the time, send it now or cancel it. Nothing is sent to nbn until the order submits."
    },
    {
      "name": "Outage",
      "description": "nbn outages at a location."
    },
    {
      "name": "Planning",
      "description": "nbn technology planning for a location."
    },
    {
      "name": "Product Inventory",
      "description": "Your nbn services."
    },
    {
      "name": "Product Qualification",
      "description": "Check whether an nbn order can proceed before placing it."
    },
    {
      "name": "Provisioning",
      "description": "Provision an nbn order's service."
    },
    {
      "name": "Quotes",
      "description": "nbn quotes for fibre build costs and Enterprise Ethernet."
    },
    {
      "name": "Sales",
      "description": "nbn sales leads for a location."
    },
    {
      "name": "Service Health",
      "description": "The health of an nbn service."
    },
    {
      "name": "Service Qualification",
      "description": "nbn service qualification for a location."
    },
    {
      "name": "Opticomm Address",
      "x-displayName": "Address",
      "description": "Mirrors Opticomm NPIS `npis-address` v1.0.2."
    },
    {
      "name": "Opticomm Service Qualification",
      "x-displayName": "Service Qualification",
      "description": "Mirrors Opticomm NPIS `npis-service-qualification` v1.0.7."
    },
    {
      "name": "Opticomm Orders",
      "x-displayName": "Orders",
      "description": "Mirrors Opticomm NPIS `npis-product-order` v1.0.2."
    },
    {
      "name": "Opticomm Product Inventory",
      "x-displayName": "Product Inventory",
      "description": "Mirrors Opticomm NPIS `npis-product-inventory` v1.0.2."
    },
    {
      "name": "Opticomm Provisioning",
      "x-displayName": "Provisioning",
      "description": "Check Networks' legacy Opticomm provisioning lane — not an upstream mirror."
    },
    {
      "name": "Opticomm Appointments",
      "x-displayName": "Appointments",
      "description": "Mirrors Opticomm NPIS `npis-appointments` v1.0.1."
    },
    {
      "name": "Opticomm Diagnostics",
      "x-displayName": "Diagnostics",
      "description": "Mirrors Opticomm NPIS `npis-diagnostics` v1.0.0."
    },
    {
      "name": "Opticomm Service Health",
      "x-displayName": "Service Health",
      "description": "Mirrors Opticomm NPIS `npis-service-health` v1.0.0."
    },
    {
      "name": "Opticomm Network Outage",
      "x-displayName": "Network Outage",
      "description": "Mirrors Opticomm NPIS `npis-networkoutage` v1.0.0."
    },
    {
      "name": "Numbers",
      "description": "Your phone numbers: their labels, inbound routing and emergency address.\n\nAn Australian number (geographic, mobile, 1300, 1800 or 13) needs an emergency address before it can be routed or used as an outbound caller ID. Link one with `emergencyAddressId`.\n\nTo get a number: find the area for a customer's address (`GET /numbers/areas`), see what is available and its price (`GET /numbers/available`), hold one if you like (`POST /numbers/holds`), order it (`POST /numbers`) and read the order until it is set up (`GET /numbers/orders/{id}`). `POST /numbers/lookup` says who holds and who serves a number before you port it."
    },
    {
      "name": "Emergency Addresses",
      "description": "The addresses emergency services are given for your numbers: in Australia, the number's IPND listing. Create one, then link numbers to it with `PATCH /numbers/{number}`."
    },
    {
      "name": "SIP Trunks",
      "description": "Create and manage SIP trunks, their IP allow-lists and registrations.\n\n**Webhooks:** a trunk going live, suspended, resumed or disconnected sends [Services events](#tag/Webhook-Events-Services), and a trunk going down or coming back sends [Voice events](#tag/Webhook-Events-Voice)."
    },
    {
      "name": "Fax Plans",
      "description": "Fax is an ordered service. A number sends and receives faxes only while\nit is on a fax plan, and faxes go to Australian landlines, mobiles and\n13, 1300 and 1800 numbers only. Order a plan, put numbers on it, and\nauthorise the email addresses that may send as them. A number on a plan\nhas no separate monthly number charge."
    },
    {
      "name": "Fax",
      "description": "Send a fax, read your fax history, and set your fax domain and cover\npage. History is metadata only, never the documents.\n\n**Webhooks:** faxes received, sent or failed send [Fax events](#tag/Webhook-Events-Fax)."
    },
    {
      "name": "Voice",
      "description": "Call records (with filters, a summary and one call), the scheduled call\nrecord exports, live calls and hanging one up (never an emergency call).\n\n**Webhooks:** completed calls send [Voice events](#tag/Webhook-Events-Voice)."
    },
    {
      "name": "SMS",
      "description": "Send SMS and read your message history."
    },
    {
      "name": "Number Ports",
      "description": "Bring numbers to us from another carrier, and follow numbers leaving you. Request a port-in, confirm a mobile port's verification code, withdraw a port before its cutover is booked, and read every port with who it is waiting on and what has happened so far, as the portal's Number Ports pages do. A port is named by its `reference`; another account's answers 404. Each step also arrives as `order.statusChanged`."
    },
    {
      "name": "IP Transit Blackholes",
      "x-displayName": "Blackholes (Not Available Yet)",
      "description": "**Not available yet.** IP transit is not offered by API yet: these\nendpoints answer `404` and their `transit:*` scopes cannot be granted\nuntil it is.\n\nDrop the traffic to one address of an IP transit service, to stop an\nattack on it reaching you. The traffic is dropped at our border.\n\n**Webhooks:** a blackhole placed, released or expired sends [IP Transit events](#tag/Webhook-Events-Transit)."
    },
    {
      "name": "End-User Price Book",
      "x-displayName": "Price Book",
      "description": "What you charge your end users for each product: your default markup,\na price per product, a voice product's default call plan, and the\nproducts you sell that are not priced yet. Only for an account that\nbills its end users: every route answers 404 otherwise.\n\nPrices are ex-GST, as in the portal. GST is added on the end user's\ninvoice under your own tax settings."
    },
    {
      "name": "End-User Call Plans",
      "x-displayName": "Call Plans",
      "description": "Your own call plans for your end users: build one, edit its draft\ndestinations, and publish a version."
    },
    {
      "name": "End-User Service Billing",
      "x-displayName": "Service Billing",
      "description": "How one service you have given an end user bills: a call plan pinned to\nit, its own price and setup fee in place of your price book, or not\nbilled at all."
    },
    {
      "name": "End-User Charges",
      "x-displayName": "Own Charges",
      "description": "Your own recurring and one-off charges on an end user's bill, such as a\nsupport fee or a site visit."
    },
    {
      "name": "End-User Usage",
      "x-displayName": "Own Usage",
      "description": "Usage you rated yourself (managed-service hours, seats, a third-party\nfeed), billed on your end users' invoices."
    },
    {
      "name": "End-User Spend",
      "x-displayName": "Spend Limits",
      "description": "An end user's spend this month against its monthly limit."
    },
    {
      "name": "End-User Billing Settings",
      "x-displayName": "Billing Settings",
      "description": "The settings on every invoice to your end users, the payment reminder\nschedule, the wording of the notices they receive, and whether your\npayment gateways are working."
    },
    {
      "name": "End User Billing",
      "x-displayName": "Invoices and Payments",
      "description": "The invoices, credit notes and payments on your end users' accounts:\napprove, release and resend invoices, credit them, record payments,\npause reminders, issue a final invoice, and read an end user's ledger.\nOnly for an account that bills its end users: every route answers 404\notherwise."
    },
    {
      "name": "End User Cases",
      "x-displayName": "Disputes and Hardship",
      "description": "Your end users' billing disputes and financial hardship cases: review,\ncredit and close a dispute, and assess and close a hardship case, as\nthe portal does."
    },
    {
      "name": "Xero",
      "description": "Your own Xero organisation, which your end-user invoices, credit notes\nand payments are sent to. Connecting and disconnecting stay in the\nportal, as they need a browser sign-in to Xero."
    },
    {
      "name": "End Users",
      "description": "Your end users: your own customers, who use your services. Create and\nchange them, give them services, suspend, archive and restore them, and\nmanage their notes, representatives and logins to the end-user portal,\nas the End Users pages of the portal do.\n\nAn end user is named by its number (`endUser`), never an internal id.\nAn end user of another account answers 404, as an unknown number does.\n\nWhile a family violence safety record withholds an end user's contact\ndetails, every end-user call masks them, as the portal does."
    },
    {
      "name": "Residential Lines",
      "description": "Home phone lines: one SIP line each on our residential domain, billed as\na PAYG or Ultimate plan. Order one, move it between plans, and set its\ncall forwarding, Do Not Disturb, anonymous call reject, call waiting and\nvoicemail, as the portal's Residential Lines pages do.\n\nA line is named by its SIP username, the `trunk` that call records and\nnumbers carry with `trunkType: residentialLine`. A SIP trunk's username\nanswers 404 here, and a line's answers 404 under `/trunks`.\n\n**Webhooks:** a new voicemail sends [Voice events](#tag/Webhook-Events-Voice)."
    },
    {
      "name": "Caller ID Authorisations",
      "description": "Ask for the right to present a number your account does not hold as a\ntrunk's caller ID, with proof that you may use it. We review each\nrequest; until one is approved, setting that number as a trunk's\n`defaultCallerId` answers `422` with the code\n`caller_id_authorisation_required`.\n\n**Webhooks:** each decision sends `callerId.statusChanged` ([Voice events](#tag/Webhook-Events-Voice))."
    },
    {
      "name": "Call Recordings",
      "description": "The recordings of calls on trunks with call recording on: list them and\nfetch one with a download link that lasts 5 minutes. Recordings are call\ncontent, so they need their own scope, `recordings:read`, never\n`voice:read`; every fetch is audited. Recordings are deleted by our\nstaff only.\n\n**Webhooks:** a stored recording sends `voice.recording.ready` ([Voice events](#tag/Webhook-Events-Voice))."
    },
    {
      "name": "Delegated Steps",
      "description": "Hand one step of an order to a person with no login: the mobile\nnumber's holder who must confirm a port, or someone at the site who\nmust pick an install time. Name them and their email; they get a\none-use link to a page on your end-user portal, in your branding.\nThey pass a code sent to that email, then see only that step and do\nit once. Resend the link (a new link; the old one stops working) or\ncancel it. A link works for 7 days.\n\nThe page opens on your end-user portal, so an account without one\nanswers `403` with the code `no_end_user_portal_access`.\n\n**Webhooks:** a step done sends `delegation.used` ([Delegated Steps events](#tag/Webhook-Events-Delegated-Steps))."
    }
  ],
  "paths": {
    "/oauth/token": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "summary": "Request an Access Token",
        "operationId": "create_access_token",
        "security": [],
        "description": "Exchange your API Client credentials for an access token. This is the\nfirst call any integration makes, and the only one that does not carry a\nbearer token.\n\nTokens are valid for **one hour**. Request a new one when it expires;\nthere is no refresh token in the client-credentials flow.\n\n### Scopes\n\nAsk for the scopes the token needs, space-separated. A token requested\n**without** a `scope` carries none, and every endpoint refuses it with\n`403`. Request only the set each job needs, especially for anything\nrunning unattended.\n\nScopes outside your Client's allowance are dropped silently rather than\nrejected, so **the `scope` field in the response is the source of truth\nfor what your token can actually do**. Check it first when an endpoint\nanswers `403`; that error names the scope it wanted.\n\n### IP allowlist\n\nA Client with an IP allowlist gets tokens only from an address on it. A\nrequest from anywhere else answers `403` with code `ip_not_allowed`\nbefore the secret is checked, so the answer says nothing about whether\nthe secret was right.\n\n### Rotation and end dates\n\nWhile a rotation's overlap runs (`POST /account/api-keys/self/rotate`,\nor Roll Secret in the portal), both the old and the new secret are\naccepted here. A token the old secret mints then ends when the overlap\ndoes, even if that is under an hour away.\n\nA key may have an end date. Past it, the right secret answers `401` with\ncode `key_expired`; a wrong one answers as any wrong secret does. Tokens\nthe key minted before then stop at the end date too.\n\n### Rate limit\n\n**30 requests per minute for each `client_id` from one address**, so\nsystems behind one NAT or cloud address each keep their own, and 120 per\nminute from one address whatever the `client_id`. A token lasts an hour,\nso a client that reuses its token never comes near either.\n\n### OAuth apps\n\nA registered OAuth app uses this endpoint for the authorization code\ngrant (`grant_type=authorization_code`, with the `code` from the consent\nscreen, the same `redirect_uri` and the PKCE `code_verifier`) and to\nrefresh (`grant_type=refresh_token`). Both send the app's `client_id`\nand `client_secret`. The response then carries a `refresh_token` as well.\nEach refresh replaces the refresh token and the access token: use the\nnew ones. A refresh token lasts 30 days from the refresh that issued it,\nso an app that refreshes at least every 30 days stays connected, and one\nleft idle longer must be connected again. Sending a replaced refresh\ntoken again is treated as a stolen copy: it is refused, the app is\ndisconnected from the account with all its tokens, and the account's\nOwners are emailed. A refresh after the account revoked the app, or\nafter we disabled it, is refused.\nAn app's client cannot use `client_credentials`. See\n[OAuth Apps](https://help.checknetworks.tools/api/oauth-apps/).\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "grant_type"
                ],
                "properties": {
                  "grant_type": {
                    "type": "string",
                    "enum": [
                      "client_credentials",
                      "authorization_code",
                      "refresh_token"
                    ],
                    "description": "`client_credentials` for an API key. An OAuth app sends `authorization_code` to exchange a code, and `refresh_token` to refresh."
                  },
                  "code": {
                    "type": "string",
                    "description": "The code from the consent screen (`authorization_code` only). Lasts ten minutes and works once."
                  },
                  "redirect_uri": {
                    "type": "string",
                    "description": "The redirect URI the code was issued for (`authorization_code` only)."
                  },
                  "code_verifier": {
                    "type": "string",
                    "description": "The PKCE verifier whose S256 hash the authorise step was sent (`authorization_code` only)."
                  },
                  "refresh_token": {
                    "type": "string",
                    "description": "The app's latest refresh token (`refresh_token` only)."
                  },
                  "client_id": {
                    "type": "string",
                    "description": "Your API Client's id, from the Wholesale Portal. Required, here or as the user of an `Authorization: Basic` header (RFC 6749 2.3.1) with `client_secret` as its password."
                  },
                  "client_secret": {
                    "type": "string",
                    "description": "Your API Client's secret. Shown once when the client is created; if it is lost, rotate it in the portal. A production secret starts `cn_live_` and a sandbox one `cn_test_`. Required, here or in an `Authorization: Basic` header."
                  },
                  "scope": {
                    "type": "string",
                    "description": "Space-separated; ask for the scopes the token needs. A token requested without a scope carries none, and every endpoint refuses it with `403`.",
                    "example": "voice:read voice:update"
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "grant_type"
                ],
                "properties": {
                  "grant_type": {
                    "type": "string",
                    "enum": [
                      "client_credentials",
                      "authorization_code",
                      "refresh_token"
                    ]
                  },
                  "code": {
                    "type": "string"
                  },
                  "redirect_uri": {
                    "type": "string"
                  },
                  "code_verifier": {
                    "type": "string"
                  },
                  "refresh_token": {
                    "type": "string"
                  },
                  "client_id": {
                    "type": "string"
                  },
                  "client_secret": {
                    "type": "string"
                  },
                  "scope": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The access token.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "token_type": {
                      "type": "string",
                      "example": "Bearer"
                    },
                    "expires_in": {
                      "type": "integer",
                      "description": "Seconds until the token expires.",
                      "example": 3600
                    },
                    "access_token": {
                      "type": "string",
                      "description": "Send as `Authorization: Bearer <access_token>` on every other endpoint."
                    },
                    "refresh_token": {
                      "type": "string",
                      "description": "OAuth apps only. Send it with `grant_type=refresh_token` for the next access token. It is replaced on every use and lasts 30 days from that use."
                    },
                    "scope": {
                      "type": "string",
                      "description": "Space-separated, and authoritative — the scopes this token actually carries, which may be narrower than requested.",
                      "example": "voice:read voice:update"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "x-summary": "Bad Request",
            "description": "The request is malformed or the grant is unsupported. Uses the OAuth2 error shape (RFC 6749), not this API's standard error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "unsupported_grant_type"
                    },
                    "error_description": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "x-summary": "Unauthorized",
            "description": "The client id or secret is wrong: the OAuth2 error shape (RFC 6749), not this API's standard error envelope. The right secret of a key past its end date answers in this API's standard error envelope instead, with code `key_expired`.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "error"
                      ],
                      "properties": {
                        "error": {
                          "type": "string",
                          "example": "invalid_client"
                        },
                        "error_description": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/Error"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "x-summary": "Forbidden",
            "description": "The request came from an address outside the Client's IP allowlist (`ip_not_allowed`). No token is issued. This API's standard error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/ping": {
      "get": {
        "tags": [
          "Authentication"
        ],
        "summary": "Check Your Token",
        "operationId": "ping",
        "security": [
          {
            "OAuth2": []
          }
        ],
        "description": ">**Required Scope(s):** none; any valid token\n\nThe first call to make with a new token, and the one to make when a call\nis refused: it answers `200` when the token and your API Client are good,\nand shows which key and account answered, the scopes the token actually\ncarries, the address we saw you call from, whether the key's IP allowlist\nis on, which environment answered and when the token expires. A token\nfrom a revoked client, or one issued before its secret was rotated, is\nrefused here exactly as on every other endpoint, with `403`.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The token is valid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "keyId",
                        "name",
                        "scopes",
                        "accountId",
                        "ip",
                        "ipAllowlistActive",
                        "environment",
                        "tokenExpiresAt"
                      ],
                      "properties": {
                        "keyId": {
                          "type": "string",
                          "description": "Your API Client's id, the `client_id` you requested the token with.",
                          "example": "9d6b2c1e-4f3a-4b8e-9c2d-1a7e5f3b8c40"
                        },
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Your API Client's name, as set in the Wholesale Portal.",
                          "example": "Provisioning Integration"
                        },
                        "scopes": {
                          "type": "array",
                          "description": "The scopes this token carries. A scope you requested but your Client is not allowed is not listed.",
                          "items": {
                            "type": "string"
                          },
                          "example": [
                            "data:read",
                            "voice:read"
                          ]
                        },
                        "accountId": {
                          "type": "string",
                          "description": "The account the key belongs to, its `clientNumber` on `GET /account`."
                        },
                        "ip": {
                          "type": "string",
                          "description": "The address we saw this call come from, as your IP allowlist is checked against.",
                          "example": "203.0.113.10"
                        },
                        "ipAllowlistActive": {
                          "type": "boolean",
                          "description": "Whether the key has an IP allowlist. When it does, only addresses on it may call or request tokens."
                        },
                        "environment": {
                          "type": "string",
                          "enum": [
                            "live",
                            "sandbox"
                          ],
                          "description": "Which environment answered. A production secret starts `cn_live_` and a sandbox one `cn_test_`."
                        },
                        "tokenExpiresAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "When this token expires. Request a new one before then."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/addresses/search": {
      "get": {
        "summary": "Search Addresses",
        "description": ">**Required Scope(s):** none; any valid token\n\nFinds Australian addresses in our copy of G-NAF, best match first. It\ndoes not call a carrier, so it is quick enough for type-ahead.\n\nSend some of the address in `q`, the structured parameters, or both. The\nunit, level and road parameters are matched with `q`. `localityName`,\n`stateTerritoryCode` and `postcode` must match exactly. You need `q` or\nat least one of the unit, level or road parameters.\n\nEach match carries its G-NAF id. Use it for the carrier step: for NBN,\n`GET /nbn/address/search?gnaf=`; for Opticomm, the match's `opticommOpcId`.\n",
        "operationId": "get_addresses_search",
        "security": [
          {
            "OAuth2": []
          }
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "description": "Free text, such as `12 smith st parramatta`."
          },
          {
            "name": "unitNumber",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 10
            }
          },
          {
            "name": "levelNumber",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 10
            }
          },
          {
            "name": "roadNumber",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 10
            }
          },
          {
            "name": "roadName",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "roadTypeCode",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 20
            },
            "description": "The road type, in full or abbreviated, such as `STREET` or `ST`."
          },
          {
            "name": "localityName",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "stateTerritoryCode",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "ACT",
                "NSW",
                "NT",
                "QLD",
                "SA",
                "TAS",
                "VIC",
                "WA"
              ]
            },
            "description": "Any letter case."
          },
          {
            "name": "postcode",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 10
            },
            "description": "How many matches to return."
          }
        ],
        "responses": {
          "200": {
            "x-summary": "Success",
            "description": "The matches, best first. An empty list when nothing matches.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "results"
                  ],
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AddressMatch"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Address Search"
        ]
      }
    },
    "/": {
      "get": {
        "tags": [
          "API"
        ],
        "summary": "Identify the API",
        "operationId": "get_api_root",
        "security": [],
        "description": "Names the service and its version, and points at this reference, its\nOpenAPI document and the token endpoint. It needs no token, so it is a\nsimple first check that you are talking to the right host.\n",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "service",
                    "version",
                    "documentation",
                    "openapi",
                    "token_endpoint"
                  ],
                  "properties": {
                    "service": {
                      "type": "string",
                      "example": "Check Networks API"
                    },
                    "version": {
                      "type": "string",
                      "example": "v2.0"
                    },
                    "documentation": {
                      "type": "string",
                      "description": "Path to this reference on the same host.",
                      "example": "/docs"
                    },
                    "openapi": {
                      "type": "string",
                      "description": "Path to this reference's OpenAPI document, bundled as JSON.",
                      "example": "/docs/openapi.json"
                    },
                    "token_endpoint": {
                      "type": "string",
                      "example": "/oauth/token"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/up": {
      "get": {
        "tags": [
          "API"
        ],
        "summary": "Health check",
        "operationId": "get_health",
        "security": [],
        "description": "Answers `200` while the API can serve requests, and `500` when it cannot.\nIt needs no token and does no work on your account, so it suits a load\nbalancer or uptime monitor. The body is a small HTML page, not JSON:\ncheck the status code only.\n",
        "responses": {
          "200": {
            "description": "The API is up.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "The API is not able to serve requests.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/account": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get Account",
        "operationId": "get_account",
        "security": [
          {
            "OAuth2": [
              "account:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** account:read\n\nUse this endpoint to get your Account Details. This can be handy for ensuring that we have the most up-to-date\ndetails on file for you.\n\nThe credit position (`amountOwed`, `creditLimit`, `creditUsed`, `availableCredit`, `creditUsedPercent`,\nand the deprecated `credit` or `balance`) and `billingEmail` in `billingDetails` are billing data: they\nare returned only when your token also holds **billing:read**. Without it, `billingDetails` carries only\n`accountType` and `currency`. The fields mean the same as on\n[Get Account Balance](#tag/Account/operation/get_account_balance).\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A JSON Object containing your Account Details.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "clientNumber": {
                          "description": "Your Client Number with Check Networks",
                          "type": "string"
                        },
                        "status": {
                          "description": "Your Current Account Status",
                          "type": "string",
                          "enum": [
                            "Active",
                            "Suspended",
                            "Terminated"
                          ]
                        },
                        "isSuspended": {
                          "description": "True while the account is suspended. A suspended account can read but not change anything: every write answers 403 with code `account_suspended` until it is restored.",
                          "type": "boolean"
                        },
                        "entityDetails": {
                          "description": "Your Legal Entity Details as recorded with Check Networks",
                          "type": "object",
                          "properties": {
                            "legalName": {
                              "description": "Your Entity's Legal Name",
                              "type": "string"
                            },
                            "businessName": {
                              "description": "Your Entity's Trading Name. Null when you trade under your legal name — it is not repeated here.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "abn": {
                              "description": "Your Entity's ABN - Only valid for AU Clients. Null when we hold none.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "acn": {
                              "description": "Your Entity's ACN - Only valid for AU Clients. Null when we hold none.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "entityType": {
                              "description": "Your Entity Type. Null when it is not recorded.",
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "address": {
                          "description": "Your Primary Address as we have it on file.",
                          "type": "object",
                          "properties": {
                            "address1": {
                              "description": "Address Line 1 for your Primary Address on File. Null when we hold no such line.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "address2": {
                              "description": "Address Line 2 for your Primary Address on File. Null when we hold no such line.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "address3": {
                              "description": "Address Line 3 for your Primary Address on File. Null when we hold no such line.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "locality": {
                              "description": "The City/Suburb for your Primary Address on File. Null when we hold no such line.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "state": {
                              "description": "The State for your Primary Address on File. Null when we hold no such line.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "postcode": {
                              "description": "The Postcode/Zip Code for your Primary Address on File. Null when we hold no such line.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "country": {
                              "description": "The Country for your Primary Address on File. Null when we hold no such line.",
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "billingAddress": {
                          "description": "The address printed on our invoices to you, in the same shape as `address`; every line is null when none is on file. Change it with [Update Billing Details](#tag/Account/operation/patch_account_billing_details). Returned only when your token also holds **billing:read**.",
                          "$ref": "#/components/schemas/AccountBillingAddress"
                        },
                        "billingContact": {
                          "description": "Your billing contact, where invoices and billing notices go. Each field is null when not on file. Returned only when your token also holds **billing:read**.",
                          "$ref": "#/components/schemas/AccountBillingContact"
                        },
                        "features": {
                          "description": "What your account may order and use, so a call that would be refused can be predicted from this read. An order is accepted only when its product is `true` in `orderable`, `orderChecksOutstanding` is empty and `ordersHeld` is false; otherwise every order answers 403.",
                          "type": "object",
                          "properties": {
                            "orderable": {
                              "description": "Each product and whether your account may order it. A product that is `false` answers 403 on its order routes; your account manager can enable it. A voice product that needs numbers is `false` while numbers are.",
                              "type": "object",
                              "properties": {
                                "trunk": {
                                  "type": "boolean",
                                  "description": "SIP trunks."
                                },
                                "numbers": {
                                  "type": "boolean",
                                  "description": "Numbers and porting."
                                },
                                "pbx": {
                                  "type": "boolean",
                                  "description": "Hosted PBX."
                                },
                                "residential": {
                                  "type": "boolean",
                                  "description": "Residential lines."
                                },
                                "data": {
                                  "type": "boolean",
                                  "description": "Data services and bundles."
                                },
                                "transit": {
                                  "type": "boolean",
                                  "description": "IP transit."
                                },
                                "vpn": {
                                  "type": "boolean",
                                  "description": "VPN."
                                }
                              }
                            },
                            "orderChecksOutstanding": {
                              "description": "The onboarding checks still to pass before your account may order anything. Empty when every check has passed or been waived.",
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "credit_check",
                                  "abn_verification",
                                  "kyc"
                                ]
                              }
                            },
                            "ordersHeld": {
                              "description": "True while every order is refused because your account is on hold: a hold on your outbound calls, or a suspension. `ordersHeldReason` says which. Contact support to have a hold reviewed.",
                              "type": "boolean"
                            },
                            "ordersHeldReason": {
                              "description": "Why orders are held, or null when they are not: `spend_velocity` (call spend rose unusually fast), `calling_pattern` (an unusual calling pattern), `credit` (over your credit limit) or `suspended`.",
                              "type": [
                                "string",
                                "null"
                              ],
                              "enum": [
                                "spend_velocity",
                                "calling_pattern",
                                "credit",
                                "suspended",
                                null
                              ]
                            },
                            "numberTypes": {
                              "description": "The number types a number order takes (the `type` of [Search Available Numbers](#tag/Numbers/operation/search_available_numbers)). Empty while numbers are not orderable.",
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "retailBilling": {
                              "description": "Your account bills its own end users. While false, the `retail:*` and `retail-cases:*` routes answer 404.",
                              "type": "boolean"
                            },
                            "endUserPortal": {
                              "description": "Your end users have their own portal on your hostname.",
                              "type": "boolean"
                            },
                            "fax": {
                              "description": "Fax to email and email to fax are offered.",
                              "type": "boolean"
                            },
                            "invoiceDisputes": {
                              "description": "Invoice disputes are offered, on our invoices and on your end users' bills.",
                              "type": "boolean"
                            }
                          }
                        },
                        "callerScopes": {
                          "description": "The scopes of the token making this call, and the scopes its API key may ask for. A call needing a scope outside `token` answers 403 with code `missing_scope`; one in `key` but not `token` needs a new token that asks for it.",
                          "type": "object",
                          "properties": {
                            "token": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "key": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "createdAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "When the account was opened, in UTC."
                        },
                        "updatedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "When the account's details last changed, in UTC."
                        },
                        "billingDetails": {
                          "oneOf": [
                            {
                              "title": "Prepaid Account",
                              "description": "Billing Details when you have a Prepaid Account. The credit position fields need billing:read.",
                              "type": "object",
                              "required": [
                                "accountType"
                              ],
                              "allOf": [
                                {
                                  "$ref": "#/components/schemas/CreditPosition"
                                }
                              ],
                              "properties": {
                                "accountType": {
                                  "type": "string",
                                  "enum": [
                                    "prepaid"
                                  ],
                                  "description": "Your Account Type"
                                },
                                "credit": {
                                  "type": "string",
                                  "deprecated": true,
                                  "description": "Your current Credit Balance, as a decimal string in dollars: `amountOwed` with its sign turned round. Deprecated: read `amountOwed`. Needs billing:read.",
                                  "example": "150.00"
                                },
                                "currency": {
                                  "type": "string",
                                  "description": "The currency of the amounts on your account.",
                                  "example": "AUD"
                                },
                                "billingEmail": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "email",
                                  "description": "The Billing Email linked to your account, where you receive notifications. Null when no billing contact has an address on file. Needs billing:read."
                                }
                              }
                            },
                            {
                              "title": "Postpaid Account",
                              "description": "Billing Details when you have a Postpaid Account. The credit position fields need billing:read.",
                              "type": "object",
                              "required": [
                                "accountType"
                              ],
                              "allOf": [
                                {
                                  "$ref": "#/components/schemas/CreditPosition"
                                }
                              ],
                              "properties": {
                                "accountType": {
                                  "type": "string",
                                  "enum": [
                                    "postpaid"
                                  ],
                                  "description": "Your Account Type"
                                },
                                "balance": {
                                  "type": "string",
                                  "deprecated": true,
                                  "description": "Your Current Account Balance, as a decimal string in dollars, the same as `amountOwed`. Deprecated: read `amountOwed`. Needs billing:read.",
                                  "example": "49.95"
                                },
                                "currency": {
                                  "type": "string",
                                  "description": "The currency of the amounts on your account.",
                                  "example": "AUD"
                                },
                                "billingEmail": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "email",
                                  "description": "The Billing Email linked to your account, where you receive notifications. Null when no billing contact has an address on file. Needs billing:read."
                                }
                              }
                            }
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/summary": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get Account Summary",
        "operationId": "get_account_summary",
        "security": [
          {
            "OAuth2": [
              "account:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** account:read\n\nThe figures on your portal dashboard in one call: how many trunks, numbers\nand data services you have, how many orders, tickets and outages are open,\nand what needs you. The numbers are the dashboard's own, from the same reads.\n\n`needsAttention` lists only the groups with something in them. Each entry's\n`link` opens the list filtered to exactly the rows it counted, or is null\nwhere there is no API list for that group yet.\n\n`endUser` (an end user's number) narrows every figure to that end user's\nservices, orders and tickets. Outages affect the whole network, so\n`openOutages` is your account's either way, and the port groups, which\nbelong to your account, are left out.\n",
        "parameters": [
          {
            "name": "endUser",
            "in": "query",
            "required": false,
            "description": "An end user's number. An unknown number answers 422.",
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "Your account's headline figures and what needs you.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "trunks",
                        "numbers",
                        "dataServices",
                        "openOrders",
                        "openTickets",
                        "openOutages",
                        "needsAttention"
                      ],
                      "properties": {
                        "trunks": {
                          "type": "integer",
                          "description": "SIP trunks (residential lines are not counted)."
                        },
                        "numbers": {
                          "type": "integer"
                        },
                        "dataServices": {
                          "type": "object",
                          "required": [
                            "total",
                            "byNetworkAndState"
                          ],
                          "properties": {
                            "total": {
                              "type": "integer"
                            },
                            "byNetworkAndState": {
                              "type": "array",
                              "description": "Your data services counted by network and state, largest first.",
                              "items": {
                                "type": "object",
                                "required": [
                                  "network",
                                  "state",
                                  "count"
                                ],
                                "properties": {
                                  "network": {
                                    "type": "string",
                                    "example": "nbn"
                                  },
                                  "state": {
                                    "type": "string",
                                    "example": "live"
                                  },
                                  "count": {
                                    "type": "integer"
                                  }
                                }
                              }
                            }
                          }
                        },
                        "openOrders": {
                          "type": "integer",
                          "description": "Every kind of order still in progress."
                        },
                        "openTickets": {
                          "type": "integer",
                          "description": "Open and pending support tickets."
                        },
                        "openOutages": {
                          "type": "integer",
                          "description": "Outages affecting your services that are not yet resolved."
                        },
                        "needsAttention": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "key",
                              "label",
                              "count",
                              "link"
                            ],
                            "properties": {
                              "key": {
                                "type": "string",
                                "enum": [
                                  "suspended",
                                  "failedHealthCheck",
                                  "ceasePending",
                                  "orderAwaitingAction",
                                  "portRejected",
                                  "portAwaitingCode",
                                  "numberMissingFromIpnd",
                                  "numberReleaseDeclined",
                                  "ipndAddressNotUpdated"
                                ]
                              },
                              "label": {
                                "type": "string",
                                "example": "Order Awaiting Action"
                              },
                              "count": {
                                "type": "integer"
                              },
                              "link": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The list filtered to this group, e.g. `/data/orders?needsAttention=orderAwaitingAction`.",
                                "example": "/data/services?needsAttention=suspended"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/notices": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "List Notices Sent",
        "operationId": "list_account_notices",
        "security": [
          {
            "OAuth2": [
              "account:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** account:read\n\nEvery notice we sent you and your end users (invoices, statements, payment\nnotices, overdue and suspension warnings, outage notices and others), newest\nfirst, with what happened to it. Use it to answer \"I never got that notice\":\nwhether it went, to which address, and whether it bounced.\n\nPaged like every list: by `page`, or by cursor, passing the `nextCursor` of\none page as `cursor` for the next. A notice sent while you walk by cursor\nnever shifts a row into or out of a page. `nextCursor` is null on the last\npage.\n",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "Sent at or after this date or time.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "Sent at or before this date or time. A date alone covers the whole day.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "description": "Only notices of this kind, e.g. `overdue_notice`.",
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "queued",
                "sent",
                "failed",
                "delivered",
                "bounced",
                "suppressed"
              ]
            }
          },
          {
            "name": "endUser",
            "in": "query",
            "required": false,
            "description": "Only notices sent to this end user (its number). An unknown number answers 422.",
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "One page of notices.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "perPage",
                    "nextCursor",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer",
                      "description": "Notices matching the query. Absent on a cursor page."
                    },
                    "page": {
                      "type": "integer",
                      "description": "The page returned. Absent on a cursor page."
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as `cursor` for the next page; `null` on the last page or a page that was not full."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Notice"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/notices/{noticeId}": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get a Notice Sent",
        "operationId": "get_account_notice",
        "security": [
          {
            "OAuth2": [
              "account:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** account:read\n\nOne notice we sent you or one of your end users, by its `id`.\n",
        "parameters": [
          {
            "name": "noticeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The notice.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/Notice"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/balance": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get Account Balance",
        "operationId": "get_account_balance",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nUse this endpoint to see where your account stands with us: what you owe,\nyour credit limit, how much of it is used and how much is left. Your\nsystem can warn before your services are held.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A JSON Object containing your Current Account Balance.\n\n`amountOwed` means the same on every account: positive when you owe us,\nnegative when you hold credit with us. It is your **billed** position:\ninvoices raised, less payments and credits applied, with GST.\n\n`creditUsed`, `availableCredit` and `creditUsedPercent` are your credit\nline as credit control reads it and the portal dashboard shows it:\nwithout GST, and credit used is what you owe plus usage not yet\ninvoiced. Your services are held when `availableCredit` reaches zero.\n\n`unbilledUsage` is metered usage that has **not** been invoiced yet,\nwith GST: calls and messages since your last invoice. It is not in\n`amountOwed`. On a postpaid account, `amountOwed` plus `unbilledUsage`\nis roughly what you would owe if invoiced now. On a prepaid account,\nyour credit left after that usage is `unbilledUsage` taken from the\ncredit you hold (`-amountOwed`). Read `availableCredit` for the figure\nthat holds your services.\n\n`unbilledUsage` is null when the figure is not available. Treat null as\n**unknown**, never as zero.\n",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/CreditPosition"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "balance": {
                              "type": "string",
                              "deprecated": true,
                              "description": "The amount owed on a postpaid account, and the credit left on a prepaid one, so its meaning turns with the account type. Deprecated: read `amountOwed` and `accountType`.",
                              "example": "49.95"
                            },
                            "currency": {
                              "type": "string",
                              "description": "The currency of every amount here.",
                              "example": "AUD"
                            },
                            "unbilledUsage": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Metered usage not yet invoiced, with GST, as a decimal string in dollars. Always present; null when the figure is unavailable. Not in `amountOwed`.",
                              "example": "12.50"
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/invoices": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "List Invoices",
        "operationId": "list_invoices",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nReturns a paginated list of invoices for your account, ordered newest first.\n`q` searches the invoice number.\n\n### Bulk export\n\nFor bulk pulls, set `format=csv` or `format=ndjson` to stream the **entire**\nmatching result set (the `status`, `number` and date filters still apply) as a single download\ninstead of paged JSON. `page`/`perPage` are ignored in this mode. `csv`\nreturns `text/csv` (header row + one row per invoice); `ndjson` returns\n`application/x-ndjson` (one JSON object per line, each identical to a\n`results[]` item). An unrecognised `format` returns `422`.\n",
        "parameters": [
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "Bulk export format. Omit for paged JSON; `csv` or `ndjson` streams the full matching result set as a download.\n",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "ndjson"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by the status an invoice shows; several, comma-separated (`status=unpaid,overdue`). Case does not matter. Any other value is `422`. `unpaid` is issued and not yet overdue; `overdue` is issued and due before today on the invoice's own calendar, so no invoice is both.",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "paid",
                  "unpaid",
                  "overdue",
                  "void"
                ]
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Order by this field, `-` in front for descending. An unknown field is `422`.",
            "schema": {
              "type": "string",
              "enum": [
                "issuedAt",
                "-issuedAt",
                "dueDate",
                "-dueDate",
                "total",
                "-total"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Q"
          },
          {
            "$ref": "#/components/parameters/UpdatedSince"
          },
          {
            "$ref": "#/components/parameters/CreatedFrom"
          },
          {
            "$ref": "#/components/parameters/CreatedTo"
          },
          {
            "name": "number",
            "in": "query",
            "required": false,
            "description": "Invoices whose number contains this text, as the portal's invoice search matches it. Not case-sensitive.",
            "schema": {
              "type": "string",
              "example": "000123"
            }
          },
          {
            "name": "issuedFrom",
            "in": "query",
            "required": false,
            "description": "Invoices issued on or after this date, YYYY-MM-DD. The day is the one the invoice shows: on the time zone it was cut in (its `timezone`). Send `CN-Time-Zone` to read the date on your own zone instead. Leave either end open. A date that is not a real date, or a start after the end, answers `422`.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "issuedTo",
            "in": "query",
            "required": false,
            "description": "Invoices issued on or before this date, the whole day included.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A paginated JSON object containing invoices.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer",
                      "description": "Total number of invoices matching the query."
                    },
                    "page": {
                      "type": "integer",
                      "description": "The page number returned."
                    },
                    "perPage": {
                      "type": "integer",
                      "description": "The number of invoices per page."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BillingInvoice"
                      }
                    }
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string",
                  "description": "Present only when `format=csv`. The full matching result set as CSV — a header row followed by one row per invoice, with the same columns as a `results[]` item.\n"
                }
              },
              "application/x-ndjson": {
                "schema": {
                  "type": "string",
                  "description": "Present only when `format=ndjson`. The full matching result set as newline-delimited JSON — one object per line, each identical to a `results[]` item.\n"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/invoices/{invoiceId}": {
      "parameters": [
        {
          "name": "invoiceId",
          "in": "path",
          "required": true,
          "description": "The invoice's `id`, as `GET /account/invoices` gives it.",
          "schema": {
            "type": "string"
          },
          "example": "01jd3z6r9k2m4n8p0q5s7t1v3w"
        }
      ],
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get Invoice",
        "operationId": "get_invoice",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nReturns the full details for a single invoice: what is paid, owed and held\nby a dispute, any card or direct debit charge still processing, and every\nline with the service, end user and period it bills and the rows behind it.\n\n`amountDue` is what is still owed now. While `amountInFlight` is more than\nzero, a charge is already under way: do not pay the same invoice again in\nthe portal.\n\n### One invoice as CSV\n\nSet `format=csv` for the invoice's lines as `text/csv`, one row per line,\nwith the invoice number and dates on each row and the money as\n`unitPriceExGst`, `unitPriceGst`, `unitPriceIncGst`, `totalExGst`,\n`totalGst` and `totalIncGst`. The lines' `totalIncGst` add up to the\ninvoice's. No cell begins with a character a spreadsheet reads as a\nformula. Any other `format` returns `422`.\n",
        "parameters": [
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "Omit for JSON; `csv` for the lines as a spreadsheet.",
            "schema": {
              "type": "string",
              "enum": [
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A JSON object containing the invoice and its line items.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/BillingInvoice"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "tax": {
                              "type": "string",
                              "deprecated": true,
                              "description": "The GST on this invoice's new charges. Deprecated: read `totalGst`.",
                              "example": "10.00"
                            },
                            "amountInFlight": {
                              "type": "string",
                              "description": "The card and direct debit charges on this invoice still processing, with GST. They are not in your balance yet. `0.00` once each settles or fails.",
                              "example": "0.00"
                            },
                            "charges": {
                              "type": "array",
                              "description": "Every card and direct debit charge on this invoice, newest first.",
                              "items": {
                                "$ref": "#/components/schemas/PaymentCharge"
                              }
                            },
                            "lineItems": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/BillingInvoiceLine"
                              }
                            },
                            "invoiceGroups": {
                              "type": "array",
                              "description": "The invoice's group sections as issued, in name order with Other last, each with its PO, cost centre and subtotal. Empty when no line carries a group, label, PO or cost centre.",
                              "items": {
                                "$ref": "#/components/schemas/InvoiceGroupSection"
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string",
                  "description": "Present only when `format=csv`. A header row, then one row per line. When the invoice has group sections, the lines come group by group, each group followed by a row whose `rowType` is `groupSubtotal` carrying the group's subtotal in the total columns; every other row's `rowType` is `line`."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/invoices/{invoiceId}/pdf": {
      "parameters": [
        {
          "name": "invoiceId",
          "in": "path",
          "required": true,
          "description": "The invoice's `id`, as `GET /account/invoices` gives it.",
          "schema": {
            "type": "string"
          },
          "example": "01jd3z6r9k2m4n8p0q5s7t1v3w"
        }
      ],
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Download Invoice PDF",
        "operationId": "get_invoice_pdf",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nStreams the invoice as a PDF document — the same document rendered in the\nportal. Draft invoices and invoices outside your account return `404`.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The invoice PDF.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/credit-notes": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "List Credit Notes",
        "operationId": "list_credit_notes",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nReturns a paginated list of credit notes issued against your account,\nordered newest first. Only issued credit notes are returned. `q` searches\nthe credit note number.\n\n### Bulk export\n\nFor bulk pulls, set `format=csv` or `format=ndjson` to stream the **entire**\nresult set as a single download instead of paged JSON. `page`/`perPage` are\nignored in this mode. `csv` returns `text/csv` (header row + one row per\ncredit note); `ndjson` returns `application/x-ndjson` (one JSON object per\nline, each identical to a `results[]` item). An unrecognised `format`\nreturns `422`.\n",
        "parameters": [
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "Bulk export format. Omit for paged JSON; `csv` or `ndjson` streams the full result set as a download.\n",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "ndjson"
              ]
            }
          },
          {
            "name": "number",
            "in": "query",
            "required": false,
            "description": "Credit notes whose number contains this text. Not case-sensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "issuedFrom",
            "in": "query",
            "required": false,
            "description": "Credit notes issued on or after this date, YYYY-MM-DD. The day is the one the credit note shows: on the time zone it was cut in. Send `CN-Time-Zone` to read the date on your own zone instead. A date that is not a real date, or a start after the end, answers `422`.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "issuedTo",
            "in": "query",
            "required": false,
            "description": "Credit notes issued on or before this date, the whole day included.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Order by this field, `-` in front for descending. An unknown field is `422`.",
            "schema": {
              "type": "string",
              "enum": [
                "issuedAt",
                "-issuedAt",
                "total",
                "-total"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Q"
          },
          {
            "$ref": "#/components/parameters/UpdatedSince"
          },
          {
            "$ref": "#/components/parameters/CreatedFrom"
          },
          {
            "$ref": "#/components/parameters/CreatedTo"
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A paginated JSON object containing credit notes.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer",
                      "description": "Total number of credit notes matching the query."
                    },
                    "page": {
                      "type": "integer",
                      "description": "The page number returned."
                    },
                    "perPage": {
                      "type": "integer",
                      "description": "The number of credit notes per page."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The credit note's id, as `GET /account/credit-notes/{creditNoteId}` takes it. Opaque: compare it, never parse it.",
                            "example": "01jd3z8b2c4d6f8g0h2j4k6m8n"
                          },
                          "createdAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the credit note was created, in UTC."
                          },
                          "updatedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the credit note last changed, in UTC."
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "credit_note"
                            ],
                            "description": "Always `credit_note`. An explicit discriminator so you can tell this row apart from an invoice row (which carries `type: invoice`) without tracking which endpoint it came from — `total` is an unsigned magnitude on both, so subtract credit-note totals rather than add them when computing an AR position."
                          },
                          "creditNoteNumber": {
                            "type": "string",
                            "example": "CN-000045"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "issued"
                            ]
                          },
                          "total": {
                            "type": "string",
                            "deprecated": true,
                            "description": "Credit-note total in dollars (inc. GST), as a decimal string. Deprecated: read `totalIncGst`.",
                            "example": "12.50"
                          },
                          "totalExGst": {
                            "type": "string",
                            "example": "11.36"
                          },
                          "totalGst": {
                            "type": "string",
                            "example": "1.14"
                          },
                          "totalIncGst": {
                            "type": "string",
                            "example": "12.50"
                          },
                          "currency": {
                            "type": "string",
                            "description": "The currency of the credit-note amounts.",
                            "example": "AUD"
                          },
                          "reason": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The reason the credit note was issued, if recorded."
                          },
                          "invoiceNumber": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The number of the invoice this credit note corrects, if linked.",
                            "example": "INV-000123"
                          },
                          "issuedAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string",
                  "description": "Present only when `format=csv`. The full result set as CSV — a header row followed by one row per credit note, with the same columns as a `results[]` item.\n"
                }
              },
              "application/x-ndjson": {
                "schema": {
                  "type": "string",
                  "description": "Present only when `format=ndjson`. The full result set as newline-delimited JSON — one object per line, each identical to a `results[]` item.\n"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/credit-notes/{creditNoteId}": {
      "parameters": [
        {
          "name": "creditNoteId",
          "in": "path",
          "required": true,
          "description": "The credit note's `id`, as `GET /account/credit-notes` gives it.",
          "schema": {
            "type": "string"
          },
          "example": "01jd3z8b2c4d6f8g0h2j4k6m8n"
        }
      ],
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get Credit Note",
        "operationId": "get_credit_note",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nReturns the full details for a single credit note including its lines.\nCredit notes that are not yet issued, or outside your account, return `404`.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A JSON object containing the credit note and its lines.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "The credit note's id. It is opaque, so compare it and never parse it.",
                          "example": "01jd3z8b2c4d6f8g0h2j4k6m8n"
                        },
                        "createdAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "When the credit note was created, in UTC."
                        },
                        "updatedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "When the credit note last changed, in UTC."
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "credit_note"
                          ],
                          "description": "Always `credit_note`, the discriminator matching the `type` field on invoice rows."
                        },
                        "creditNoteNumber": {
                          "type": "string",
                          "example": "CN-000045"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "issued"
                          ]
                        },
                        "total": {
                          "type": "string",
                          "deprecated": true,
                          "description": "Credit-note total with GST. Deprecated: read `totalIncGst`.",
                          "example": "12.50"
                        },
                        "tax": {
                          "type": "string",
                          "deprecated": true,
                          "description": "The GST. Deprecated: read `totalGst`.",
                          "example": "1.14"
                        },
                        "totalExGst": {
                          "type": "string",
                          "example": "11.36"
                        },
                        "totalGst": {
                          "type": "string",
                          "example": "1.14"
                        },
                        "totalIncGst": {
                          "type": "string",
                          "example": "12.50"
                        },
                        "currency": {
                          "type": "string",
                          "description": "The currency of the credit-note amounts.",
                          "example": "AUD"
                        },
                        "reason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The reason the credit note was issued, if recorded."
                        },
                        "invoiceNumber": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The number of the invoice this credit note corrects, if linked.",
                          "example": "INV-000123"
                        },
                        "issuedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "lineItems": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "description": {
                                "type": "string",
                                "example": "Rating correction — Mobile calls, January 2024"
                              },
                              "quantity": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "total": {
                                "type": "string",
                                "deprecated": true,
                                "description": "Line credit with GST. Deprecated: read `totalIncGst`.",
                                "example": "12.50"
                              },
                              "tax": {
                                "type": "string",
                                "deprecated": true,
                                "description": "The GST. Deprecated: read `totalGst`.",
                                "example": "1.14"
                              },
                              "totalExGst": {
                                "type": "string",
                                "example": "11.36"
                              },
                              "totalGst": {
                                "type": "string",
                                "example": "1.14"
                              },
                              "totalIncGst": {
                                "type": "string",
                                "example": "12.50"
                              },
                              "currency": {
                                "type": "string",
                                "description": "The currency of the line amounts.",
                                "example": "AUD"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/credit-notes/{creditNoteId}/pdf": {
      "parameters": [
        {
          "name": "creditNoteId",
          "in": "path",
          "required": true,
          "description": "The credit note's `id`, as `GET /account/credit-notes` gives it.",
          "schema": {
            "type": "string"
          },
          "example": "01jd3z8b2c4d6f8g0h2j4k6m8n"
        }
      ],
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Download Credit Note PDF",
        "operationId": "get_credit_note_pdf",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nStreams the credit note as a PDF document — the same document rendered in\nthe portal. Credit notes that are not yet issued, or outside your account,\nreturn `404`.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The credit-note PDF.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/invoices/{invoiceId}/lines/{lineId}/detail": {
      "parameters": [
        {
          "name": "invoiceId",
          "in": "path",
          "required": true,
          "description": "The invoice's `id`.",
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "lineId",
          "in": "path",
          "required": true,
          "description": "The line's `id` (a uuid), from the invoice's `lineItems`.",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "List Invoice Line Detail",
        "operationId": "list_invoice_line_detail",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nEvery row behind one invoice line, a page at a time: the calls a usage\nline charges, or a transit burst settlement. The invoice itself carries the\nfirst 50 in each line's `detail`; a line with more gives this route as its\n`detailHref`.\n",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A page of the line's rows.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BillingLineDetailRow"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/payments": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "List Payments",
        "operationId": "list_payments",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nReturns a paginated list of the payments received on your account, newest\nfirst, each with the invoices it settled and how much of each. Use it with\n[List Invoices](#tag/Account/operation/list_invoices) and\n[List Credit Notes](#tag/Account/operation/list_credit_notes) to reconcile\nwhat you paid against what you were invoiced.\n\nA payment later dishonoured by your bank stays in the list with\n`status: reversed`, so the money's return is visible too. Its `invoices`\nare the ones it settled before the reversal.\n\nTo walk every payment while new ones arrive, follow `nextCursor`: pass it\nback as `cursor` until it is `null`. `q` searches the payment reference.\n\n### Bulk export\n\nFor bulk pulls, set `format=csv` or `format=ndjson` to stream the **entire**\nresult set as a single download instead of paged JSON. `page`/`perPage` are\nignored in this mode. `csv` returns `text/csv` (header row + one row per\npayment, with `invoices` as a JSON array in its cell); `ndjson` returns\n`application/x-ndjson` (one JSON object per line, each identical to a\n`results[]` item). An unrecognised `format` returns `422`.\n",
        "parameters": [
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "Bulk export format. Omit for paged JSON; `csv` or `ndjson` streams the full result set as a download.\n",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "ndjson"
              ]
            }
          },
          {
            "name": "paidFrom",
            "in": "query",
            "required": false,
            "description": "Payments with a value date on or after this date, YYYY-MM-DD on your bill's calendar: your account's time zone, or your own when you send `CN-Time-Zone`. Applies to the exports too. A date that is not a real date, or a start after the end, answers `422`.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "paidTo",
            "in": "query",
            "required": false,
            "description": "Payments with a value date on or before this date, the whole day included.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by the status a payment shows; both, comma-separated, is every payment. Case does not matter. Any other value is `422`.",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "applied",
                  "reversed"
                ]
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Order by this field, `-` in front for descending, in place of newest first. A sorted list has no cursor (`nextCursor` is `null`). An unknown field is `422`.",
            "schema": {
              "type": "string",
              "enum": [
                "paidAt",
                "-paidAt",
                "amount",
                "-amount"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Q"
          },
          {
            "$ref": "#/components/parameters/UpdatedSince"
          },
          {
            "$ref": "#/components/parameters/CreatedFrom"
          },
          {
            "$ref": "#/components/parameters/CreatedTo"
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A paginated JSON object containing payments.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer",
                      "description": "Total number of payments matching the query. Absent on a cursor page."
                    },
                    "page": {
                      "type": "integer",
                      "description": "The page number returned. Absent on a cursor page."
                    },
                    "perPage": {
                      "type": "integer",
                      "description": "The number of payments per page."
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as `cursor` for the next page; `null` on the last page, a page that was not full, or a sorted list."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BillingPayment"
                      }
                    }
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string",
                  "description": "Present only when `format=csv`. The full result set as CSV — a header row followed by one row per payment, with the same columns as a `results[]` item.\n"
                }
              },
              "application/x-ndjson": {
                "schema": {
                  "type": "string",
                  "description": "Present only when `format=ndjson`. The full result set as newline-delimited JSON — one object per line, each identical to a `results[]` item.\n"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/payments/{paymentId}": {
      "parameters": [
        {
          "name": "paymentId",
          "in": "path",
          "required": true,
          "description": "The payment's `id`, as on List Payments.",
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get Payment",
        "operationId": "get_payment",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nOne payment we received, with the invoices it settled. Another account's\npayment answers `404`.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The payment.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/BillingPayment"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/account/payments/{paymentId}/receipt": {
      "parameters": [
        {
          "name": "paymentId",
          "in": "path",
          "required": true,
          "description": "The payment's `id`, as on List Payments.",
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get Payment Receipt",
        "operationId": "get_payment_receipt",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nOur receipt for one payment as a PDF, the same one the portal's invoice\npage links to: the amount, the date received, the method and reference,\nand the invoices it was applied to. A payment not yet applied to an\ninvoice says it is held as credit. A reversed payment is marked reversed.\nAnother account's payment answers `404`.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The receipt.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/account/pricing": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get Pricing",
        "operationId": "get_account_pricing",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nUse this endpoint to get your Current Wholesale Pricing.\n\n**Note:** This pricing is the price that you pay and should not be disclosed to customers or publicly.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A JSON Object containing your Current Wholesale Pricing.\n",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "products": {
                          "type": "object",
                          "description": "A JSON Object containing separate arrays for each Product Type your account has access to.",
                          "additionalProperties": {
                            "x-additionalPropertiesName": "range",
                            "type": "array",
                            "description": "An Array of Products that you have access to within the Product Type.",
                            "items": {
                              "$ref": "#/components/schemas/PricingItem"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/pricing/call-rates": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "List Call Rates",
        "operationId": "list_account_call_rates",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nWhat you pay us per call by destination, from the rate card on your\naccount, as the portal's Pricing page lists it. One row per destination\nwith the dialling prefixes it covers. With no rate card, `results` is\nempty. Set `format=csv` for one row per prefix, as the portal's CSV\nexport gives it.\n\n**Note:** This pricing is the price that you pay and should not be disclosed to customers or publicly.\n",
        "parameters": [
          {
            "name": "region",
            "in": "query",
            "required": false,
            "description": "`au_nz` (the default) or `international`. Any other value answers `400`.",
            "schema": {
              "type": "string",
              "enum": [
                "au_nz",
                "international"
              ]
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Destinations whose name or prefix contains this text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "csv"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A page of destinations.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "destination": {
                            "type": "string",
                            "example": "Australia Mobile"
                          },
                          "prefixes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "perMinuteExGst": {
                            "type": "string",
                            "description": "To 4 decimal places.",
                            "example": "0.0800"
                          },
                          "perMinuteGst": {
                            "type": "string"
                          },
                          "perMinuteIncGst": {
                            "type": "string"
                          },
                          "connectionFeeExGst": {
                            "type": "string"
                          },
                          "connectionFeeGst": {
                            "type": "string"
                          },
                          "connectionFeeIncGst": {
                            "type": "string"
                          },
                          "minimumChargeExGst": {
                            "type": "string"
                          },
                          "minimumChargeGst": {
                            "type": "string"
                          },
                          "minimumChargeIncGst": {
                            "type": "string"
                          },
                          "currency": {
                            "type": "string"
                          },
                          "firstIncrementSeconds": {
                            "type": "integer"
                          },
                          "subsequentIncrementSeconds": {
                            "type": "integer"
                          },
                          "billing": {
                            "type": "string",
                            "description": "The increments as the portal writes them.",
                            "example": "60/60"
                          }
                        }
                      }
                    }
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/account/pricing/ranges": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get Ranges",
        "operationId": "get_account_pricing_ranges",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nUse this endpoint to get a list of all Product Ranges you have access to.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A JSON Array containing the Product Ranges you have access to\n",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "description": "An array containing the names of the Product Ranges you have access to",
                      "items": {
                        "type": "string",
                        "description": "The name of the Product Range"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/pricing/{range}": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get Range Pricing",
        "operationId": "get_account_range_pricing",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nUse this endpoint to get your Current Wholesale Pricing for a Specific Range.\n\n**Note:** This pricing is the price that you pay and should not be disclosed to customers or publicly.\n",
        "parameters": [
          {
            "name": "range",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Name of the Product Range you want Pricing for. This can be obtained from the Get Ranges Endpoint."
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A JSON Object containing your Current Wholesale Pricing.\n",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "description": "An Array of Products that you have access to within the Product Range.",
                      "items": {
                        "$ref": "#/components/schemas/PricingItem"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/users": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get All Users",
        "operationId": "list_account_users",
        "security": [
          {
            "OAuth2": [
              "account:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** account:read\n\nUse this endpoint to get a paginated list of users linked to your Wholesale Account.\n\nThis list contains your staff logins, not Client Logins.\n\nOrdered by name. `q` searches name and email.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Order by this field, `-` in front for descending. An unknown field is `422`.",
            "schema": {
              "type": "string",
              "enum": [
                "name",
                "-name",
                "email",
                "-email",
                "createdAt",
                "-createdAt"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Q"
          },
          {
            "$ref": "#/components/parameters/UpdatedSince"
          },
          {
            "$ref": "#/components/parameters/CreatedFrom"
          },
          {
            "$ref": "#/components/parameters/CreatedTo"
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A paginated JSON Object containing the users on your Wholesale Account.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer",
                      "description": "Total number of users linked to your Wholesale Account."
                    },
                    "page": {
                      "type": "integer",
                      "description": "The page number returned."
                    },
                    "perPage": {
                      "type": "integer",
                      "description": "The number of users per page."
                    },
                    "results": {
                      "type": "array",
                      "description": "Array containing individual objects per user.",
                      "items": {
                        "$ref": "#/components/schemas/AccountUser"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Add New User",
        "operationId": "create_account_user",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "account:create"
            ]
          }
        ],
        "description": ">**Required Scope(s):** account:create\n\nUse this endpoint to invite a new user to your Wholesale Account, as the\nUsers page in the portal does.\n\nThis is to be used to add new staff, not client accounts.\n\nThe person is sent the normal invitation email. No login exists until\nthey accept it, and they choose their own password when they do; a\n`password` in the request is refused with `422`. The invitation lasts 72\nhours. Inviting the same address again replaces the open invitation.\n\nAn `Idempotency-Key` is required, so a retry returns the first answer\ninstead of sending a second email that cancels the link in the first.\nWithout it the request answers `400`. A client written before 2.0.0-pre.3,\nwhen the key was optional here, must now send it.\n\n`role` is `admin`, `billing` or `readonly`. An API key assigns what an\nAdministrator may, so it can never make an Owner. The account's Owners\nare emailed when a user is invited, naming the API key that made the\nrequest. Only an Owner can grant a key the `account:create` scope.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "firstName",
                  "lastName",
                  "email",
                  "role"
                ],
                "properties": {
                  "firstName": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "The first name of the person to invite."
                  },
                  "lastName": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "The last name of the person to invite."
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 160,
                    "description": "The email address to invite. It must not already be in use by another login."
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "admin",
                      "billing",
                      "readonly"
                    ],
                    "description": "What the user may do: `admin` manages the account, its services, users and API keys; `billing` sees invoices and payments; `readonly` reads only."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "x-summary": "Accepted",
            "description": "The invitation is sent. The user exists once the invitation is accepted, and then appears in `GET /account/users` with its own `id`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "description": "The pending invitation. It has no user id yet: the login, with its own `id` in `GET /account/users`, exists once the invitation is accepted.",
                      "properties": {
                        "inviteId": {
                          "type": "string",
                          "format": "uuid",
                          "description": "The invitation's id, as `/account/invites/{inviteId}` takes it to resend or revoke it."
                        },
                        "email": {
                          "type": "string",
                          "format": "email"
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "admin",
                            "billing",
                            "readonly"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending"
                          ],
                          "description": "Always `pending`; the invitation has not been accepted."
                        },
                        "expiresAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "When the invitation lapses unaccepted, in UTC."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/users/{userId}": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get Existing User",
        "operationId": "get_account_user",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID Number of the User as defined in Check Networks Systems. This can be obtained from the Get Users Endpoint"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "account:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** account:read\n\nUse this endpoint to get the details of a specific user linked to your Wholesale Account.\n\nThis is used for collecting Staff Users, not Client Users.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A JSON Object containing the details of the specified user on your Wholesale Account.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/AccountUser"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "Users"
        ],
        "summary": "Modify Existing User",
        "operationId": "update_account_user",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID Number of the User as defined in Check Networks Systems. This can be obtained from the Get Users Endpoint"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "account:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** account:update\n\nUse this endpoint to change the name or role of a user on your Wholesale Account.\n\nSupply the new name or role for the user to be updated. A request to update without any changes will be rejected.\n\nA key acts as an Admin: it may give a user the Admin, Billing or Read\nOnly role, never Owner or Partner, and cannot change an Owner. Any\nchange to an Owner (name, email or role) is `403` with `error.code`\n`owner_protected`; a role it may not give is `422`, as in the portal.\nNames and role change together or not at all.\n\nA login's email address cannot be changed through the API: its own user\nchanges it in the portal. A request that sends `email` is refused with\n`422` (`403 owner_protected` for an Owner).\n\nThis is to be used to update staff accounts, not client accounts.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "firstName": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "The first name of the user to be modified."
                  },
                  "lastName": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "The last name of the user to be modified."
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "admin",
                      "billing",
                      "readonly"
                    ],
                    "description": "The user's new role."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "Updated",
            "description": "A JSON Object containing both the old and updated details of the specified user.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "description": "JSON Object containing the request result.",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "The User ID of the Modified User."
                        },
                        "oldDetails": {
                          "type": "object",
                          "description": "A JSON Object containing the details as they were previously stored with Check Networks.",
                          "properties": {
                            "firstName": {
                              "type": "string",
                              "description": "The First Name of the specified user as was previously listed with Check Networks."
                            },
                            "lastName": {
                              "type": "string",
                              "description": "The Last Name of the specified user as was previously listed with Check Networks."
                            },
                            "email": {
                              "type": "string",
                              "format": "email",
                              "description": "The Email Address of the specified user as was previously listed with Check Networks."
                            },
                            "role": {
                              "type": "string",
                              "description": "The user's role before the change."
                            }
                          }
                        },
                        "newDetails": {
                          "type": "object",
                          "description": "A JSON Object containing the details as they are now stored with Check Networks.",
                          "properties": {
                            "firstName": {
                              "type": "string",
                              "description": "The First Name of the specified user as it is now listed with Check Networks."
                            },
                            "lastName": {
                              "type": "string",
                              "description": "The Last Name of the specified user as it is now listed with Check Networks."
                            },
                            "email": {
                              "type": "string",
                              "format": "email",
                              "description": "The Email Address of the specified user as it is now listed with Check Networks."
                            },
                            "role": {
                              "type": "string",
                              "description": "The user's role now."
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Users"
        ],
        "summary": "Delete Existing User",
        "operationId": "delete_account_user",
        "security": [
          {
            "OAuth2": [
              "account:delete"
            ]
          }
        ],
        "description": ">**Required Scope(s):** account:delete\n\nUse this endpoint to delete a user on your Wholesale Account.\n\n**Important Note:** This will immediately delete the supplied user with no additional confirmation. Check Networks may be unable to recover the user after this has been run. We strongly recommend restricting access to this API Endpoint.\n\nThis is to be used to delete staff accounts, not client accounts.\n\nA key acts as an Admin, which may never remove an Owner: the request is\nrefused with `403` and `error.code` `owner_protected`. The portal's\nother refusals are a `422` naming why. The removal is audited as the\nportal's is, naming the API key.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID Number of the User as defined in Check Networks Systems. This can be obtained from the Get Users Endpoint"
          }
        ],
        "responses": {
          "204": {
            "x-summary": "No Content",
            "description": "You will receive an empty response with the HTTP Status Code of 204 to indicate the User has been deleted."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/data/capacity": {
      "get": {
        "summary": "Check whether a premises' path has room for more services",
        "description": "Before placing many orders in one area, ask whether the path that would serve them has room. The path is the one an order at this premises would ride: our NNI to the carrier at the premises' POI and, for a Layer 2 handoff, your own interconnect as well. The answer is `hasCapacity` only; no headroom, utilisation or contracted figure is returned.\n\nThe check is advice. An order placed while it answers false is still accepted and built; a path over capacity is slower at busy times, not refused.",
        "operationId": "get_data_capacity",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "locId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The premises the orders are for: an NBN Location ID (LOC…) or an Opticomm Property ID (OPC…)."
          },
          {
            "name": "services",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            },
            "description": "How many more services you plan to order on this path."
          },
          {
            "name": "downMbps",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000
            },
            "description": "The download speed of each, in Mbps (100 for a 100/40 plan)."
          },
          {
            "name": "deliveryMode",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "l3",
                "l2"
              ],
              "default": "l3"
            },
            "description": "`l3` for a service that ends on our network, `l2` for a Layer 2 handoff to your interconnect, which checks that interconnect too."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "locId",
                        "hasCapacity"
                      ],
                      "properties": {
                        "locId": {
                          "type": "string"
                        },
                        "hasCapacity": {
                          "type": "boolean",
                          "description": "True when the path has room for the services asked about, false when ordering them would take it past what it is sized for."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Data Service Qualification"
        ]
      }
    },
    "/data/layer2/destinations": {
      "get": {
        "summary": "List Layer 2 Link Destinations",
        "description": ">**Required Scope(s):** data:read\n\nThe active Layer 2 link destinations available to your account — the outer\nVLANs (S-Tags) on your customer interconnects, where a Layer 2 service can\nbe handed off to you.\n\nEach destination's carrier is derived from its Point of Interconnect. A\nsingle-tag interconnect carries all your services on one outer VLAN across\nevery POI and carrier; it is presented under the reserved POI code `0NAT`\nand serves both NBN and Opticomm.\n",
        "operationId": "get_data_layer2_destinations",
        "parameters": [
          {
            "name": "carrier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "nbn",
                "opticomm"
              ]
            },
            "description": "(Optional) Return only destinations serving this carrier. Single-tag (`0NAT`) destinations serve both carriers, so they always appear."
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "results"
                  ],
                  "properties": {
                    "results": {
                      "type": "array",
                      "description": "The active Layer 2 link destinations available to you.",
                      "items": {
                        "$ref": "#/components/schemas/Layer2Destination"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Data Layer 2"
        ]
      }
    },
    "/data/orders": {
      "get": {
        "summary": "List Your Orders",
        "description": "Your orders, whichever network delivers them, newest first, one summary\nrow each: enough to act on without reading every order. The whole order\nis its `href` (GET /data/orders/{orderId}).\n\nAn order still open is always listed, however long since it last\nchanged: a parked or waiting order stays until it ends. Without `status`\nor `updatedSince`, completed and failed orders are listed for the\n**last 30 days**; ask for `status=completed`, `status=failed` or an\n`updatedSince` to reach older ones. Paged like every list.\n\nFilter by `status` (`open` is every order not finished), `type`,\n`network`, `locationId`, `orderReference`, `endUser`, `tag` and\n`updatedSince`. Each narrows the list, and a value outside its set or\nits form is `422`, never a quietly wider list. `q` searches the order\nid, PND, your order reference and the location id.\n\n`expand=service` gives each order's service in full, in the same call.\n\nAn order appears here once it has been placed with the carrier, or once\nit is waiting for your appointment or port, under its PND.\n",
        "operationId": "get_data_orders",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Only orders of these types, one or several, comma-separated. Case does not matter, so the `type` an order shows (`Connect`) is accepted as it is; any other value is `422`.",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "connect",
                  "modify",
                  "disconnect"
                ]
              }
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Only orders in these statuses, one or several, comma-separated. Case does not matter, so the `status` an order shows (`InProgress`) is accepted as it is; `open` is every order not finished, the same as `inProgress`. Any other value is `422`.",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "inprogress",
                  "completed",
                  "failed",
                  "open"
                ]
              }
            }
          },
          {
            "name": "network",
            "in": "query",
            "required": false,
            "description": "Only orders on these networks, one or several, comma-separated. Any other value is `422`.",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "nbn",
                  "opticomm"
                ]
              }
            }
          },
          {
            "name": "locationId",
            "in": "query",
            "required": false,
            "description": "Only orders for this premises: an NBN location id (`LOC` and 12 digits) or an Opticomm one (`OPC` and 12 digits), any case. Any other form is `422`.",
            "schema": {
              "type": "string",
              "maxLength": 32,
              "example": "LOC000079427928"
            }
          },
          {
            "name": "orderReference",
            "in": "query",
            "required": false,
            "description": "Only the orders placed with this reference of yours, matched whole, ignoring case.",
            "schema": {
              "type": "string",
              "maxLength": 35,
              "example": "ACME-1042"
            }
          },
          {
            "$ref": "#/components/parameters/Tag"
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "`service` inlines each order's service in full. Any other value is `422`.",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "service"
                ]
              }
            }
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Order by this field, `-` in front for descending. An unknown field is `422`.",
            "schema": {
              "type": "string",
              "enum": [
                "createdAt",
                "-createdAt",
                "completedAt",
                "-completedAt",
                "updatedAt",
                "-updatedAt"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Q"
          },
          {
            "$ref": "#/components/parameters/UpdatedSince"
          },
          {
            "$ref": "#/components/parameters/CreatedFrom"
          },
          {
            "$ref": "#/components/parameters/CreatedTo"
          },
          {
            "name": "needsAttention",
            "in": "query",
            "required": false,
            "description": "Only the orders in this needs-attention group, exactly as `GET /account/summary` counted them. With it, `endUser` (an end user's number) narrows the group to that end user.",
            "schema": {
              "type": "string",
              "enum": [
                "orderAwaitingAction"
              ]
            }
          },
          {
            "name": "endUser",
            "in": "query",
            "required": false,
            "description": "Only the orders for this end user, by its public number. A number that is not one of your end users is `422`, not an empty list. With `needsAttention`, it narrows the group to that end user.",
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "total",
                    "page",
                    "perPage",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DataOrderSummary"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data Orders"
        ]
      },
      "post": {
        "summary": "Place an Order",
        "description": ">**Required Scope(s):** data:create\n\nLimit: 30 per minute for the account (carrier write).\n\nOne Connect order for every data network and technology, so you need\nno separate endpoint for each. The location picks the order: an NBN\nLocation ID is placed as an NFAS (Fibre), NWAS (Fixed Wireless), NHAS\n(HFC) or NCAS (FTTB, FTTN, FTTC) order by its access technology, and an\nOpticomm Property ID as an Opticomm order. Satellite and Enterprise\nEthernet are not ordered here.\n\nTake the plan and the resource from the Service Qualification\n(GET /data/sq/{locId}). The order takes what the portal's order page\ntakes: the end user it is for, its add-ons, the restoration SLA, a\nstatic IPv4 address and IPv6, a new or additional install, and a\ntransfer. NTD delivery and the other options of each network are on the\nnetwork's own order endpoints under /nbn and /opticomm.\n\nThe order is checked against the Service Qualification before it is sent,\nso a mistake comes back as a 422 with the reason and no order is placed.\nA 201 means the order is accepted; follow it with GET\n/data/orders/{orderId}.\n\nAn order that needs something only you can give is accepted and waits on\nour side, with nothing sent to the carrier: a technician appointment\n(`order.appointmentRequired`), or, where every port on the NTD is in use,\na new NTD or a port to take over (`order.ntdFull`). Its `actionRequired`\nsays what it needs and its ID is a PND. Answer it with PATCH\n/data/orders/{orderId}; one still waiting after 7 days is cancelled.\n\nWith `bundleId`, the order is checked the same way and joins that bundle\nas a draft instead (see `POST /bundles`): nothing is sent until the\nbundle is submitted. The answer is the bundle item, with the bundle at\n`Location`; a retry with the same `orderReference` is that item again.\n",
        "operationId": "post_data_order",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:create"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataOrderCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "Already placed",
            "description": "An order with this `orderReference` was already placed; this is that order. With `bundleId`, it is already in the bundle; this is the item.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/DataOrder"
                        },
                        {
                          "$ref": "#/components/schemas/BundleItem"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "The order was placed with the carrier, or accepted to wait for your appointment or port (see `actionRequired`). With `bundleId`, it joined the bundle; this is the item.",
            "headers": {
              "Location": {
                "description": "With `bundleId`, the bundle.",
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/DataOrder"
                        },
                        {
                          "$ref": "#/components/schemas/BundleItem"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Data Orders"
        ]
      }
    },
    "/data/orders/delayed": {
      "get": {
        "summary": "List Delayed Orders",
        "description": ">**Required Scope(s):** data:read\n\nLists your Delayed Orders — orders scheduled for a future submission\ntime, whichever network they are for. The hold is Check Networks'\nown: nothing is sent to any carrier until a Delayed Order submits.\nAn order the carrier asked us to try again is not listed: it is in\nprogress, and we resend it ourselves.\n\nPaged like every list. `q` searches the pending reference, your order\nreference and the location id.\n",
        "operationId": "get_data_delayed_orders",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Order by this field, `-` in front for descending. An unknown field is `422`.",
            "schema": {
              "type": "string",
              "enum": [
                "submitDateTime",
                "-submitDateTime",
                "createdAt",
                "-createdAt"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Q"
          },
          {
            "$ref": "#/components/parameters/UpdatedSince"
          },
          {
            "$ref": "#/components/parameters/CreatedFrom"
          },
          {
            "$ref": "#/components/parameters/CreatedTo"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "queryDateTime",
                    "total",
                    "page",
                    "perPage",
                    "results"
                  ],
                  "properties": {
                    "queryDateTime": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When this query was received, in UTC"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DelayedOrderItem"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Data Orders"
        ]
      },
      "post": {
        "summary": "Create a Delayed Order",
        "description": ">**Required Scope(s):** data:create\n\nLimit: 30 per minute for the account (carrier write).\n\nPlaces a Connect order and HOLDS it until `submitTimestamp` —\nnothing is sent to the carrier until then. Creation is\nOpticomm-shaped today (the one network whose delayed lane is Check\nNetworks' own; nbn delayed orders are the carrier's surface at\n/nbn/orders/delayed). Use the Opticomm Service Qualification API to\nfind selectable options first.\n\nThe order takes the end user and the add-ons as `POST /data/orders`\ndoes. Left out, `addons` attaches the plan's default add-ons; a list\nattaches exactly that list; an empty list attaches none. Add-ons start\nbilling when the carrier accepts the order, once it is sent.\n\nDelayed Orders can be rescheduled, submitted immediately, or\ncancelled (at no cost) any time before submission.\n",
        "operationId": "post_data_delayed_order",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:create"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/DataDelayedOrderCreate"
                  },
                  {
                    "type": "object",
                    "required": [
                      "submitTimestamp"
                    ],
                    "properties": {
                      "submitTimestamp": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When to submit this order to the carrier. Must be at least 15 minutes into the future and no more than 30 days into the future.\nMust be an ISO 8601 date-time with its UTC offset, for example `2026-12-01T09:00:00+11:00` or `2026-11-30T22:00:00Z`. A time without an offset is refused with a 422 naming the field."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/DelayedOrderItem"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Data Orders"
        ]
      }
    },
    "/data/orders/delayed/{delayedOrderRef}": {
      "parameters": [
        {
          "name": "delayedOrderRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The Check Networks Delayed Order Reference #"
        }
      ],
      "get": {
        "summary": "Retrieve a Delayed Order",
        "description": ">**Required Scope(s):** data:read\n\nReturns the full detail of a Delayed Order — the Connect order fields\nit was created with and its scheduled submission time.\n",
        "operationId": "get_data_delayed_order",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/DataDelayedOrder"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Data Orders"
        ]
      },
      "delete": {
        "summary": "Cancel a Delayed Order",
        "description": ">**Required Scope(s):** data:delete\n\nCancels a Delayed Order before it submits. This is purely local —\nnothing was ever sent to the carrier, so cancellation is free. A\n409 is returned if the order has just been submitted by the\nscheduler and can no longer be cancelled.\n",
        "operationId": "delete_data_delayed_order",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:delete"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "The order is cancelled. The response has no body."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Data Orders"
        ]
      }
    },
    "/data/orders/delayed/{delayedOrderRef}/reschedule": {
      "parameters": [
        {
          "name": "delayedOrderRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The Check Networks Delayed Order Reference #"
        }
      ],
      "patch": {
        "summary": "Change the Submission Time for a Delayed Order",
        "description": ">**Required Scope(s):** data:update\n\nChanges when a Delayed Order will be submitted to its carrier. The\norder remains held (nothing is sent) until the new time.\n",
        "operationId": "patch_data_delayed_order_reschedule",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "submitTimestamp"
                ],
                "properties": {
                  "submitTimestamp": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The new time to submit to the carrier. Must be at least 15 minutes into the future and no more than 30 days into the future.\nMust be an ISO 8601 date-time with its UTC offset, for example `2026-12-01T09:00:00+11:00` or `2026-11-30T22:00:00Z`. A time without an offset is refused with a 422 naming the field."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/DelayedOrderItem"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Data Orders"
        ]
      }
    },
    "/data/orders/delayed/{delayedOrderRef}/submit": {
      "parameters": [
        {
          "name": "delayedOrderRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The Check Networks Delayed Order Reference #"
        }
      ],
      "patch": {
        "summary": "Submit a Delayed Order Immediately",
        "description": ">**Required Scope(s):** data:update\n\nLimit: 30 per minute for the account (carrier write).\n\nSubmits a Delayed Order to its carrier now, instead of waiting for\nits scheduled submission time.\n",
        "operationId": "patch_data_delayed_order_submit",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "description": "The submission outcome. The order now has its carrier order id and appears on its carrier group (for Opticomm, /opticomm/productOrders).",
                      "properties": {
                        "success": {
                          "type": "boolean"
                        },
                        "id": {
                          "type": "string",
                          "description": "The carrier order id assigned.",
                          "example": "OPO000000000000"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The order has already been submitted and can no longer be submitted manually.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Data Orders"
        ]
      }
    },
    "/data/orders/{orderId}": {
      "get": {
        "summary": "Retrieve an Order",
        "description": "One order, whichever network delivers it, in the same shape for all of\nthem. Use the ID from the order list.\n",
        "operationId": "get_data_order",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "description": "The order ID, as returned by the order list.",
            "schema": {
              "type": "string"
            },
            "example": "ORD010258996360"
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "`service` inlines the order's service in full. Any other value is `422`.",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "service"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/DataOrder"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data Orders"
        ]
      },
      "patch": {
        "summary": "Answer a Waiting Order",
        "description": ">**Required Scope(s):** data:update\n\nLimit: 30 per minute for the account (carrier write).\n\nGive an order waiting for you (`actionRequired` on the order, and the\n`order.appointmentRequired` or `order.ntdFull` webhook) what it needs,\nand it is placed with the carrier, keeping its ID.\n\n- **Appointment required:** `appointmentId`, an appointment you reserved\n  from the order's timeslots.\n- **NTD full:** `appointmentId` for a technician to install another NTD,\n  or `resourceId` for the port to take over, with `serviceId` (the AVC on\n  NBN) and `customerAuthorityDate`.\n\nThe order is checked again as when it was placed, so a mistake comes back\nas a 422 with the reason and the order keeps waiting.\n",
        "operationId": "patch_data_order",
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          },
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "description": "The order ID (the PND in `order.appointmentRequired` or `order.ntdFull`).",
            "schema": {
              "type": "string"
            },
            "example": "PND000000012345"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataOrderAnswer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The order was placed with the carrier.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/DataOrder"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Data Orders"
        ]
      }
    },
    "/data/orders/{orderId}/timeslots": {
      "get": {
        "summary": "Timeslots for a Waiting Order",
        "description": "The technician timeslots for an order waiting for an appointment, read\nlive from its network for the appointment type the order needs. The read\nstarts at the order's `preferredAppointmentDate`, or today, and looks two\nweeks ahead on Opticomm.\n\nReserve a slot on the network's appointment endpoint (/nbn/appointments\nor /opticomm/appointments), then attach it with PATCH\n/data/orders/{orderId}. `timeslots` is that network's own timeslot\ndocument, as its appointment search returns it.\n",
        "operationId": "get_data_order_timeslots",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "description": "The order ID (the PND in `order.appointmentRequired` or `order.ntdFull`).",
            "schema": {
              "type": "string"
            },
            "example": "PND000000012345"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "orderId",
                        "network",
                        "demandType",
                        "timeslots"
                      ],
                      "properties": {
                        "orderId": {
                          "type": "string",
                          "example": "PND000000012345"
                        },
                        "network": {
                          "type": "string",
                          "enum": [
                            "nbn",
                            "opticomm"
                          ]
                        },
                        "demandType": {
                          "type": "string",
                          "description": "The appointment type the order needs.",
                          "example": "Standard Install"
                        },
                        "timeslots": {
                          "description": "The network's own timeslot document."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          }
        },
        "tags": [
          "Data Orders"
        ]
      }
    },
    "/data/provisioning": {
      "get": {
        "summary": "List Your Provisioning Requests",
        "description": "Every provisioning request you have made, newest first, whichever network\ndelivers the service.\n\nA request appears as soon as it is configured — before the carrier has\naccepted — so this is where you watch it go from Pending to Complete and\npick up the tags or login you need to configure your own side.\n\n`q` searches the provisioning request reference, the carrier order id and\nyour reference.\n",
        "operationId": "get_data_provisioning_requests",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Order by this field, `-` in front for descending. An unknown field is `422`.",
            "schema": {
              "type": "string",
              "enum": [
                "createdAt",
                "-createdAt"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Q"
          },
          {
            "$ref": "#/components/parameters/UpdatedSince"
          },
          {
            "$ref": "#/components/parameters/CreatedFrom"
          },
          {
            "$ref": "#/components/parameters/CreatedTo"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "total",
                    "page",
                    "perPage",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer",
                      "description": "Every provisioning request you have made, across all pages."
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DataProvisioningRecord"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data Provisioning"
        ]
      }
    },
    "/data/provisioning/{ref}": {
      "get": {
        "summary": "Retrieve a Provisioning Request",
        "description": "One provisioning request, by its own reference or by the order id it\nbelongs to — whichever you have to hand.\n",
        "operationId": "get_data_provisioning_request",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "description": "The provisioning request reference (PRQ…) or the order id.",
            "schema": {
              "type": "string"
            },
            "example": "PRQ123456789011"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/DataProvisioningRecord"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data Provisioning"
        ]
      }
    },
    "/data/provisioning/ipoe": {
      "post": {
        "summary": "Provision an Order as IPoE",
        "description": ">**Required Scope(s):** data:update\n\nThe simplified provisioning step for an IPoE (DHCP) Layer 3 service.\nCall it after placing the order; only the IP preferences are needed —\neverything else is derived from the order.\n\n**A service is not built until you ask.** Completing at the carrier does\nnot provision anything by itself — if no provisioning step is called for an\norder, the service never goes live.\n\nAccepted until the service is built; after that, changes require a\nModify Order.\n",
        "operationId": "post_data_provisioning_ipoe",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "orderNumber"
                ],
                "properties": {
                  "orderNumber": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "The Order to provision (your PND reference or the carrier order number)."
                  },
                  "staticIp": {
                    "type": "boolean",
                    "default": false,
                    "description": "Hold the service's IPv4 address stable (and allow custom reverse DNS)."
                  },
                  "ipv6": {
                    "type": "boolean",
                    "default": true,
                    "description": "Provision IPv6 (a /64 on-link prefix and a delegated prefix). The delegated prefix size is plan-dependent: /56 by default, or /48 where your plan or service is configured for it. Set false for an IPv4-only service."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataProvisioningResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Data Provisioning"
        ]
      }
    },
    "/data/provisioning/layer2": {
      "post": {
        "summary": "Provision an Order as Layer 2",
        "description": ">**Required Scope(s):** data:update\n\nThe simplified provisioning step for a Layer 2 pass-through service.\nCall it after placing the order.\n\nThe service is not billed from its build: billing starts once its path to\nyour interconnect is applied, on the day it is first seen live or 10\nbusiness days after the path is applied, whichever comes first.\n\nThe optional `handoff` names one of your Layer 2 link destinations\n(as listed by `GET /data/layer2/destinations`). Omit it and the\nservice is handed off on your default destination for the order's\nPOI.\n\n**A service is not built until you ask.** Completing at the carrier does\nnot provision anything by itself — if no provisioning step is called for an\norder, the service never goes live.\n\nAccepted until the service is built; after that, changes require a\nModify Order.\n",
        "operationId": "post_data_provisioning_layer2",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "orderNumber"
                ],
                "properties": {
                  "orderNumber": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "The Order to provision (your PND reference or the carrier order number)."
                  },
                  "handoff": {
                    "type": "string",
                    "format": "uuid",
                    "description": "(Optional) The interconnect to hand this service off on, from GET /data/layer2/destinations. Omit to use your default destination for the order's POI. The outer VLAN (S-Tag) on it is chosen for you from that POI."
                  },
                  "cTag": {
                    "type": "integer",
                    "minimum": 2,
                    "maximum": 4094,
                    "description": "(Optional) The inner VLAN (C-Tag) to use for this service, if\nyou want to pick it — it only has to be unused on the handoff\nit lands on.\n\nLeft out, the next free one is allocated and returned to you.\n\nEither way the tags are allocated as soon as you ask, not when\nthe carrier finishes — so you can configure your own side\nimmediately, and no other order can take the tag meanwhile.\n"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataProvisioningResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Data Provisioning"
        ]
      }
    },
    "/data/provisioning/pppoe": {
      "post": {
        "summary": "Provision an Order as PPPoE",
        "description": ">**Required Scope(s):** data:update\n\nThe simplified provisioning step for a PPPoE Layer 3 service. Call it\nafter placing the order; only the IP preferences are needed —\neverything else is derived from the order.\n\nPPPoE logins live in your account's realm, so they cannot collide with\nanother provider's: the username is always `<name>@<your realm>`. Your\nrealm is set up by Check Networks — PPPoE cannot be provisioned until it\nis in place.\n\nChoose a login by supplying `username` and `password`, or leave both out\nand one is created with the service: the carrier's service ID as the name\nand a generated password. Either way the username appears on the Radius\nUser Status endpoint and the password via the dedicated RADIUS Password\nendpoint.\n\nA chosen login can only be set once the carrier has accepted the order\nand the service exists — the login belongs to the service.\n\n**A service is not built until you ask.** Completing at the carrier does\nnot provision anything by itself — if no provisioning step is called for an\norder, the service never goes live.\n\nAccepted until the service is built; after that, changes require a\nModify Order.\n",
        "operationId": "post_data_provisioning_pppoe",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "orderNumber"
                ],
                "properties": {
                  "orderNumber": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "The Order to provision (your PND reference or the carrier order number)."
                  },
                  "staticIp": {
                    "type": "boolean",
                    "default": false,
                    "description": "Hold the service's IPv4 address stable (and allow custom reverse DNS)."
                  },
                  "ipv6": {
                    "type": "boolean",
                    "default": true,
                    "description": "Provision IPv6 (a /64 on-link prefix and a delegated prefix). The delegated prefix size is plan-dependent: /56 by default, or /48 where your plan or service is configured for it. Set false for an IPv4-only service."
                  },
                  "username": {
                    "type": "string",
                    "maxLength": 32,
                    "pattern": "^[A-Za-z0-9._-]+$",
                    "description": "(Optional) The name part of the PPPoE login — your realm is\nappended, so do not include \"@\".\n\nLetters, numbers, full stops, underscores and hyphens. Must\nnot already be in use.\n",
                    "example": "smith-family"
                  },
                  "password": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 64,
                    "pattern": "^[\\x20-\\x26\\x28-\\x5B\\x5D-\\x7E]+$",
                    "description": "(Optional) The PPPoE password. Generated for you when not supplied. 8 to 64 printable ASCII characters, with no single quote (') or backslash (\\): the same rule as a later change with PATCH /data/radius/{ref}/password."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataProvisioningResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Data Provisioning"
        ]
      }
    },
    "/data/services": {
      "get": {
        "summary": "List Your Services",
        "description": "Every data service you hold, on NBN and Opticomm, in one shape, the most\nrecently requested first, as the portal's Services list opens. Filter by\n`network`, `status`, `endUser`, `technology`, `customerReference`, `plan`,\n`locationId` or `tag`, as the portal's filters of the same names do; each\nnarrows the list, and a value outside its set or its form is `422`, never\na quietly wider list. `q` searches what the portal's search does: the\nproduct and service references, the RADIUS username, the carrier order,\nthe address, your customer reference, and the end user's reference and\nname.\n\n`expand=endUser` gives each service's end user in full, as\n`endUserDetail`, in the same call.\n\nA connect still in flight is an order (GET /data/orders), not a service:\nit appears here once it is live.\n\nA service with no request date, such as one taken over from another\nprovider, comes after every service that has one, in the default order\nand in any `sort`. So does any service with no value in the field a\n`sort` names, such as `activatedAt` before it is live.\n",
        "operationId": "get_data_services",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "network",
            "in": "query",
            "required": false,
            "description": "Only services on these networks, one or several, comma-separated. Case does not matter; any other value is `422`.",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "nbn",
                  "opticomm"
                ]
              }
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Only services in these statuses, one or several, comma-separated. Case does not matter, so the `status` a service shows (`Live`) is accepted as it is; any other value is `422`.",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "live",
                  "suspended",
                  "cancelled"
                ]
              }
            }
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "`endUser` adds each service's end user in full, as `endUserDetail`. Any other value is `422`.",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "endUser"
                ]
              }
            }
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Order by this field, `-` in front for descending. An unknown field is `422`.",
            "schema": {
              "type": "string",
              "enum": [
                "requestedAt",
                "-requestedAt",
                "createdAt",
                "-createdAt",
                "activatedAt",
                "-activatedAt",
                "serviceId",
                "-serviceId"
              ]
            }
          },
          {
            "name": "technology",
            "in": "query",
            "required": false,
            "description": "Only services on these access technologies, one or several, comma-separated, as the `technology` a service shows. Case does not matter; any other value is `422`. A technology none of your services has gives an empty list.",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "fttp",
                  "fttb",
                  "fttc",
                  "fttn",
                  "hfc",
                  "fw"
                ]
              }
            }
          },
          {
            "name": "customerReference",
            "in": "query",
            "required": false,
            "description": "Only the services with this customer reference, matched whole, ignoring case.",
            "schema": {
              "type": "string",
              "maxLength": 64,
              "example": "CUST-0042"
            }
          },
          {
            "name": "plan",
            "in": "query",
            "required": false,
            "description": "Only the services on this plan, by its SKU (the `plan.sku` a service shows), ignoring case.",
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          },
          {
            "name": "locationId",
            "in": "query",
            "required": false,
            "description": "Only the services at this premises: an NBN location id (`LOC` and 12 digits) or an Opticomm one (`OPC` and 12 digits). Any other form is `422`.",
            "schema": {
              "type": "string",
              "maxLength": 32,
              "example": "LOC000079427928"
            }
          },
          {
            "$ref": "#/components/parameters/Tag"
          },
          {
            "$ref": "#/components/parameters/Q"
          },
          {
            "$ref": "#/components/parameters/ExternalRef"
          },
          {
            "$ref": "#/components/parameters/UpdatedSince"
          },
          {
            "$ref": "#/components/parameters/CreatedFrom"
          },
          {
            "$ref": "#/components/parameters/CreatedTo"
          },
          {
            "name": "needsAttention",
            "in": "query",
            "required": false,
            "description": "Only the services in this needs-attention group, exactly as `GET /account/summary` counted them. With it, `endUser` (an end user's number) narrows the group to that end user.",
            "schema": {
              "type": "string",
              "enum": [
                "suspended",
                "failedHealthCheck",
                "ceasePending"
              ]
            }
          },
          {
            "name": "endUser",
            "in": "query",
            "required": false,
            "description": "Only the services of this end user, by its public number (the\n`endUser` each service returns). A number that is not one\nof your end users is a 422, not an empty list. With `needsAttention`,\nit narrows the group to that end user.\n",
            "schema": {
              "type": "string",
              "maxLength": 64,
              "example": "100042"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "total",
                    "page",
                    "perPage",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer",
                      "description": "Every service that matches, across all pages."
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DataService"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data Services"
        ]
      }
    },
    "/data/services/{ref}": {
      "get": {
        "summary": "Retrieve a Service",
        "description": "One of your data services, with its speed and whether it is connected\nright now.\n\nAddress it by its product reference (`id`: an NBN PRI or an Opticomm\nproduct) or its service reference (`serviceId`, such as an AVC).\n\nThe live status is read from our RADIUS, or live from the network for a\nservice on Kinetix's. Where a network can only tell us by running a test,\n`session.status` is `OnRequest`: ask GET /data/radius/{ref}/online with\nthe service's `radiusUser`.\n\n`contract` is the term end and what disconnecting today would charge,\nor null with no term.\n\nWhere a carrier reference was reused, the live service answers, then a\nsuspended one, then the newest.\n",
        "operationId": "get_data_service",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "description": "The service's product reference (PRI, Opticomm product) or service reference (AVC).",
            "schema": {
              "type": "string"
            },
            "example": "PRI000123456789"
          },
          {
            "name": "expand",
            "in": "query",
            "required": false,
            "description": "`endUser` adds the service's end user in full, as `endUserDetail`. Any other value is `422`.",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "endUser"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/DataServiceDetail"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data Services"
        ]
      },
      "patch": {
        "summary": "Set a Service's Own Reference",
        "description": "Your own `externalRef` and `metadata` on the service, so you can find it\nby your customer or job id without keeping a map of ours. Send either or\nboth; one you leave out is kept, and null clears it. Everything else on\na data service is the carrier's, and changes through an order.\n\nAn `externalRef` another of your data services holds is `422`. Find the\nservice again with `GET /data/services?externalRef=`.\n",
        "operationId": "patch_data_service",
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          },
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "description": "The service's product reference (PRI, Opticomm product) or service reference (AVC).",
            "schema": {
              "type": "string"
            },
            "example": "PRI000123456789"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "minProperties": 1,
                "properties": {
                  "externalRef": {
                    "$ref": "#/components/schemas/ExternalRef"
                  },
                  "metadata": {
                    "$ref": "#/components/schemas/MetadataInput"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The service as it now is.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/DataService"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data Services"
        ]
      }
    },
    "/data/services/{ref}/usage": {
      "get": {
        "summary": "Retrieve a Service's Usage",
        "description": "One month of a service's data usage, in total and by day: the figures\nyour portal's usage card shows. Usage is reported, never charged.\n\n`period` is a month, `YYYY-MM`, in the last 13 months; the current month\nby default, counted up to now (`complete` is false).\n\nMonths and days follow your bill's calendar, not UTC: your account's\ntime zone, the zone your invoices are cut in (set in the Wholesale\nPortal's Company Settings; Brisbane until you set another). A sample at 2 am on the 1st there counts\nin the new month and on that day. Send `CN-Time-Zone` to have the months\nand days on your own zone instead. `from` and `to` carry the zone's\noffset.\n",
        "operationId": "get_data_service_usage",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "description": "The service's product reference (PRI, Opticomm product) or service reference (AVC).",
            "schema": {
              "type": "string"
            },
            "example": "PRI000123456789"
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "description": "The month, `YYYY-MM`. Defaults to the current month.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}$"
            },
            "example": "2026-10"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/DataServiceUsage"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data Services"
        ]
      }
    },
    "/data/services/{ref}/incidents": {
      "get": {
        "summary": "List a Service's Outages, Planned Work and Degradations",
        "description": "Is anything wrong at this service right now? Three lists in one answer,\nas your portal's service page shows them, on either network:\n\n- `outages`: the entries on our outage register that cover the service's\n  address, in the shape `GET /outages` gives. Each carries what you need\n  to report it: `cause`, `premisesAffected`, and `serviceCounts`, the\n  count of services hit by each affected type (null for a type we have\n  no count of), and `updates`, each update we posted on it with its\n  time, newest last.\n- `plannedWork`: the maintenance windows you were sent notice of whose\n  area takes in the service's address. A window that names no area\n  covers every service it was noticed for.\n- `degradations`: the Potential Service Degradations at the service's\n  point of interconnect: slower at peak, not down.\n\nOpen ones only by default. `include=resolved` adds those resolved in the\nlast 30 days. A service with nothing on it answers three empty lists.\nEvery time is UTC.\n",
        "operationId": "get_data_service_incidents",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "description": "The service's product reference (PRI, Opticomm product) or service reference (AVC).",
            "schema": {
              "type": "string"
            },
            "example": "PRI000123456789"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "`resolved` adds what was resolved in the last 30 days. Any other value is `422`.",
            "schema": {
              "type": "string",
              "enum": [
                "resolved"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "id",
                        "queryDateTime",
                        "outages",
                        "plannedWork",
                        "degradations"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "example": "PRI000123456789"
                        },
                        "queryDateTime": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "outages": {
                          "type": "array",
                          "items": {
                            "allOf": [
                              {
                                "$ref": "#/components/schemas/NetworkOutage"
                              },
                              {
                                "type": "object",
                                "required": [
                                  "serviceCounts",
                                  "updates"
                                ],
                                "properties": {
                                  "updates": {
                                    "type": "array",
                                    "description": "Each update we posted on the outage, with its time, oldest first so the newest is last: the one current when the outage was published, and every one since. The newest is the outage's `additionalInfo`.",
                                    "items": {
                                      "type": "object",
                                      "required": [
                                        "at",
                                        "text"
                                      ],
                                      "properties": {
                                        "at": {
                                          "type": "string",
                                          "format": "date-time",
                                          "description": "When the update was posted.",
                                          "example": "2026-11-24T03:15:00+00:00"
                                        },
                                        "text": {
                                          "type": "string",
                                          "example": "A technician is on site replacing the faulty card."
                                        }
                                      }
                                    }
                                  },
                                  "serviceCounts": {
                                    "type": "object",
                                    "description": "The count of services the outage hit, by each of its `affectedServiceTypes`; null for a type we have no count of.",
                                    "additionalProperties": {
                                      "type": [
                                        "integer",
                                        "null"
                                      ]
                                    },
                                    "example": {
                                      "fixed_broadband": 40,
                                      "fttp": null
                                    }
                                  }
                                }
                              }
                            ]
                          }
                        },
                        "plannedWork": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/NetworkOutage"
                          }
                        },
                        "degradations": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ServiceDegradation"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data Services"
        ]
      }
    },
    "/data/services/{ref}/diagnostics": {
      "post": {
        "summary": "Run a Line Test on a Service",
        "description": "Run one of the tests `GET /data/services/{ref}/diagnostics/types` lists\nfor the service, on either network, with that test's `inputs`. An input\nyou leave out takes its `default`; one the test does not take, or a\nmissing required one, is `422`. The service must be live.\n\nIt answers `202` with the test's id; the result comes from the carrier\nlater and is on `GET /data/diagnostics/{id}`. While the same test is\nstill running on the service, a second is `409` and `error.runningTestId`\nnames the one running: nothing is asked of the carrier. When the\ncarrier's test system is down, `503` with `Retry-After`.\n\nLimit: 30 per minute for the account (carrier write).\n",
        "operationId": "post_data_service_diagnostics",
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          },
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "description": "The service's product reference (PRI, Opticomm product) or service reference (AVC).",
            "schema": {
              "type": "string"
            },
            "example": "PRI000123456789"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "test"
                ],
                "properties": {
                  "test": {
                    "type": "string",
                    "description": "The test's `code`.",
                    "example": "LINE_QUALITY_DIAGNOSTIC"
                  },
                  "inputs": {
                    "type": "object",
                    "description": "The test's inputs, by `name`.",
                    "additionalProperties": true,
                    "example": {
                      "resync_type": "Normal",
                      "monitoring_duration": 6
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The test was asked for.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/DataDiagnosticTest"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The same test is already running on the service.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "status",
                        "code",
                        "reason",
                        "runningTestId"
                      ],
                      "properties": {
                        "status": {
                          "type": "integer"
                        },
                        "code": {
                          "type": "string"
                        },
                        "reason": {
                          "type": "string"
                        },
                        "runningTestId": {
                          "type": "string",
                          "description": "The id of the test still running."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Data Services"
        ]
      },
      "get": {
        "summary": "List a Service's Line Tests",
        "description": "The service's line tests, newest first, paged, on either network.\nSession History is not listed: it is `GET /data/services/{ref}/sessions`.\n",
        "operationId": "get_data_service_diagnostics",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "description": "The service's product reference (PRI, Opticomm product) or service reference (AVC).",
            "schema": {
              "type": "string"
            },
            "example": "PRI000123456789"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Only tests in these statuses, comma-separated. Any other value is `422`.",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "accepted",
                  "in_progress",
                  "completed",
                  "cancelled",
                  "rejected"
                ]
              }
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Only these tests, by code, comma-separated, in any case. Any other value is `422`.",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "result",
            "in": "query",
            "required": false,
            "description": "Only tests with these results, comma-separated. Any other value is `422`.",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "passed",
                  "failed",
                  "none"
                ]
              }
            }
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "total",
                    "page",
                    "perPage",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DataDiagnosticTest"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data Services"
        ]
      }
    },
    "/data/services/{ref}/diagnostics/types": {
      "get": {
        "summary": "List the Line Tests a Service Allows",
        "description": "The line tests the carrier allows for this service now, on either\nnetwork, as your portal's Run Test offers them. Each says when to use it\n(`description`), when to raise a fault ticket rather than test again\n(`escalateIf`), and the inputs it takes. Asking reads the carrier live.\n",
        "operationId": "get_data_service_diagnostic_types",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "description": "The service's product reference (PRI, Opticomm product) or service reference (AVC).",
            "schema": {
              "type": "string"
            },
            "example": "PRI000123456789"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "results"
                  ],
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "code",
                          "name",
                          "description",
                          "escalateIf",
                          "inputs"
                        ],
                        "properties": {
                          "code": {
                            "type": "string",
                            "example": "LINE_QUALITY_DIAGNOSTIC"
                          },
                          "name": {
                            "type": "string",
                            "example": "Line Quality Diagnostic"
                          },
                          "description": {
                            "type": "string"
                          },
                          "escalateIf": {
                            "type": "string",
                            "description": "When to raise a fault ticket instead of running the test again."
                          },
                          "inputs": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "name",
                                "label",
                                "type",
                                "required",
                                "default",
                                "options",
                                "help"
                              ],
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "description": "The key to send it under in `inputs`.",
                                  "example": "resync_type"
                                },
                                "label": {
                                  "type": "string"
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "integer",
                                    "boolean",
                                    "enum",
                                    "string"
                                  ]
                                },
                                "required": {
                                  "type": "boolean"
                                },
                                "default": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "Used when you leave the input out."
                                },
                                "options": {
                                  "description": "For an `enum` input, the values it takes.",
                                  "anyOf": [
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "help": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Data Services"
        ]
      }
    },
    "/data/diagnostics/{id}": {
      "get": {
        "summary": "Retrieve a Line Test",
        "description": "One of your line tests, on either network, with the inputs it was run\nwith, the carrier's reason for a rejected or cancelled test, and the\ncarrier's detailed results once it has them.\n",
        "operationId": "get_data_diagnostic",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The test's id.",
            "schema": {
              "type": "string"
            },
            "example": "WRI000000004846"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/DataDiagnosticTest"
                        },
                        {
                          "type": "object",
                          "required": [
                            "inputs",
                            "reason",
                            "details"
                          ],
                          "properties": {
                            "inputs": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "additionalProperties": true
                            },
                            "reason": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Why the carrier rejected or cancelled it."
                            },
                            "details": {
                              "description": "The carrier's detailed results, once it has them; their fields depend on the test.",
                              "type": [
                                "object",
                                "array",
                                "null"
                              ]
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data Services"
        ]
      }
    },
    "/data/services/{ref}/disconnect-quote": {
      "get": {
        "summary": "Price a Disconnect",
        "description": "What disconnecting the service would charge if it ceased on `ceaseOn`,\nfrom the same early termination quotes the cease bills, so you can tell\nyour customer before you place it. One line per open subscription: the\nplan and each add-on; a line past its term charges nothing.\n\n`ceaseOn` is a Sydney calendar day from today to 90 days ahead, the\nwindow a disconnect accepts; today by default. Reading the quote books\nnothing and changes nothing.\n",
        "operationId": "get_data_service_disconnect_quote",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "description": "The service's product reference (PRI, Opticomm product) or service reference (AVC).",
            "schema": {
              "type": "string"
            },
            "example": "PRI000123456789"
          },
          {
            "name": "ceaseOn",
            "in": "query",
            "required": false,
            "description": "The day the service would cease, `YYYY-MM-DD`. Any other value, or a day outside the window, is `422`.",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "example": "2026-12-01"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "id",
                        "ceaseOn",
                        "currency",
                        "chargeExGst",
                        "chargeGst",
                        "chargeIncGst",
                        "chargeWaived",
                        "lines"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "The service's product reference.",
                          "example": "PRI000123456789"
                        },
                        "ceaseOn": {
                          "type": "string",
                          "format": "date"
                        },
                        "currency": {
                          "type": "string",
                          "example": "AUD"
                        },
                        "chargeExGst": {
                          "type": "string",
                          "description": "The whole early termination charge, in dollars ex GST.",
                          "example": "123.45"
                        },
                        "chargeGst": {
                          "type": "string",
                          "example": "12.35"
                        },
                        "chargeIncGst": {
                          "type": "string",
                          "example": "135.80"
                        },
                        "chargeWaived": {
                          "type": "boolean",
                          "description": "True when we waived the early termination charge, so the charge is `0.00` though the service is still in its term."
                        },
                        "lines": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "product",
                              "termEndsOn",
                              "chargeable",
                              "chargeExGst",
                              "chargeGst",
                              "chargeIncGst",
                              "chargeWaived"
                            ],
                            "properties": {
                              "product": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "required": [
                                  "sku",
                                  "name"
                                ],
                                "properties": {
                                  "sku": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                }
                              },
                              "termEndsOn": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date"
                              },
                              "chargeable": {
                                "type": "boolean",
                                "description": "Whether ceasing on `ceaseOn` charges anything for this line."
                              },
                              "chargeExGst": {
                                "type": "string"
                              },
                              "chargeGst": {
                                "type": "string"
                              },
                              "chargeIncGst": {
                                "type": "string"
                              },
                              "chargeWaived": {
                                "type": "boolean",
                                "description": "True when we waived this line's charge, so it is `0.00` though still in term."
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data Services"
        ]
      }
    },
    "/data/services/{ref}/sessions": {
      "get": {
        "summary": "List a Service's Sessions",
        "description": "The service's connection sessions, newest first, as the portal's service\npage shows them: when each started and ended, how long it ran, its\naddress, the bytes each way, the router's MAC and why it ended. Use it\nwhen your customer says the internet keeps dropping.\n\n- A service on our own network: our RADIUS accounting (`source`\n  `checknetworks`).\n- An Opticomm Layer 3 service: the sessions in the last Session History\n  test Opticomm answered (`source` `opticomm`), and `retrievedAt` says\n  when. Reading never starts a test at Opticomm; POST\n  /data/services/{ref}/sessions/refresh asks for a new one.\n- A service whose sessions another carrier holds, such as a Kinetix\n  Layer 3 service, has no history here: `422`. Its current session is on\n  GET /data/radius/{ref}/session.\n\n`from` and `to` keep the sessions that ran in that window: started by\n`to`, and still open or ended at or after `from`. One request covers at\nmost 90 days: `to` defaults to now and `from` to 90 days before `to`,\nand a longer window is `422` naming `from`. Read an older or longer\nperiod 90 days at a time.\n",
        "operationId": "get_data_service_sessions",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "description": "The service's product reference (PRI, Opticomm product) or service reference (AVC).",
            "schema": {
              "type": "string"
            },
            "example": "PRI000123456789"
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "An ISO 8601 date or date-time; a date alone is the start of that day (UTC). At most 90 days before `to`; 90 days before `to` when absent. Not ISO 8601, or further back, is `422`.",
            "schema": {
              "type": "string"
            },
            "example": "2026-11-01"
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "An ISO 8601 date or date-time; a date alone includes that day. Now when absent. Before `from` is `422`.",
            "schema": {
              "type": "string"
            },
            "example": "2026-11-21"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "total",
                    "page",
                    "perPage",
                    "results",
                    "source",
                    "retrievedAt"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "checknetworks",
                        "opticomm"
                      ],
                      "description": "Where the sessions were read."
                    },
                    "retrievedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "For `opticomm`: when Opticomm answered the test these sessions are from; null when none has been answered yet. Null for `checknetworks`, which is current."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "startedAt",
                          "endedAt",
                          "durationSeconds",
                          "ipv4",
                          "downloadBytes",
                          "uploadBytes",
                          "mac",
                          "terminateCause"
                        ],
                        "properties": {
                          "startedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "endedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Null while the session is open."
                          },
                          "durationSeconds": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "ipv4": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "100.64.1.9"
                          },
                          "downloadBytes": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Bytes sent to your customer."
                          },
                          "uploadBytes": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Bytes your customer sent."
                          },
                          "mac": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The router's MAC address, as the network reported it.",
                            "example": "AA:BB:CC:DD:EE:FF"
                          },
                          "terminateCause": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Why the session ended, as RADIUS reports it (`Lost-Carrier`, `User-Request`…). Null while open.",
                            "example": "Lost-Carrier"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data Services"
        ]
      }
    },
    "/data/services/{ref}/sessions/refresh": {
      "post": {
        "summary": "Refresh a Service's Sessions",
        "description": "Ask Opticomm for the service's sessions now, by starting a Session\nHistory test there. For an Opticomm Layer 3 service only: our own\nnetwork's sessions are always current. This is a request to the\ncarrier, so it needs `data:update`.\n\nLimit: 30 per minute for the account (carrier write).\n\n`202` says the test is asked for. The sessions are on GET\n/data/services/{ref}/sessions once Opticomm answers, usually within a\nminute or two, and the `data.radius.sessionRetrieved` webhook says when.\n`409` says a test is already on its way: `error.testId` names it, and\nits answer will be on the read.\n",
        "operationId": "post_data_service_sessions_refresh",
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          },
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "description": "The service's product reference (PRI, Opticomm product) or service reference (AVC).",
            "schema": {
              "type": "string"
            },
            "example": "OPI000000000301"
          }
        ],
        "responses": {
          "202": {
            "description": "The test is asked for.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before reading the sessions.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "id",
                        "testId",
                        "status",
                        "message"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "The service's product reference."
                        },
                        "testId": {
                          "type": "string",
                          "description": "The Session History test's reference.",
                          "example": "OTR000000004851"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "Requested"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "A Session History test is already on its way.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "status",
                        "code",
                        "reason"
                      ],
                      "properties": {
                        "status": {
                          "type": "integer"
                        },
                        "code": {
                          "type": "string"
                        },
                        "reason": {
                          "type": "string"
                        },
                        "testId": {
                          "type": "string",
                          "description": "The running test's reference. Absent when it was started elsewhere and is not yet known here."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          }
        },
        "tags": [
          "Data Services"
        ]
      }
    },
    "/data/services/{ref}/health": {
      "post": {
        "summary": "Request a Service Health Report",
        "description": "Ask the carrier for a new health report on the service, as the portal's\nservice page does. The same call for an NBN and an Opticomm service.\nThis is a request to the carrier, so it needs `data:update`.\n\nLimit: 30 per minute for the account (carrier write).\n\n`202` says the report is asked for, and gives its `id`. It is on GET\n/data/health/{id} once the carrier answers, and the\n`serviceHealth.reportReady` webhook says when. `409` says a report is\nalready on its way: `error.reportId` names it. A report still not\nanswered after an hour no longer blocks a new one.\n\nThe carrier's own calls (POST /nbn/service_health/service/{serviceRef},\nPOST /opticomm/serviceHealth) still work, with the carrier's bodies.\n",
        "operationId": "post_data_service_health",
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          },
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "description": "The service's product reference (PRI, Opticomm product) or service reference (AVC, OAC).",
            "schema": {
              "type": "string"
            },
            "example": "PRI000123456789"
          }
        ],
        "responses": {
          "202": {
            "description": "The report is asked for.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "id",
                        "serviceId",
                        "status",
                        "requestedAt",
                        "message"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "The report's id.",
                          "example": "HRI000000004847"
                        },
                        "serviceId": {
                          "type": "string",
                          "description": "The service's product reference."
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending"
                          ]
                        },
                        "requestedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "A health report is already on its way.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "status",
                        "code",
                        "reason"
                      ],
                      "properties": {
                        "status": {
                          "type": "integer"
                        },
                        "code": {
                          "type": "string"
                        },
                        "reason": {
                          "type": "string"
                        },
                        "reportId": {
                          "type": "string",
                          "description": "The id of the report on its way. Absent when it was asked for elsewhere and is not yet known here."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          }
        },
        "tags": [
          "Data Services"
        ]
      },
      "get": {
        "summary": "List a Service's Health Reports",
        "description": "The service's health reports, newest first, pending ones included, in\nthe same shape on every network. `overall` is the result the portal's\nservice page shows.\n",
        "operationId": "get_data_service_health",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "description": "The service's product reference (PRI, Opticomm product) or service reference (AVC, OAC).",
            "schema": {
              "type": "string"
            },
            "example": "PRI000123456789"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "total",
                    "page",
                    "perPage",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DataServiceHealthReport"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data Services"
        ]
      }
    },
    "/data/services/{ref}/health/latest": {
      "get": {
        "summary": "Get a Service's Latest Health Report",
        "description": "The service's newest health report, pending or complete, in the same\nshape on every network. `404` when none has been asked for.\n",
        "operationId": "get_data_service_health_latest",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "description": "The service's product reference (PRI, Opticomm product) or service reference (AVC, OAC).",
            "schema": {
              "type": "string"
            },
            "example": "PRI000123456789"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/DataServiceHealthReport"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data Services"
        ]
      }
    },
    "/data/health/{id}": {
      "get": {
        "summary": "Get a Health Report",
        "description": "One health report on one of your data services, by the `id` that\nPOST /data/services/{ref}/health answered or the\n`serviceHealth.reportReady` webhook named.\n",
        "operationId": "get_data_health_report",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The report's id.",
            "schema": {
              "type": "string"
            },
            "example": "HRI000000004847"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/DataServiceHealthReport"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data Services"
        ]
      }
    },
    "/data/services/{ref}/tags": {
      "put": {
        "summary": "Set a Service's Tags",
        "description": "Your own tags on the service, so you can map it to your sites, cost\ncentres or customers. The list you send replaces the whole list; `[]`\nclears it. Filter the services and orders lists by tag with `tag`.\n\nEach tag is trimmed, at most 255 characters, and matched ignoring case:\n`Brisbane Office` and `brisbane office` are one tag, kept as first\nwritten. A service carries at most 20. Anything else is `422`.\n\nTags you send with POST /data/orders are carried to the service the\norder builds.\n",
        "operationId": "put_data_service_tags",
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          },
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "description": "The service's product reference (PRI, Opticomm product) or service reference (AVC).",
            "schema": {
              "type": "string"
            },
            "example": "PRI000123456789"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "tags"
                ],
                "properties": {
                  "tags": {
                    "type": "array",
                    "maxItems": 20,
                    "items": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "example": [
                      "Site 12",
                      "Cost Centre 4"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "id",
                        "tags"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "The service's product reference."
                        },
                        "tags": {
                          "type": "array",
                          "description": "The tags the service now carries.",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data Services"
        ]
      }
    },
    "/data/tags": {
      "get": {
        "summary": "List Your Tags",
        "description": "Every tag on your data services and orders, each once (matched ignoring\ncase, in the spelling first written), with how many services and orders\ncarry it, by name. Use a name with `tag` on GET /data/services or GET\n/data/orders.\n",
        "operationId": "get_data_tags",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "total",
                    "page",
                    "perPage",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "name",
                          "services",
                          "orders"
                        ],
                        "properties": {
                          "name": {
                            "type": "string",
                            "example": "Site 12"
                          },
                          "services": {
                            "type": "integer",
                            "description": "How many of your services carry it."
                          },
                          "orders": {
                            "type": "integer",
                            "description": "How many of your orders carry it."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data Services"
        ]
      }
    },
    "/data/radius": {
      "get": {
        "summary": "List Your RADIUS Users",
        "description": "Your active RADIUS users, one row each with its realm, by username, paged\nlike every list. `realm` narrows the list to one realm. `q` searches the\nusername and the user reference.\n\nServices that authenticate on their access circuit rather than a login\nhave no realm: their `realm` is `null`.\n",
        "operationId": "get_data_radius_users",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "realm",
            "in": "query",
            "required": false,
            "description": "Only users in this realm, such as `example.net.au`. Case does not matter. A value that is not a realm name is `422`.",
            "schema": {
              "type": "string"
            },
            "example": "example.net.au"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Order by this field, `-` in front for descending. An unknown field is `422`.",
            "schema": {
              "type": "string",
              "enum": [
                "username",
                "-username",
                "createdAt",
                "-createdAt"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Q"
          },
          {
            "$ref": "#/components/parameters/UpdatedSince"
          },
          {
            "$ref": "#/components/parameters/CreatedFrom"
          },
          {
            "$ref": "#/components/parameters/CreatedTo"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "total",
                    "page",
                    "perPage",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "username",
                          "realm"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "example": "USR123456789011"
                          },
                          "username": {
                            "type": "string",
                            "example": "smith-family@example.net.au"
                          },
                          "realm": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Everything after the `@` in the username; null for a user with no realm.",
                            "example": "example.net.au"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data RADIUS"
        ]
      }
    },
    "/data/radius/realms": {
      "post": {
        "summary": "Request a Realm",
        "description": "Request a PPPoE realm for your account.\n\nEvery PPPoE username is namespaced into your realm, so a realm is\nglobally unique and effectively permanent once services are built on it.\nRequests are reviewed by Check Networks rather than granted immediately,\nand PPPoE services cannot be provisioned until yours is in place.\n\nUse a domain you control.\n",
        "operationId": "post_data_radius_realm",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:create"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "realm"
                ],
                "properties": {
                  "realm": {
                    "type": "string",
                    "maxLength": 80,
                    "pattern": "^[A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?(\\.[A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?)+$",
                    "description": "The realm you would like, as a domain name.",
                    "example": "example.net.au"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "x-summary": "Accepted",
            "description": "Requested, not granted. The realm is held as `Pending` until Check Networks confirms it, and PPPoE ordering stays closed until then — which is why this is `202` rather than `201`.\n\nThe `Location` header names where to poll: *Retrieve a Realm* reports the request as `Pending`, `Approved` or `Rejected` (with the reason), and `Active` once the realm is on your account. The `data.realm.approved` and `data.realm.rejected` webhooks carry the decision if you subscribe to them, so polling is optional.",
            "headers": {
              "Location": {
                "description": "Where to poll for the decision.",
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "realm": {
                          "type": "string",
                          "example": "example.net.au"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "Pending"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data RADIUS"
        ]
      }
    },
    "/data/radius/realms/{realm}": {
      "get": {
        "summary": "Retrieve a Realm",
        "description": "Your realm and how many active users sit in it, or a realm you have\nrequested and where that request stands.\n\nThis is the resource the `Location` header of *Request a Realm* points\nat. Poll it until `status` leaves `Pending`: `Active` means the realm is\nyours and PPPoE can be ordered; `Rejected` carries the reason. A realm\nneither yours nor requested by you is a `404`.\n",
        "operationId": "get_data_radius_realm",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "realm",
            "in": "path",
            "required": true,
            "description": "The realm.",
            "schema": {
              "type": "string"
            },
            "example": "example.net.au"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "realm": {
                          "type": "string",
                          "example": "example.net.au"
                        },
                        "status": {
                          "type": "string",
                          "description": "`Active` once the realm is on your account. A request you have made is `Pending` until Check Networks decides it, then `Approved` (and `Active` from the next read) or `Rejected`.",
                          "enum": [
                            "Active",
                            "Pending",
                            "Approved",
                            "Rejected"
                          ]
                        },
                        "reason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Why a request was rejected; null otherwise."
                        },
                        "users": {
                          "type": "integer",
                          "description": "Active RADIUS users in this realm (0 for a request)."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data RADIUS"
        ]
      }
    },
    "/data/radius/{ref}": {
      "get": {
        "summary": "Retrieve a RADIUS User",
        "description": "One RADIUS user.\n\nAddress it by its own reference, or by any reference you already hold for\nthe service — the order id, the product reference, or the service id.\nThere is one user per service, so all of them resolve to the same record.\n\nThe record carries the RADIUS detail: whether the address is static, the\nCGNAT public address and ports, IPv6, the last authentication and recent\ndropouts. For a service on Kinetix's RADIUS it is read live from Kinetix\non each request; if Kinetix does not answer, `detailAvailable` is false\nand the detail fields are null.\n",
        "operationId": "get_data_radius_user",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "description": "A RADIUS user (USR…), order, product or service reference.",
            "schema": {
              "type": "string"
            },
            "example": "USR123456789011"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/DataRadiusUser"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data RADIUS"
        ]
      }
    },
    "/data/radius/{ref}/online": {
      "get": {
        "summary": "Check Whether a User Is Online",
        "description": "Whether the user has a session up right now. A session that has stopped\nreporting accounting is treated as gone.\n\nFor a service on Kinetix's RADIUS, the answer is read live from Kinetix\non each request. If Kinetix does not answer, the request fails with a 502\nrather than guess.\n\nFor a service on Opticomm's RADIUS, the answer comes from the latest\nsession check at Opticomm, with `retrievedAt` saying when Opticomm\nreported it. Reading never asks Opticomm: a check is asked for with\n`POST /data/radius/{ref}/session-check`. While one is on its way this\nanswers `202`: call again after `Retry-After`, or subscribe to\n`data.radius.sessionRetrieved`. With no check held it answers\n`status: NotChecked`, and neither online nor offline.\n\nA service handed to you at layer 2 on your interconnect never logs on to\nour RADIUS: it answers `status: NotOnOurRadius`, and neither online nor\noffline.\n\nLimit: 2 a second and 30 a minute for the account, shared with\n`DELETE /data/radius/{ref}/session`.\n",
        "operationId": "get_data_radius_user_online",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "description": "A RADIUS user (USR…), order, product or service reference.",
            "schema": {
              "type": "string"
            },
            "example": "USR123456789011"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "oneOf": [
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "source",
                            "online"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "example": "USR123456789011"
                            },
                            "source": {
                              "type": "string",
                              "enum": [
                                "checknetworks",
                                "kinetix",
                                "opticomm"
                              ],
                              "description": "Where the answer came from: our own RADIUS sessions, Kinetix's RADIUS, read live, or Opticomm's session history."
                            },
                            "online": {
                              "type": "boolean"
                            },
                            "retrievedAt": {
                              "type": "string",
                              "format": "date-time",
                              "description": "For an `opticomm` answer only: when Opticomm reported it."
                            }
                          }
                        },
                        {
                          "$ref": "#/components/schemas/DataRadiusNotChecked"
                        },
                        {
                          "$ref": "#/components/schemas/DataRadiusNotOnOurRadius"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/DataRadiusRetrieving"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          }
        },
        "tags": [
          "Data RADIUS"
        ]
      }
    },
    "/data/radius/{ref}/password": {
      "get": {
        "summary": "Retrieve a User's Password",
        "description": "The password this user authenticates with.\n\nA password is a secret, so this call needs the `data:credentials` scope;\na `data:read` key gets `403`. Only a live service answers: a cancelled or\nsuspended one is `404`.\n\nEvery read is recorded against the service. A service that authenticates\non its access circuit has no password to return.\n",
        "operationId": "get_data_radius_user_password",
        "security": [
          {
            "OAuth2": [
              "data:credentials"
            ]
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "description": "A RADIUS user (USR…), order, product or service reference.",
            "schema": {
              "type": "string"
            },
            "example": "USR123456789011"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "example": "USR123456789011"
                        },
                        "username": {
                          "type": "string",
                          "example": "smith-family@example.net.au"
                        },
                        "password": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data RADIUS"
        ]
      },
      "patch": {
        "summary": "Change a User's Password",
        "description": "Set a new password for this user.\n\nA change is accepted only where it takes effect: a live PPPoE service\nthat logs on to Check Networks' own RADIUS, while PPPoE is offered.\nAnything else is `422` and nothing is changed:\n\n- PPPoE is not offered (Check Networks has switched it off);\n- the service is not live (suspended or cancelled);\n- the service logs on at the carrier, which holds its password;\n- the service does not log on with a password at all (IPoE).\n\nA reference that is not one of your services is `404`, whatever the\nbody holds.\n\nThe password is 8 to 64 printable ASCII characters (letters, digits,\nspaces and symbols), with no `'` or `\\`; the same rule as a password\nchosen at provisioning.\n\nThe service keeps its current session and re-authenticates with the new\npassword the next time it connects, so the CPE has to be reconfigured to\nmatch. Changes are recorded against the service in the same way as reads.\n",
        "operationId": "patch_data_radius_user_password",
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          },
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "description": "A RADIUS user (USR…), order, product or service reference.",
            "schema": {
              "type": "string"
            },
            "example": "USR123456789011"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "password"
                ],
                "properties": {
                  "password": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 64,
                    "pattern": "^[\\x20-\\x26\\x28-\\x5B\\x5D-\\x7E]+$",
                    "description": "The new password: 8 to 64 printable ASCII characters, with no single quote (') or backslash (\\)."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "example": "USR123456789011"
                        },
                        "username": {
                          "type": "string",
                          "example": "smith-family@example.net.au"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data RADIUS"
        ]
      }
    },
    "/data/radius/{ref}/session": {
      "get": {
        "summary": "Retrieve the Current Session",
        "description": "The user's current session — when it came up, how long it has been up,\nthe address it holds and the traffic it has passed.\n\n`result` is null where nothing is connected.\n\nFor a service on Kinetix's RADIUS, the session is read live from Kinetix\non each request. If Kinetix does not answer, the request fails with a 502,\nso a null `result` always means nothing is connected.\n\nFor a service on Opticomm's RADIUS, the session comes from the latest\nsession check at Opticomm; its `lastSeenAt` is when Opticomm reported\nit. Reading never asks Opticomm: a check is asked for with\n`POST /data/radius/{ref}/session-check`. While one is on its way this\nanswers `202`: call again after `Retry-After`, or subscribe to\n`data.radius.sessionRetrieved`. With no check held it answers\n`status: NotChecked`, never a null that would read as not connected.\n\nA service handed to you at layer 2 on your interconnect never logs on to\nour RADIUS: it answers `status: NotOnOurRadius`, never a null.\n",
        "operationId": "get_data_radius_user_session",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "description": "A RADIUS user (USR…), order, product or service reference.",
            "schema": {
              "type": "string"
            },
            "example": "USR123456789011"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/DataRadiusSession"
                        },
                        {
                          "$ref": "#/components/schemas/DataRadiusNotChecked"
                        },
                        {
                          "$ref": "#/components/schemas/DataRadiusNotOnOurRadius"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/DataRadiusRetrieving"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          }
        },
        "tags": [
          "Data RADIUS"
        ]
      },
      "delete": {
        "summary": "Reset the Current Session",
        "description": "Drop the user's live session, so the service connects again on its own\nand picks up a new password or plan. For a live service on our own\nnetwork; a service on a carrier's RADIUS keeps its session there. A\nsuspended account cannot reset a session.\n\nLimit: 2 a second and 30 a minute for the account, shared with GET\n/data/radius/{ref}/online. Past it the answer is `429` with\n`Retry-After`.\n\n`202` says the session was dropped. `409` with `no_live_session` says\nnothing is connected. `422` with `session_not_resettable` says the\nsession is on a network where it cannot be reset (the legacy NAS, a\ncarrier's RADIUS, or a service handed to you at layer 2, which has no\nsession here), and a plain `422` that the service is not live.\n",
        "operationId": "delete_data_radius_user_session",
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          },
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "description": "A RADIUS user (USR…), order, product or service reference.",
            "schema": {
              "type": "string"
            },
            "example": "USR123456789011"
          }
        ],
        "responses": {
          "202": {
            "description": "The session was dropped.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "id",
                        "status",
                        "message"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "example": "USR123456789011"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "Reset"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          }
        },
        "tags": [
          "Data RADIUS"
        ]
      }
    },
    "/data/radius/{ref}/session-check": {
      "post": {
        "summary": "Check a User's Session at Opticomm",
        "description": "Ask Opticomm for the user's session now, by starting a Session History\ntest there. For a live service on Opticomm's RADIUS only: the other\nservices' GET /data/radius/{ref}/online and /session are read live. This\nis a request to the carrier, so it needs `data:update`, and a suspended\naccount cannot make it.\n\nLimit: 30 per minute for the account (carrier write).\n\n`202` says the check is on its way; a check already on its way is\nreused, not asked for twice. The answer is on GET\n/data/radius/{ref}/online and /session once Opticomm gives it, usually\nwithin a minute or two, and the `data.radius.sessionRetrieved` webhook\nsays when. If Opticomm refused the last check under five minutes ago,\nor does not answer, this fails with a 502.\n",
        "operationId": "post_data_radius_user_session_check",
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          },
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "description": "A RADIUS user (USR…), order, product or service reference.",
            "schema": {
              "type": "string"
            },
            "example": "USR123456789011"
          }
        ],
        "responses": {
          "202": {
            "$ref": "#/components/responses/DataRadiusRetrieving"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          }
        },
        "tags": [
          "Data RADIUS"
        ]
      }
    },
    "/data/usage": {
      "get": {
        "summary": "List Every Service's Usage for a Month",
        "description": "One month of data usage for every data service on your account, one row\nper service, paged: what you need to bill or warn your end users, in one\ncall rather than one per service. Each row's totals are the ones\n`GET /data/services/{ref}/usage` gives for the same month. Usage is\nreported, never charged.\n\n`period` is a month, `YYYY-MM`, in the last 13 months; the current month\nby default, counted up to now (`complete` is false). Months follow your\nbill's calendar, as on the per-service read. A service disconnected\nbefore the month began has no row.\n",
        "operationId": "get_data_usage",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "required": false,
            "description": "The month, `YYYY-MM`. Defaults to the current month.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}$"
            },
            "example": "2026-10"
          },
          {
            "name": "network",
            "in": "query",
            "required": false,
            "description": "Only services on these networks, one or several, comma-separated. Case does not matter; any other value is `422`.",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "nbn",
                  "opticomm"
                ]
              }
            }
          },
          {
            "name": "endUser",
            "in": "query",
            "required": false,
            "description": "Only the services of this end user, by its public number. A number that is not one of your end users is a 422, not an empty list.",
            "schema": {
              "type": "string",
              "maxLength": 64,
              "example": "100042"
            }
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "total",
                    "page",
                    "perPage",
                    "results",
                    "period",
                    "from",
                    "to"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer",
                      "description": "Every service that matches, across all pages."
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "period": {
                      "type": "string",
                      "example": "2026-10"
                    },
                    "from": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "to": {
                      "type": "string",
                      "format": "date-time",
                      "description": "The month's end, or now for the current month."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DataUsageRow"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data Services"
        ]
      }
    },
    "/data/sq/{locId}": {
      "parameters": [
        {
          "name": "locId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The premises to qualify — an NBN Location ID (LOC…) or an Opticomm Property ID (OPC…). Use the address search endpoints to find these."
        }
      ],
      "get": {
        "summary": "Qualify a premises on whichever network serves it",
        "description": "One carrier-neutral qualification document. An NBN Location ID runs the NBN single-site qualification plus an Enterprise Ethernet check; an Opticomm Property ID runs the Opticomm qualification and, where the premises also has an NBN footprint, the Enterprise Ethernet check against it. The carrier-shape endpoints under /nbn/service_qualification and /opticomm/service_qualification stay available for the fuller per-carrier documents.\n\nThe Service Transfer parameters apply to NBN locations only — either with an Opticomm Property ID is rejected with a 422 naming the field.",
        "operationId": "get_data_service_qualification",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "serviceRef",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "(Conditional, NBN only) Existing Service ID for Service Transfer — the entire AVC # or its last 5 digits. Requires `customerAuthorityDate`; indicates the matching resource via `serviceIdMatch` on the `resources` entries, with validation issues surfaced in `siteRestrictionError`.\n"
          },
          {
            "name": "customerAuthorityDate",
            "in": "query",
            "schema": {
              "type": "string",
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "string",
                  "format": "date-time"
                }
              ]
            },
            "description": "(Conditional) The date Customer Authority was obtained for the premises, as `YYYY-MM-DD` (a date-time is read as its date); must be less than 45 days old. Mandatory with `serviceRef`.\n"
          },
          {
            "name": "potsInterconnect",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "(Optional, NBN only) Existing Full National Number (FNN) or ULL ID to check against."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/DataServiceQualification"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Data Service Qualification"
        ]
      }
    },
    "/nbn/address/geocode": {
      "parameters": [
        {
          "name": "latitude",
          "in": "query",
          "schema": {
            "type": "number"
          },
          "required": true,
          "description": "Geographic latitude coordinate of the address."
        },
        {
          "name": "longitude",
          "in": "query",
          "schema": {
            "type": "number"
          },
          "required": true,
          "description": "Geographic longitude coordinate of the address."
        },
        {
          "name": "limit",
          "in": "query",
          "schema": {
            "type": "integer"
          },
          "description": "Limit the amount of locations returned. Leave empty to return all available results."
        }
      ],
      "get": {
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "description": "Locations matching the supplied coordinates.",
                  "items": {
                    "$ref": "#/components/schemas/GeographicAddress"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "summary": "Request nbn™ Location IDs (LOC #) for a Latitude and Longitude",
        "description": ">**Required Scope(s):** data:read\n\nKinetix's own answer: a bare array of addresses, without a `results`\nwrapper.\n",
        "operationId": "get_geocode",
        "tags": [
          "Address"
        ]
      }
    },
    "/nbn/address/search": {
      "parameters": [
        {
          "name": "secondaryComplexName",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "Name associated with a building or area within a complex site.\nThis data element may represent the name given to an entire building within an address site that has its own separate address."
        },
        {
          "name": "unitTypeCode",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "Sub dwelling unit type code.\nWithin a complex, an abbreviation used to distinguish the type of an address found within a building / sub-complex or marina."
        },
        {
          "name": "unitNumber",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "Sub-dwelling unit number.\nWithin a complex, a number used to distinguish an address found within a building / sub-complex or marina.\nThe data element may include a leading alphabetic prefix. The data element may include a trailing alphabetic suffix."
        },
        {
          "name": "levelNumber",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "Within a complex, the number of the floor or level of a multi-storey building/ sub-complex.\nThe data element may include a leading alphabetic prefix. The data element may include a trailing alphabetic suffix."
        },
        {
          "name": "complexRoadNumber1",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "Within a complex, identifies the number of the address in the road or thoroughfare and for a ranged address is the start number."
        },
        {
          "name": "complexRoadNumber2",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "Within a complex, identifies the last number for a ranged address in the road or thoroughfare."
        },
        {
          "name": "complexRoadName",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "Within a complex, the name of the road /thoroughfare of the address. Within a Road name it is possible to find what appears to be a Road type (eg. The Boulevard).\nIt is also possible to have a null Road type."
        },
        {
          "name": "complexRoadTypeCode",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "Within a complex, an abbreviation used to distinguish the type of road / thoroughfare of the address."
        },
        {
          "name": "complexRoadSuffixCode",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "Within a complex, an abbreviation representing the suffix of the road/ thoroughfare of the address."
        },
        {
          "name": "addressSiteName",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "Synonyms: Building property name, Primary Complex name\n\nThe official place name or culturally accepted common usage name for an address site, including the name of a building, homestead, building complex, agricultural property, park or unbounded address site. This data element represents the name given to an entire building or address site"
        },
        {
          "name": "lotNumber",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "The Lot number is a reference number allocated to a property for subdivision administration purposes prior to road numbering.\n\nUsage: Where an official Road number has not been assigned, this field may be used for postal purposes as well as the physical identification of an address site."
        },
        {
          "name": "planNumber",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "The deposited plan number allocated to a property for subdivision administration purposes prior to road numbering in addition to the Lot number."
        },
        {
          "name": "roadNumber1",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "Identifies the number of the address in the road or thoroughfare and for a ranged address is the start number.\nThe data element may include an alphabetic prefix. The data element may include an alphabetic suffix."
        },
        {
          "name": "roadNumber2",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "Identifies the last number for a ranged address in the road or thoroughfare.\nThe data element may include an alphabetic prefix. The data element may include an alphabetic suffix.\nThis data element is used for ranged street numbers otherwise it is left blank."
        },
        {
          "name": "roadName",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "The name of the road/thoroughfare applicable to the address site or complex.\nOnly the road name should be stored in this data element."
        },
        {
          "name": "roadTypeCode",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "The abbreviation code used to distinguish the type of road/thoroughfare applicable to the address site/complex."
        },
        {
          "name": "roadSuffixCode",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "The abbreviation code used to represent the suffix of road/thoroughfare applicable to the address site/complex."
        },
        {
          "name": "localityName",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "The name of the locality/suburb of the address."
        },
        {
          "name": "postcode",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "The Australian numeric descriptor for a postal delivery area, aligned with locality, suburb or place\n\n*Mandatory if stateTerritoryCode not provided"
        },
        {
          "name": "stateTerritoryCode",
          "in": "query",
          "schema": {
            "type": "string",
            "enum": [
              "ACT",
              "NSW",
              "NT",
              "QLD",
              "SA",
              "TAS",
              "VIC",
              "WA"
            ]
          },
          "description": "The State or Territory code of the address.\n\n*Mandatory if postcode not provided"
        },
        {
          "name": "gnaf",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "Geocoded National Address File (GNAF) ID"
        },
        {
          "name": "latitude",
          "in": "query",
          "schema": {
            "type": "number"
          },
          "description": "Geographic latitude coordinate of the address."
        },
        {
          "name": "longitude",
          "in": "query",
          "schema": {
            "type": "number"
          },
          "description": "Geographic longitude coordinate of the address."
        },
        {
          "name": "fullText",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "Try and parse an entire address string."
        },
        {
          "name": "adjustFullText",
          "in": "query",
          "schema": {
            "type": "boolean"
          },
          "description": "[beta] (Optional) Have Check Networks internally adjust the `.fullText` value when querying nbn&trade; to obtain better search results.\nThe adjustments will change over time and may include:\n - Removing the Country\n - Inserting the missing State when PostCode is included\n - Reordering State and Postcode. e.g., \"2000 NSW\" >> \"NSW 2000\"\n - Changing Road Types to their codes. e.g. \"Street\" >> \"ST\"\n - Adding sub-premise prefix. e.g. \"2 12 Some St\" >> \"UNIT 2 12 Some St\"\n - Stripping excess spaces. e.g. \"12 - 24 Some St\" >> \"12-24 Some St\"\n"
        },
        {
          "name": "requeryFullText",
          "in": "query",
          "schema": {
            "type": "boolean"
          },
          "description": "[beta] (Optional) Do an internal requery to nbn&trade; when there are no results to an address search.\nFor a full text query, this will attempt to split the `fullText` value into its component parts for use in an Advanced Search.\nFor an advanced query, this will attempt to construct a full text string from the address components for use in a full text search.\nThis will only occur when the initial query to nbn&trade; returns no results.\n"
        },
        {
          "name": "rankResults",
          "in": "query",
          "schema": {
            "type": "boolean"
          },
          "description": "[beta] (Optional) Attach a rank to each of the query results.\nThis rank will be a number between 0 and 100, indicating how well the result matches your initial search. A higher rank represents a better match."
        },
        {
          "name": "fuzzy",
          "in": "query",
          "schema": {
            "type": "boolean"
          },
          "description": "Enable Fuzzy searching for more, but less accurate, search results."
        },
        {
          "name": "limit",
          "in": "query",
          "schema": {
            "type": "integer",
            "minimum": 1,
            "maximum": 500,
            "default": 50
          },
          "description": "Limit the amount of results returned, from 1 to 500. A value outside that range is brought into it. Defaults to 50 when not supplied."
        }
      ],
      "get": {
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "description": "Locations matching the search criteria.",
                  "items": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/GeographicAddress"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "rank": {
                            "type": "number",
                            "description": "How well this result matches the initial search, as a number between 0 and 100. A higher rank represents a better match. Only present when the `rankResults` parameter is true."
                          }
                        }
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "summary": "Request the nbn™ Location ID (LOC #) for an address",
        "description": ">**Required Scope(s):** data:read\n\nAlso returns the official address details. Kinetix's own answer: a bare\narray of addresses, without a `results` wrapper.\n\nSupply at least one of: a `gnaf` ID, a `fullText` address string,\n`latitude`+`longitude` coordinates, or physical address fields (where\n`postcode` or `stateTerritoryCode` is mandatory). Unsupported parameter\ncombinations return `400 Bad Request` with the reason.\n",
        "operationId": "get_search",
        "tags": [
          "Address"
        ]
      }
    },
    "/nbn/address/{locId}": {
      "parameters": [
        {
          "name": "locId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeographicAddress"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "summary": "Get the address details for a nbn™ Location ID (LOC #)",
        "description": ">**Required Scope(s):** data:read\n\nKinetix's own address body, without a `result` wrapper.\n\nTo try calls without reaching the carrier, use the\n[sandbox](https://help.checknetworks.tools/api/sandbox/) with one of\nyour account's [test addresses](https://help.checknetworks.tools/api/sandbox/#addresses).\n",
        "operationId": "get_single_address",
        "tags": [
          "Address"
        ]
      }
    },
    "/nbn/address/{locId}/services": {
      "parameters": [
        {
          "name": "locId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/AddressServices"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "summary": "List the known services that you have active at this location",
        "description": ">**Required Scope(s):** data:read\n\nLists your account's own NBN services provisioned at this location\n(keyed by the NBN LOC id). Services at this location managed by other\nproviders are not listed. A location you hold no service at returns an\nempty list.\n",
        "operationId": "get_services",
        "tags": [
          "Address"
        ]
      }
    },
    "/nbn/appointments/appointment/{appointmentId}": {
      "parameters": [
        {
          "name": "appointmentId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/Appointment"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "summary": "Retrieve the details of an Appointment from nbn",
        "description": ">**Required Scope(s):** data:read\n",
        "operationId": "get_appointment",
        "tags": [
          "Appointments"
        ]
      },
      "delete": {
        "security": [
          {
            "OAuth2": [
              "data:delete"
            ]
          }
        ],
        "description": ">**Required Scope(s):** data:delete\n\nLimit: 30 per minute for the account (carrier write).\n\nCancels one of your appointments and answers the carrier's reply. This\ncall needs an `Idempotency-Key` header.\n",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/CreateAppointmentResponse"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "summary": "Remove an Appointment with NBN",
        "operationId": "delete_appointment",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "tags": [
          "Appointments"
        ]
      },
      "patch": {
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** data:update\n\nLimit: 30 per minute for the account (carrier write).\n\nUpdates the end-user contact, site access or slot of one of your\nappointments. The carrier needs the contact on every update. The RSP\nreference at the carrier is ours: `rspReference` cannot be supplied. This\ncall needs an `Idempotency-Key` header.\n",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/CreateAppointmentResponse"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "summary": "Update an Appointment with NBN",
        "operationId": "patch_appointment",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "endUserContactType",
                  "endUserContactName",
                  "endUserContactPhone"
                ],
                "properties": {
                  "endUserContactType": {
                    "type": "string",
                    "enum": [
                      "Primary Contact",
                      "Secondary Contact"
                    ],
                    "description": "End User, Type of Contact Person."
                  },
                  "endUserContactName": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "End User, Name of Contact Person."
                  },
                  "endUserContactPhone": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "End User, Contact Phone Number."
                  },
                  "endUserContactEmail": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 255,
                    "description": "(Optional) End User, Contact Email Address."
                  },
                  "endUserContactNotes": {
                    "type": "string",
                    "maxLength": 1000,
                    "description": "(Optional) End User, Notes."
                  },
                  "siteAccessConditions": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "(Optional) Site Access Details: Special conditions that nbn technicians will need to be aware of."
                  },
                  "siteAccessNotes": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "(Optional) Site Access Details: Any other information for the nbn technicians.  Max length: 500"
                  },
                  "siteAccessInstructions": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "(Optional) Site Access, Instructions for Site Access"
                  },
                  "siteAccessInduction": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "(Optional) Site Access, Site Induction Requirements. Max length: 500"
                  },
                  "siteAccessConsiderations": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "(Optional) Site Access Details: Site Considerations.\nAny (comma separated) combination of \"Heritage\", \"Environmental\", \"Cultural\" and additional clarifying free text."
                  },
                  "siteAccessBuildingName": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "(Optional) Site Access, Building Name. Max length: 100"
                  },
                  "siteAccessBuildingType": {
                    "type": "string",
                    "enum": [
                      "ATM",
                      "Education",
                      "Gas Meter",
                      "Government Site",
                      "Industrial",
                      "Kiosk",
                      "Medical/Hospital",
                      "Multi Dwelling Unit",
                      "Payphone",
                      "Power Sub-Station",
                      "Residential",
                      "Shopping Centre",
                      "Single Dwelling Unit",
                      "Strip Shop",
                      "Transport"
                    ],
                    "description": "(Optional) Site Access, Building Type"
                  },
                  "siteAccessAccreditation": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "(Optional) Site Access Details: Accreditation Requirements.\nAllowed values: ('None', 'Unknown', 'Current White Card', 'Elevated Work Platform Rescue', 'Industry Recognised CPR Training Course', 'nbn Safety And Awareness', 'Permit', 'Police Check Required', 'Power Awareness', 'Remove non friable Asbestos', 'Security Clearance', 'Site Induction Essential', 'Site Access Clearance', 'Supervised Asbestos Removal', 'Working At Heights', 'Working With Children', 'Other')\nIf the value \"Other\" is selected, additional free text can be added to the string.  e.g., \"Other Your Details Here\".\nMax length: 500"
                  },
                  "siteAccessOperationalHours": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "(Optional) Site Access, Operational hours of the site"
                  },
                  "siteAccessHazards": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "(Optional) Site Access Details: Information relating to any hazards nbn technicians will need to be aware of."
                  },
                  "appointmentSlotType": {
                    "type": "string",
                    "enum": [
                      "AM",
                      "PM",
                      "AHA",
                      "CA"
                    ],
                    "description": "(Conditional) Type of Appointment Time Slot.\n\"AM\" (morning), \"PM\" (afternoon), \"AHA\" (after hours), \"CA\" (customer appointment)\nAfter Hours Appointment (AHA) windows are:\n • 5pm - 9pm (Monday to Friday)\n • 8am - 12pm (Saturday & Sunday)\n • 1pm - 5pm (Saturday & Sunday)\nAHA will apply to the following demand types:\n • Standard Installation\n • Non-Standard Installation\n"
                  },
                  "startDateTime": {
                    "type": "string",
                    "format": "date-time",
                    "description": "(Conditional) Set the start time of a new timeslot\nMust be a future time, but only up to 90 days.\nUse /appointments/query/reschedule to find available slots.\nExample: \"2020-07-27T06:52:52+10:00\""
                  },
                  "endDateTime": {
                    "type": "string",
                    "format": "date-time",
                    "description": "(Optional) Set the end time of a new timeslot.\nMust be a future time but only up to 90 days, and must be after the `startDateTime`.\nUse /appointments/query/reschedule to find available slots.\nExample: \"2020-07-27T06:52:52+10:00\""
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Appointments"
        ]
      }
    },
    "/nbn/appointments/appointment/{appointmentId}/reschedule": {
      "parameters": [
        {
          "name": "appointmentId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "patch": {
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/CreateAppointmentResponse"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "summary": "Reschedule an Appointment with NBN",
        "description": ">**Required Scope(s):** data:update\n\nLimit: 30 per minute for the account (carrier write).\n\nMoves one of your appointments to another slot. Use the\n/appointments/query/reschedule API to find an available timeslot. This\ncall needs an `Idempotency-Key` header.\n",
        "operationId": "patch_reschedule_appointment",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "appointmentSlotType",
                  "startDateTime"
                ],
                "properties": {
                  "appointmentSlotType": {
                    "type": "string",
                    "enum": [
                      "AM",
                      "PM",
                      "AHA",
                      "CA"
                    ],
                    "description": "Type of Appointment Time Slot.\n\"AM\" (morning), \"PM\" (afternoon), \"AHA\" (after hours), \"CA\" (customer appointment)\nAfter Hours Appointment (AHA) windows are:\n • 5pm - 9pm (Monday to Friday)\n • 8am - 12pm (Saturday & Sunday)\n • 1pm - 5pm (Saturday & Sunday)\nAHA will apply to the following demand types:\n • Standard Installation\n • Non-Standard Installation\n"
                  },
                  "startDateTime": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Set the start time of the new timeslot.\nMust be a future time, but only up to 90 days.\nUse /appointments/query/reschedule to find available slots.\nExample: \"2020-07-27T06:52:52+10:00\""
                  },
                  "endDateTime": {
                    "type": "string",
                    "format": "date-time",
                    "description": "(Optional) Set the end time of the new timeslot.\nMust be a future time but only up to 90 days, and must be after the `startDateTime`.\nUse /appointments/query/reschedule to find available slots.\nExample: \"2020-07-27T06:52:52+10:00\""
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Appointments"
        ]
      }
    },
    "/nbn/appointments/query/new": {
      "parameters": [
        {
          "name": "locId",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "required": true,
          "description": "The NBN Location ID for the target premises."
        },
        {
          "name": "startDateTime",
          "in": "query",
          "schema": {
            "type": "string",
            "format": "date-time"
          },
          "required": true,
          "description": "Find available timeslots from this time onwards.\nMust be a future time, but only up to 90 days.\nExample: \"2020-07-27T06:52:52+10:00\""
        },
        {
          "name": "endDateTime",
          "in": "query",
          "schema": {
            "type": "string",
            "format": "date-time"
          },
          "description": "(Optional) Only return timeslots that end before this time.\nMust be after `startDateTime`.\nExample: \"2020-07-27T06:52:52+10:00\""
        },
        {
          "name": "demandType",
          "in": "query",
          "schema": {
            "type": "string",
            "enum": [
              "Standard Install",
              "Service Restoration",
              "Non EU Jumper Only",
              "Non Standard Install",
              "Install - Deinstall",
              "Additional Install"
            ]
          },
          "required": true,
          "description": "The Demand Type of the appointment.\n - \"Standard Install\" - for most Activation appointments\n - \"Non EU Jumper Only\" - for NCAS SC12 Active lines where `installOptionCentralSplitter` = \"false\"\n - \"Additional Install\" - for installing Central Splitter at connected premises\n - \"Service Restoration\" - for restoring an affected active service\n - \"Install - Deinstall\" - for combined installation and de-installation work at the premises\n - \"Non Standard Install\" - for installations requiring non-standard work\n"
        },
        {
          "name": "appointmentSLA",
          "in": "query",
          "schema": {
            "type": "string",
            "enum": [
              "Accelerated",
              "Reduced Lead Time",
              "Standard"
            ]
          },
          "description": "(Conditional) Value for the Appointment SLA.\nRequired for Demand Type \"Standard Install\" and Appointment Slot Type \"AHA\".\nDo not specify for Demand Type \"Service Restoration\"."
        },
        {
          "name": "appointmentSlotType",
          "in": "query",
          "schema": {
            "type": "string",
            "enum": [
              "AM",
              "PM",
              "AHA",
              "CA"
            ]
          },
          "description": "(Optional) Type of Appointment Time Slot.\n\"AM\" (morning), \"PM\" (afternoon), \"AHA\" (after hours), \"CA\" (customer appointment)\nAfter Hours Appointment (AHA) windows are:\n • 5pm - 9pm (Monday to Friday)\n • 8am - 12pm (Saturday & Sunday)\n • 1pm - 5pm (Saturday & Sunday)\nAHA will apply to the following demand types:\n • Standard Installation\n • Non-Standard Installation\n"
        },
        {
          "name": "priorityAssist",
          "in": "query",
          "schema": {
            "type": "boolean",
            "default": false
          },
          "description": "(Optional) Priority Assist required or not: `true`/`false` or `1`/`0`.\nPriority timeslots will only be returned if \"true\" and the Appointment SLA value is \"Standard\".\nOnly specify \"true\" where the end user is eligible for a Downstream Priority Assistance Service in accordance with NBN Co's Wholesale Broadband Agreement.\n\"true\" is accepted only for a customer on our Priority Assistance register (the end user named in `endUser`, or when none is named the account or your own end user); otherwise the query is refused with a 422 on `priorityAssist` before the carrier is asked."
        },
        {
          "name": "endUser",
          "in": "query",
          "schema": {
            "type": "string",
            "maxLength": 64
          },
          "description": "(Optional) Ours, not the carrier's: the number of the end user the appointment is for, as `POST /data/orders` takes it. With `priorityAssist` \"true\" it is that end user's registration that counts; an end user that is not this account's is refused with a 422 on `priorityAssist`. Left out, the account's own registration counts, or the one on your own end user (made when you register yourself); another end user's counts only when named."
        },
        {
          "name": "alternativeTechnology",
          "in": "query",
          "description": "(Conditional) For FTTN/C Fibre Uplift appointments only.\nSpecify as \"Fibre\" if uplifting a FTTN or FTTC location to Fibre.",
          "schema": {
            "type": "string",
            "enum": [
              "Fibre"
            ]
          }
        }
      ],
      "get": {
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/SearchTimeSlot"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "summary": "Find timeslots for making a new Appointment",
        "description": ">**Required Scope(s):** data:read\n",
        "operationId": "get_new_time_slots",
        "tags": [
          "Appointments"
        ]
      }
    },
    "/nbn/appointments/query/reschedule": {
      "parameters": [
        {
          "name": "appointmentId",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "required": true,
          "description": "NBN Appointment ID. Cannot query for an Appointment where the Appointment is of Type \"Commitment\""
        },
        {
          "name": "startDateTime",
          "in": "query",
          "schema": {
            "type": "string",
            "format": "date-time"
          },
          "required": true,
          "description": "Find available timeslots from this time onwards.\nMust be a future time, but only up to 90 days.\nExample: \"2020-07-27T06:52:52+10:00\""
        },
        {
          "name": "endDateTime",
          "in": "query",
          "schema": {
            "type": "string",
            "format": "date-time"
          },
          "description": "(Optional) Only return timeslots that end before this time.\nMust be after `startDateTime`.\nExample: \"2020-07-27T06:52:52+10:00\""
        }
      ],
      "get": {
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/SearchTimeSlot"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "summary": "Find timeslots for rescheduling an Appointment",
        "description": ">**Required Scope(s):** data:read\n",
        "operationId": "get_reschedule_time_slots",
        "tags": [
          "Appointments"
        ]
      }
    },
    "/nbn/appointments/reserve": {
      "post": {
        "security": [
          {
            "OAuth2": [
              "data:create"
            ]
          }
        ],
        "description": ">**Required Scope(s):** data:create\n\nLimit: 30 per minute for the account (carrier write).\n\nReserves an appointment slot and answers the appointment. Use\n/appointments/query/new to find an available slot first. A reserved\ninstall appointment is booked by naming it on a Connect order, or by\n/orders/add_appointment for an order already placed.\n\nA Service Restoration appointment needs one of your services at the\nlocation. An install appointment comes before the order that books it,\nso instead an account may hold at most 5 open install reservations\n(reserved in the last 24 hours and not yet on an order); the sixth is\nrefused with `409` until one is attached or cancelled. It is not a rate\nlimit, so retrying without releasing one gets the same answer.\n\nThe RSP reference at the carrier is ours: `rspReference` cannot be\nsupplied. This call needs an `Idempotency-Key` header.\n",
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/Appointment"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The account already holds 5 open install reservations. Release one first, by attaching it to an order or cancelling it; retrying unchanged gets the same answer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "summary": "Create an appointment within NBN",
        "operationId": "post_reserve_appointment",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "locId",
                  "demandType",
                  "endUserContactType",
                  "endUserContactName",
                  "endUserContactPhone"
                ],
                "properties": {
                  "locId": {
                    "type": "string",
                    "description": "NBN Location ID of the premises that this appointment is for."
                  },
                  "demandType": {
                    "type": "string",
                    "enum": [
                      "Standard Install",
                      "Service Restoration",
                      "Non EU Jumper Only",
                      "Non Standard Install",
                      "Install - Deinstall",
                      "Additional Install"
                    ],
                    "description": "The Demand Type of the appointment.\n - \"Standard Install\" - for most Activation appointments\n - \"Non EU Jumper Only\" - for NCAS SC12 Active lines where `installOptionCentralSplitter` = \"false\"\n - \"Additional Install\" - for installing Central Splitter at connected premises\n - \"Service Restoration\" - for restoring an affected active service\n - \"Install - Deinstall\" - for combined installation and de-installation work at the premises\n - \"Non Standard Install\" - for installations requiring non-standard work\n"
                  },
                  "serviceRestorationSLA": {
                    "type": "string",
                    "enum": [
                      "Enhanced - 12",
                      "Enhanced - 12 (24/7)",
                      "Enhanced - 8",
                      "Enhanced - 8 (24/7)",
                      "Standard"
                    ],
                    "description": "(Conditional) Product Instance Service Restoration SLA.\nDo not specify for Activation appointments for new Orders."
                  },
                  "appointmentSlotType": {
                    "type": "string",
                    "enum": [
                      "AM",
                      "PM",
                      "AHA",
                      "CA"
                    ],
                    "description": "(Conditional) Type of Appointment Time Slot.\nThis value will be auto-detected for standard 'AM' or 'PM' timeslots, but this field must be specified for 'AHA' and 'CA' timeslots.\nIt is recommended to always set this value.\n'AM' (morning), 'PM' (afternoon), 'AHA' (after hours), 'CA' (customer appointment)\nAfter Hours Appointment (AHA) windows are:\n • 5pm - 9pm (Monday to Friday)\n • 8am - 12pm (Saturday & Sunday)\n • 1pm - 5pm (Saturday & Sunday)\nAHA will apply to the following demand types:\n • Standard Installation\n • Non-Standard Installation\n"
                  },
                  "appointmentSLA": {
                    "type": "string",
                    "enum": [
                      "Accelerated",
                      "Reduced Lead Time",
                      "Standard"
                    ],
                    "description": "(Conditional) The Appointment Service Level Agreement (SLA).\nField is required for Demand Type \"Standard Install\".\nDo not specify for Demand Type \"Service Restoration\"."
                  },
                  "startDateTime": {
                    "type": "string",
                    "format": "date-time",
                    "description": "(Conditional) Set the start time of a new timeslot. Must be a future time, but only up to 90 days.\nUse /appointments/query/new to find available slots.\nExample: \"2020-07-27T06:52:52+10:00\""
                  },
                  "endDateTime": {
                    "type": "string",
                    "format": "date-time",
                    "description": "(Optional) Set the end time of a new timeslot. Must be a future time but only up to 90 days, and must be after the `startDateTime`.\nUse /appointments/query/new to find available slots.\nExample: \"2020-07-27T06:52:52+10:00\""
                  },
                  "withinTimeWindow": {
                    "type": "boolean",
                    "description": "(Conditional) Appointment Slot, Within the Time Window."
                  },
                  "endUserType": {
                    "type": "string",
                    "enum": [
                      "Business",
                      "Residential"
                    ],
                    "description": "(Optional) Type of End-User"
                  },
                  "endUserContactType": {
                    "type": "string",
                    "enum": [
                      "Primary Contact",
                      "Secondary Contact"
                    ],
                    "description": "End User, Type of Contact Person."
                  },
                  "endUserContactName": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "End User, Name of Contact Person."
                  },
                  "endUserContactPhone": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "End User, Contact Phone Number."
                  },
                  "endUserContactEmail": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 255,
                    "description": "(Optional) End User, Contact Email Address."
                  },
                  "endUserContactNotes": {
                    "type": "string",
                    "maxLength": 1000,
                    "description": "(Optional) End User, Notes."
                  },
                  "siteAccessBuildingName": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "(Optional) Site Access Details: Building Name.\nMax length: 100"
                  },
                  "siteAccessBuildingType": {
                    "type": "string",
                    "enum": [
                      "ATM",
                      "Education",
                      "Gas Meter",
                      "Government Site",
                      "Industrial",
                      "Kiosk",
                      "Medical/Hospital",
                      "Multi Dwelling Unit",
                      "Payphone",
                      "Power Sub-Station",
                      "Residential",
                      "Shopping Centre",
                      "Single Dwelling Unit",
                      "Strip Shop",
                      "Transport"
                    ],
                    "description": "(Optional) Site Access Details: Building Type."
                  },
                  "siteAccessInstructions": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "(Optional) Site Access Details: Access Instructions.\nMax length: 500"
                  },
                  "siteAccessInduction": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "(Conditional) Site Access Details: Induction Requirements.\nMandatory if End User Type is \"Business\". Max length: 500"
                  },
                  "siteAccessAccreditation": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "(Conditional) Site Access Details: Accreditation Requirements.\nMandatory if End User Type is \"Business\".\nAllowed values: ('None', 'Unknown', 'Current White Card', 'Elevated Work Platform Rescue', 'Industry Recognised CPR Training Course', 'nbn Safety And Awareness', 'Permit', 'Police Check Required', 'Power Awareness', 'Remove non friable Asbestos', 'Security Clearance', 'Site Induction Essential', 'Site Access Clearance', 'Supervised Asbestos Removal', 'Working At Heights', 'Working With Children', 'Other')\nIf the value \"Other\" is selected, additional free text can be added to the string.  e.g., \"Other Your Details Here\".\nMax length: 500"
                  },
                  "siteAccessConsiderations": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "(Optional) Site Access Details: Site Considerations.\nAny (comma separated) combination of \"Heritage\", \"Environmental\", \"Cultural\" and additional clarifying free text."
                  },
                  "siteAccessOperationalHours": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "(Conditional) Site Access Details: Operational hours of the site.\nMandatory if End User Type is \"Business\""
                  },
                  "siteAccessHazards": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "(Optional) Site Access Details: Information relating to any hazards nbn technicians will need to be aware of."
                  },
                  "siteAccessConditions": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "(Optional) Site Access Details: Special conditions that nbn technicians will need to be aware of."
                  },
                  "siteAccessNotes": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "(Optional) Site Access Details: Any other information for the nbn technicians.  Max length: 500"
                  },
                  "relatedOrderId": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "(Optional) Related Entities, NBN Product Order ID\nThis will relate a Product Order to this Appointment record.\nIMPORTANT! This will not attach the Appointment to a related Connect Order. You must call the `/orders/add_appointment` API with the resulting APT # to attach to an order.\n"
                  },
                  "relatedProduct": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "(Optional) Related Entities, NBN Product ID"
                  },
                  "copperPairId": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "(Optional) Related Entities, NBN Copper Pair ID"
                  },
                  "priorityAssist": {
                    "type": "boolean",
                    "default": false,
                    "description": "(Optional) Priority Assist required or not.\nPriority timeslots will only be returned if \"true\" and the Appointment SLA value is \"Standard\".\nOnly specify \"true\" where the end user is eligible for a Downstream Priority Assistance Service in accordance with NBN Co's Wholesale Broadband Agreement.\n\"true\" is accepted only for a customer on our Priority Assistance register (the end user named in `endUser`, or when none is named the account or your own end user); otherwise the reservation is refused with a 422 on `priorityAssist` before the carrier is asked."
                  },
                  "endUser": {
                    "type": "string",
                    "maxLength": 64,
                    "description": "(Optional) Ours, not the carrier's: the number of the end user the appointment is for, as `POST /data/orders` takes it. With `priorityAssist` true it is that end user's registration that counts; an end user that is not this account's is refused with a 422 on `priorityAssist`. Left out, the account's own registration counts, or the one on your own end user (made when you register yourself); another end user's counts only when named."
                  },
                  "troubleTicketId": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "(Optional) ID of an NBN Trouble Ticket relevant to this appointment.\ne.g., \"INC190100002402\""
                  },
                  "incidentId": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "(Optional) ID of an NBN Incident report"
                  },
                  "alternativeTechnology": {
                    "type": "string",
                    "enum": [
                      "Fibre"
                    ],
                    "description": "(Conditional) For FTTN/C Fibre Uplift appointments only.\nSpecify as \"Fibre\" if uplifting a FTTN or FTTC location to Fibre."
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Appointments"
        ]
      }
    },
    "/nbn/appointments/service/{serviceRef}": {
      "parameters": [
        {
          "name": "serviceRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ServiceAppointments"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "summary": "List Appointments for a Service",
        "description": ">**Required Scope(s):** data:read\n\nNOTE: Dates are currently in UTC but will be changed to match the\noriginal time zone. The format will still remain.\n",
        "operationId": "get_for_service",
        "tags": [
          "Appointments"
        ]
      }
    },
    "/nbn/diagnostics/avc/service_test": {
      "post": {
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/DiagnosticsTest"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "summary": "Request nbn™ run a test for a TC4 Service (AVC #)",
        "description": ">**Required Scope(s):** data:update\n\nLimit: 30 per minute for the account (carrier write).\n\nRequest nbn™ run a diagnostic test against an Access Virtual Circuit\n(AVC). Use the /diagnostics/{testRef} endpoint to retrieve the results.\nA webhook subscribed to `diagnostic.completed` is told once the test\nfinishes, with its result, so you need not poll.\n\nEvery request here reaches nbn™, and some tests (a Port Reset, an NTD\nReset) drop the end user's service while they run. To try this call\nwithout reaching the carrier, use the\n[sandbox](https://help.checknetworks.tools/api/sandbox/).\n",
        "operationId": "post_service_test_avc",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "serviceRef",
                  "test"
                ],
                "properties": {
                  "serviceRef": {
                    "type": "string",
                    "description": "Access Virtual Circuit (AVC) ID Reference.\nFor Example: \"AVC000000000000\""
                  },
                  "test": {
                    "type": "string",
                    "enum": [
                      "DPU Port Reset",
                      "DPU Port Status",
                      "DPU Status",
                      "DSL Port Reset",
                      "Line Quality Diagnostic",
                      "Line State",
                      "Loopback Test",
                      "Metallic Line Test",
                      "NCD Port Reset",
                      "NCD Reset",
                      "NCD UNI-D Status",
                      "Network Performance Test",
                      "NTD Reset",
                      "NTD Status",
                      "Port Reset",
                      "Single End Line Test",
                      "UNI-D Status",
                      "UNI-V Status",
                      "WNTD Reset",
                      "WNTD Status"
                    ],
                    "description": "The test to be run against this AVC service"
                  },
                  "trafficClass": {
                    "type": "string",
                    "enum": [
                      "TC-1",
                      "TC-2"
                    ],
                    "description": "This field is for the \"Network Performance Test\" test only. It is mandatory for that test.\nThe traffic class on which to perform the test:\n  - \"TC-1\" - Traffic Class #1\n  - \"TC-2\" - Traffic Class #2\n"
                  },
                  "resyncType": {
                    "type": "string",
                    "enum": [
                      "No Resync",
                      "Normal",
                      "Robust"
                    ],
                    "description": "This field is for the \"Line Quality Diagnostic\" test only. It is mandatory for that test.\n  - \"No Resync\" - the test will run without resynchronisation;\n  - \"Normal\" - the test will run with resynchronisation in Normal Initialisation mode, collecting the HLOG and QLN;\n  - \"Robust\" - the test will run with resynchronisation in Robust Initialisation mode, collecting the HLOG and QLN and provide a longer initialisation time with less strict parameters;\n"
                  },
                  "monitoringDuration": {
                    "type": "integer",
                    "default": 6,
                    "description": "(Optional) This field is for the \"Line Quality Diagnostic\" test only.\nThe monitoring duration in minutes. If not provided, the test will run with the default duration of 6 minutes.\n"
                  },
                  "packetSize": {
                    "type": "integer",
                    "minimum": 64,
                    "maximum": 1500,
                    "description": "(Optional) This field is for the \"Loopback\" test only.\nThe packet size for performing a loopback test, if not provided the test will be run with a pre-configured default packet size.\nThe minimum accepted value is 64 and the maximum accepted value is 1500."
                  },
                  "forceTest": {
                    "type": "boolean",
                    "description": "This field is for the \"Metallic Line Test\" test only. It is mandatory if the AVC is on a NFAS (Fibre) line, but must not be specified if the AVC is on a NCAS (FTTB, FTTC, FTTN) line.\nWhether or not to force a test if there is a call in progress on the target line:\n  - \"true\" - the test will run even if there is a call in progress, resulting in the call being dropped.\n  - \"false\" - the test will not be progressed if there is a call in progress.\n"
                  },
                  "technology": {
                    "type": "string",
                    "enum": [
                      "NCAS",
                      "NFAS",
                      "NHAS",
                      "NSAS",
                      "NWAS",
                      "EEAS"
                    ],
                    "description": "This field is for the \"Metallic Line Test\" test only.\nThe test parameters differ based off the line technology. If this AVC is known to Check Networks the technology will be detected automatically, if the AVC is unknown to Check Networks you must specify the line technology here, otherwise the test request will be rejected."
                  },
                  "forceMeasurement": {
                    "type": "boolean",
                    "description": "This field is for the \"Single End Line Test\" test only. It is mandatory for that test.\nForces the testing platform to provide detailed measurements on the associated Copper Loop."
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Diagnostics"
        ]
      }
    },
    "/nbn/diagnostics/cell_performance": {
      "parameters": [
        {
          "name": "locId",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "NBN Location ID of the premises.\nEither the locId or the serviceRef must be specified."
        },
        {
          "name": "serviceRef",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "NBN Access Virtual Circuit (AVC) ID.\nEither the locId or the serviceRef must be specified."
        }
      ],
      "get": {
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/FWCellPerformanceReport"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "summary": "Retrieve the Fixed Wireless Cell Performance Report",
        "description": ">**Required Scope(s):** data:read\n\nUsed to retrieve the Fixed Wireless Cell Performance Report for a given premises or service. Either the `locId` or the `serviceRef` must be specified.\n",
        "operationId": "get_location_cell_performance",
        "tags": [
          "Diagnostics"
        ]
      }
    },
    "/nbn/diagnostics/ovc/service_test": {
      "post": {
        "x-badges": [
          {
            "name": "Coming Soon",
            "color": "#f59e0b"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/DiagnosticsTest"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "summary": "Request nbn™ run a test for an Enterprise Ethernet (OVC #)",
        "description": "**🚧 Coming Soon — not yet available.**\n\n>**Required Scope(s):** data:update\n\nThis will let you develop your own systems to talk to this API in\nadvance of the official release. To try a call without reaching the\ncarrier, use the [sandbox](https://help.checknetworks.tools/api/sandbox/).\n",
        "operationId": "post_service_test_ovc",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "serviceRef",
                  "test"
                ],
                "properties": {
                  "serviceRef": {
                    "type": "string",
                    "description": "The OVC reference number that identifies the service to run the test against.\nFor example, \"OVC000000000000\""
                  },
                  "test": {
                    "type": "string",
                    "enum": [
                      "EE BTD Status",
                      "EE Loopback",
                      "EE NPT Statistical",
                      "EE UNI-E Port Reset",
                      "EE UNI-E Status"
                    ],
                    "description": "The test to be run against this EE service (OVC)"
                  },
                  "packetSize": {
                    "type": "integer",
                    "minimum": 64,
                    "maximum": 1500,
                    "description": "(Optional) This field is for the \"EE Loopback\" test only.\nThe packet size for performing a loopback test, if not provided the test will be run with a pre-configured default packet size.\nThe minimum accepted value is 64 and the maximum accepted value is 1500."
                  },
                  "classOfService": {
                    "type": "string",
                    "enum": [
                      "HIGH",
                      "MEDIUM"
                    ],
                    "description": "This field is for the \"EE NPT Statistical\" test only. It is mandatory for that test.\nClass of Service (CoS) indicator for the EE Service"
                  },
                  "startDateTime": {
                    "type": "string",
                    "format": "date-time",
                    "description": "This field is for the \"EE NPT Statistical\" test only. It is mandatory for that test.\nStart Time of the NPT test"
                  },
                  "endDateTime": {
                    "type": "string",
                    "format": "date-time",
                    "description": "This field is for the \"EE NPT Statistical\" test only. It is mandatory for that test.\nEnd Time of the NPT test"
                  },
                  "eeCosLow": {
                    "type": "boolean",
                    "description": "This field is for the \"EE Loopback\" test only. At least one of the \"eeCosLow\", \"eeCosMedium\" or \"eeCosHigh\" fields must be true for the test.\nInclude the \"LOW\" Class of Service in the EE Loopback test."
                  },
                  "eeCosMedium": {
                    "type": "boolean",
                    "description": "This field is for the \"EE Loopback\" test only. At least one of the \"eeCosLow\", \"eeCosMedium\" or \"eeCosHigh\" fields must be true for the test.\nInclude the \"MEDIUM\" Class of Service in the EE Loopback test."
                  },
                  "eeCosHigh": {
                    "type": "boolean",
                    "description": "This field is for the \"EE Loopback\" test only. At least one of the \"eeCosLow\", \"eeCosMedium\" or \"eeCosHigh\" fields must be true for the test.\nInclude the \"HIGH\" Class of Service in the EE Loopback test."
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Diagnostics"
        ]
      }
    },
    "/nbn/diagnostics/service/{serviceRef}": {
      "parameters": [
        {
          "name": "serviceRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/TestsForService"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "summary": "List the recent Diagnostic Tests run for a Service",
        "description": ">**Required Scope(s):** data:read\n\nWill only show results within the last 30 days\n\nUse `serviceRef` value of \"AVC000000000000\" to get an example response.\n\nThis can only retrieve the results of tests run through Check Networks\nTools.\n",
        "operationId": "get_tests_for_service",
        "tags": [
          "Diagnostics"
        ]
      }
    },
    "/nbn/diagnostics/service/{serviceRef}/latest": {
      "parameters": [
        {
          "name": "serviceRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/DiagnosticsTest"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "summary": "Show the Latest Diagnostic Test result for a Service",
        "description": ">**Required Scope(s):** data:read\n\nUse `serviceRef` value of \"AVC000000000000\" to get an example response\n\nThis can only retrieve the results of tests run through Check Networks\nTools.\n",
        "operationId": "get_latest_test_results",
        "tags": [
          "Diagnostics"
        ]
      }
    },
    "/nbn/diagnostics/service/{serviceRef}/test_types": {
      "parameters": [
        {
          "name": "serviceRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/TestTypesForService"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "summary": "Show which Test Types are eligible to use for a service",
        "description": ">**Required Scope(s):** data:read\n\nUse `serviceRef` value of \"AVC000000000000\" to get an example response\n",
        "operationId": "get_service_test_types",
        "tags": [
          "Diagnostics"
        ]
      }
    },
    "/nbn/diagnostics/{testRef}": {
      "parameters": [
        {
          "name": "testRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/DiagnosticsTest"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "summary": "View the results of a nbn™ Diagnostics Test",
        "description": ">**Required Scope(s):** data:read\n\nUse `testRef` value of \"WRI000000000000\" to view an example response.\n\nThis can only retrieve the results of tests run through Check Networks\nTools.\n",
        "operationId": "get_test_results",
        "tags": [
          "Diagnostics"
        ]
      }
    },
    "/nbn/orders/add_appointment": {
      "patch": {
        "summary": "Add an Appointment to an in-flight Product Order",
        "description": ">**Required Scope(s):** data:update\n\nLimit: 30 per minute for the account (carrier write).\n\nAttaches one of your reserved appointments to one of your orders already\nplaced with the carrier, and answers the order. To book an appointment\non a new order, name it on the Connect instead. The carrier cannot\nsimulate this call, so it answers 503 while our carrier testing mode is\non. This call needs an `Idempotency-Key` header.\n",
        "operationId": "patch_add_appointment",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "orderId",
                  "appointmentId"
                ],
                "properties": {
                  "orderId": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "NBN Order ID to have the appointment attached to it.\nFor Example: \"ORD000000000000\""
                  },
                  "appointmentId": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "NBN Appointment ID to be attached to this order.\nFor Example: \"APT000000000000\""
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ProductOrder"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Orders"
        ]
      }
    },
    "/nbn/orders/delayed": {
      "get": {
        "summary": "List Delayed Orders",
        "description": "Lists your Delayed Orders — orders scheduled for a future submission\ntime. Nothing is sent to the carrier until a Delayed Order submits.\nAn order the carrier asked us to try again is not listed: it is in\nprogress, and we resend it ourselves.\n",
        "operationId": "get_delayed_orders",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DelayedOrders"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Orders Delayed"
        ]
      },
      "post": {
        "summary": "Create a Delayed Order",
        "description": "Limit: 30 per minute for the account (carrier write).\n\nPlaces an nbn Connect order and HOLDS it until `submitTimestamp` —\nnothing is sent to the carrier until then. The order fields are those\nof the Product Order for the location's access technology (NFAS,\nNHAS, NCAS or NWAS): an NTD (`ntdId`) for fibre, HFC and fixed\nwireless, a copper pair (`copperPairId`) for copper, and the options\nthat technology takes. Use the Product Qualification APIs to find\nselectable SKUs first. A Delayed Order takes no transfer, so the\ntransfer fields are not read.\n\n**An order a technician attends is placed now, not held.** An order\nthat needs an install appointment (a new NTD, or a copper pair a\ntechnician attends) is scheduled by its appointment: reserve a slot\non the day you want (`POST /nbn/appointments/reserve`) and send its\n`appointmentId`, checked as the Product Order checks it. The order is\nthen placed with nbn at once with that appointment, so the slot is\nlocked in, and `submitTimestamp` is not needed or read. The 201 answers\n`status` `Submitted` with the carrier's `orderId` and the\n`appointmentId`: the order is not held, and is not listed among your\nDelayed Orders. How far ahead you can schedule it is how far ahead nbn\noffers appointments. To change its day, move the appointment\n(`PATCH /nbn/appointments/appointment/{appointmentId}/reschedule`);\nthe reschedule route here answers 409 `placed_with_appointment`. To\ncancel it, `DELETE /nbn/orders/delayed/{delayedOrderRef}` answers 202:\nnbn takes no withdraw call from us, so our team withdraws it with nbn\nand lets you know. Without an `appointmentId`, such an order is\nrefused with a 422 whose violation is `appointment_required` on\n`appointmentId`, and whose message says to reserve an appointment and\nsend it.\n\n**A Fibre Uplift** is scheduled the same way: send `fibreUplift`\n`true`, an uplift plan (a `bandwidthProductSku` ending `-UPL`) and the\n`appointmentId` of a slot reserved with `alternativeTechnology`\n`Fibre`, and no `ntdId`, `unidPortId` or `copperPairId`: nbn installs\na new NTD. It is placed as an NFAS order at once, where the location's\nqualification says `upliftAvailable` and nbn's own uplift qualification,\nread again then, still offers it; otherwise it is a 422. Any other plan\non an uplift, or an uplift plan on any other order, is a 422 too. A\n12-month term applies.\n\nThe order records the location's own access technology, read from\nits qualification when the order is held, as a Connect does; a\nlocation with no technology that can be ordered is a 422, and a\nqualification that cannot be read is a 502. The order is built and\nchecked for that technology as its Product Order is, when it is held:\nHFC uses port 1, copper takes the pair and its options, and an order\nthe Product Order would refuse (an NTD or pair the location does not\nhave, an installation workforce or delivery details the location's\nService Class does not allow, a phone service on a pair that has\nnone) is refused with the same 422 and its `violations`. Whether a\nUNI-D port is free, and whether the location still offers the\nbandwidth and SLA, are checked when the order is sent, as they can\nchange before then.\n\nThe order takes the end user and the add-ons as `POST /data/orders`\ndoes. Left out, `addons` attaches the plan's default add-ons; a list\nattaches exactly that list; an empty list attaches none. Add-ons start\nbilling when the carrier accepts the order, once it is sent.\n\nDelayed Orders can be rescheduled, submitted immediately, or\ncancelled (at no cost) any time before submission.\n\nA location that already has an open order on your account (draft,\ndelayed, submitted or in progress) is refused with a 409: a hold never\nmakes a second order for the same premises. The check runs again at the\nsubmit time; a clash then holds the order for you (see `order.delayed`).\n",
        "operationId": "post_delayed_order",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:create"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/NfasProductOrderRequest"
                      },
                      {
                        "$ref": "#/components/schemas/schema"
                      },
                      {
                        "$ref": "#/components/schemas/schema-2"
                      },
                      {
                        "$ref": "#/components/schemas/schema-3"
                      },
                      {
                        "type": "object",
                        "required": [
                          "locId",
                          "bandwidthProductSku",
                          "orderReference",
                          "informedConsent",
                          "fibreUplift",
                          "appointmentId"
                        ],
                        "properties": {
                          "locId": {
                            "$ref": "#/components/schemas/locId"
                          },
                          "bandwidthProductSku": {
                            "$ref": "#/components/schemas/bandwidthProductSku"
                          },
                          "orderReference": {
                            "$ref": "#/components/schemas/orderReference"
                          },
                          "informedConsent": {
                            "$ref": "#/components/schemas/informedConsent"
                          },
                          "appointmentId": {
                            "$ref": "#/components/schemas/appointmentId"
                          },
                          "fibreUplift": {
                            "type": "boolean",
                            "const": true
                          }
                        },
                        "not": {
                          "anyOf": [
                            {
                              "required": [
                                "ntdId"
                              ]
                            },
                            {
                              "required": [
                                "unidPortId"
                              ]
                            },
                            {
                              "required": [
                                "copperPairId"
                              ]
                            }
                          ]
                        }
                      }
                    ]
                  },
                  {
                    "type": "object",
                    "required": [
                      "restorationSlaSku"
                    ],
                    "anyOf": [
                      {
                        "required": [
                          "submitTimestamp"
                        ]
                      },
                      {
                        "required": [
                          "appointmentId"
                        ]
                      }
                    ],
                    "properties": {
                      "endUser": {
                        "$ref": "#/components/schemas/endUser"
                      },
                      "endUserType": {
                        "$ref": "#/components/schemas/endUserType"
                      },
                      "addons": {
                        "$ref": "#/components/schemas/addons"
                      },
                      "fibreUplift": {
                        "type": "boolean",
                        "default": false,
                        "description": "(Optional) A Fibre Uplift: an NFAS order onto a new NTD at a location whose qualification says `upliftAvailable`, placed now with its `appointmentId`."
                      },
                      "submitTimestamp": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When to submit this order to nbn. Must be at least 15 minutes into the future and no more than 30 days into the future.\nMust be an ISO 8601 date-time with its UTC offset, for example `2026-12-01T09:00:00+11:00` or `2026-11-30T22:00:00Z`. A time without an offset is refused with a 422 naming the field.\nRequired unless `appointmentId` is sent; not read when it is."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created: held as a Delayed Order until `submitTimestamp`, or, with an `appointmentId`, placed with nbn now with that appointment.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/DelayedOrderItem"
                        },
                        {
                          "type": "object",
                          "description": "Placed with nbn now with its appointment; not held.",
                          "required": [
                            "id",
                            "status",
                            "appointmentId"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "The Check Networks Delayed Order Reference #, by which it is cancelled."
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "Submitted"
                              ]
                            },
                            "submitDateTime": {
                              "type": "string",
                              "format": "date-time",
                              "description": "When the order was placed with nbn."
                            },
                            "orderId": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "The nbn order ID."
                            },
                            "appointmentId": {
                              "type": "string",
                              "description": "The appointment the order was placed with."
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Orders Delayed"
        ]
      }
    },
    "/nbn/orders/delayed/add_note": {
      "post": {
        "summary": "Attach a Note to a Delayed Order",
        "description": "Notes cannot be edited or removed once attached to an order.\n",
        "operationId": "post_delayed_order_note",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "reference",
                  "text"
                ],
                "properties": {
                  "reference": {
                    "type": "string",
                    "description": "Reference # of the Pending Order to attach this note to.\nFor Example: \"PND000000000000\""
                  },
                  "text": {
                    "type": "string",
                    "description": "The textual contents of the note."
                  },
                  "author": {
                    "type": "string",
                    "description": "(Optional) The author to be listed for this note."
                  },
                  "authorRole": {
                    "type": "string",
                    "description": "(Optional) The role of the author who made this note."
                  },
                  "authorId": {
                    "type": "string",
                    "description": "(Optional) The id of the author who made this note."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/Success"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Orders Delayed"
        ]
      }
    },
    "/nbn/orders/delayed/{delayedOrderRef}": {
      "parameters": [
        {
          "name": "delayedOrderRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The Check Networks Delayed Order Reference #"
        }
      ],
      "delete": {
        "summary": "Cancel a Delayed Order",
        "description": "Cancels a Delayed Order before it submits. This is purely local —\nnothing was ever sent to the carrier, so cancellation is free. A\n409 is returned if the order has just been submitted by the\nscheduler and can no longer be cancelled.\n\nAn order placed with its appointment when it was scheduled (see\n`POST /nbn/orders/delayed`) is already with nbn, which takes no\nwithdraw call from us. Cancelling it answers 202: the cancellation is\nasked for, and our team withdraws the order with nbn by hand and lets\nyou know when it is done. Asking again answers the same.\n",
        "operationId": "delete_delayed_order",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:delete"
            ]
          }
        ],
        "responses": {
          "202": {
            "description": "The order was placed with its appointment and is with nbn: the cancellation is asked for, and our team withdraws it with nbn.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "status",
                        "message"
                      ],
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "WithdrawalRequested"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "description": "What happens next, to show your customer."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "204": {
            "description": "The order is cancelled. The response has no body."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Orders Delayed"
        ]
      },
      "get": {
        "summary": "Retrieve a Delayed Order",
        "description": ">**Required Scope(s):** data:read\n\nReturns a held Delayed Order — the fields it was scheduled with and its\nsubmit time — by its Check Networks Delayed Order Reference.\n",
        "operationId": "get_delayed_order",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "The Check Networks Delayed Order Reference."
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "Delayed"
                          ]
                        },
                        "submitDateTime": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "When the order is scheduled to submit."
                        },
                        "locId": {
                          "type": "string"
                        },
                        "bandwidthProductSku": {
                          "type": "string"
                        },
                        "restorationSlaSku": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "customerReference": {
                          "type": "string"
                        },
                        "ntdId": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "unidPortId": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Orders Delayed"
        ]
      }
    },
    "/nbn/orders/delayed/{delayedOrderRef}/reschedule": {
      "parameters": [
        {
          "name": "delayedOrderRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The Check Networks Delayed Order Reference #"
        }
      ],
      "patch": {
        "summary": "Change the Submission Time for a Delayed Order",
        "description": "Changes when a Delayed Order will be submitted to nbn. The order\nremains held (nothing is sent to the carrier) until the new time.\n\nAn order placed with its appointment when it was scheduled (see\n`POST /nbn/orders/delayed`) has its appointment's day: this answers\n409 `placed_with_appointment`. Move the appointment instead, with\n`PATCH /nbn/appointments/appointment/{appointmentId}/reschedule`.\n",
        "operationId": "patch_delayed_order_reschedule",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "submitTimestamp"
                ],
                "properties": {
                  "submitTimestamp": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The new time to submit to nbn. Must be at least 15 minutes into the future and no more than 30 days into the future.\nMust be an ISO 8601 date-time with its UTC offset, for example `2026-12-01T09:00:00+11:00` or `2026-11-30T22:00:00Z`. A time without an offset is refused with a 422 naming the field."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/DelayedOrderItem"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Orders Delayed"
        ]
      }
    },
    "/nbn/orders/delayed/{delayedOrderRef}/submit": {
      "parameters": [
        {
          "name": "delayedOrderRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The Check Networks Delayed Order Reference #"
        }
      ],
      "patch": {
        "summary": "Submit a Delayed Order now, ignoring the Submission Time",
        "description": "Limit: 30 per minute for the account (carrier write).\n\nSubmits the Delayed Order to nbn immediately instead of waiting for\nits scheduled time. Submission is final — the order cannot be\nrecalled once it has been sent to the carrier.\n",
        "operationId": "patch_delayed_order_submit",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/Success"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Orders Delayed"
        ]
      }
    },
    "/nbn/orders/disconnect_product": {
      "post": {
        "summary": "Submit a Disconnect order for a specific Product Instance",
        "description": "Submit an order to disconnect one of your active services.\n\nLimit: 30 per minute for the account (carrier write).\n\nThe order is accepted immediately and processed in the background, so the\nservice is not disconnected at the moment this call returns. The response\ncontains the order number and its current status.\n\nA service still in its contract term is charged early termination. To\nsee what before you disconnect, GET /data/services/{ref}/disconnect-quote.\n",
        "operationId": "post_disconnect_product",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:delete"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "productId"
                ],
                "properties": {
                  "productId": {
                    "type": "string",
                    "example": "PRI000000000000",
                    "description": "NBN Product Instance ID of the product to be disconnected."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "Accepted",
            "description": "The Disconnect order was accepted, as the carrier's ProductOrder. The service is not yet disconnected — the order is completed in the background.\n",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ProductOrder"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Orders"
        ]
      }
    },
    "/nbn/orders/product/{orderId}": {
      "parameters": [
        {
          "name": "orderId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The NBN Order ID, or the PND of an order nbn does not hold yet or that\nwas PendingReview.\nFor Example: \"ORD000000000000\""
        }
      ],
      "get": {
        "summary": "Retrieve an order using its Order ID",
        "description": "Retrieve the current detail of one of your orders by its Order ID.\n\nOnce an order has completed, its final detail is returned. While an order\nis still in progress, the latest available detail is returned so you can\npoll its status through to completion.\n\nAn order that nbn does not hold yet is found by its PND and answered from\nCheck Networks' own record, with no nbn detail: `state` Acknowledged while\nit is on its way to nbn, PendingReview if nbn could not accept it as Check\nNetworks sent it (Check Networks will correct and resubmit it), or\nRejected or Cancelled if it ended before reaching nbn. A known order is\nnever a 404. Once nbn holds the order its `id` is the Order ID; a PND that\nwas PendingReview keeps returning nbn's detail, and any other PND then\nfinds nothing, so poll by the Order ID.\n",
        "operationId": "get_order",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ProductOrder"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Orders"
        ]
      },
      "delete": {
        "x-badges": [
          {
            "name": "Coming Soon",
            "color": "#f59e0b"
          }
        ],
        "summary": "Cancel an in-flight order within NBN",
        "description": "**🚧 Coming Soon — not yet available.**\n",
        "operationId": "delete_order",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:delete"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ProductOrder"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Orders"
        ]
      }
    },
    "/nbn/orders/product/{orderId}/history": {
      "parameters": [
        {
          "name": "orderId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The NBN Order ID.\nFor Example: \"ORD000000000000\""
        }
      ],
      "get": {
        "x-badges": [
          {
            "name": "Coming Soon",
            "color": "#f59e0b"
          }
        ],
        "summary": "Retrieve order events for an EE Order",
        "description": "**🚧 Coming Soon — not yet available.**\n",
        "operationId": "get_order_history",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "results"
                  ],
                  "properties": {
                    "results": {
                      "type": "array",
                      "description": "The order state-change events for this Order.",
                      "items": {
                        "$ref": "#/components/schemas/OrderHistory"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Orders"
        ]
      }
    },
    "/nbn/orders/products/ncas": {
      "post": {
        "summary": "Submit an Order to NBN for a NCAS Product",
        "description": "NCAS Products include: FTTB, FTTC and FTTN\n\nLimit: 30 per minute for the account (carrier write).\n\n\nA successful submission will result in an \"Acknowledged\" response.\nThe order status can be checked when viewing the Order Details.\n\nIf nbn cannot accept an order as Check Networks sent it, the answer is\nstill a success, with `state` \"PendingReview\" and the order's PND as its\n`id`: the fault is ours, and Check Networks will correct and resubmit it.\nPoll the PND on the Order Details. A genuine refusal from nbn, such as\ninformed consent not evidenced or no NTD capacity, is a 422 instead.\n\nUse the Callbacks API to register a callback URL for receiving\nnotifications when the order is \"Accepted\", \"Complete\" or \"Rejected\".\n\nUse the Service Qualification API first — it lists the copper pairs at the\npremises with the Service Class of each, which determines what this order\nneeds.\n\n\nVALIDATION>\n\nAn order runs over a copper pair rather than an NTD, so `copperPairId`\nnames the pair it uses: an existing CPI, or \"NEW\" for a new line. An order\nis then one of three things: a connection on that pair, a Service Transfer\n(adding `transferType`, `serviceRef` and `customerAuthorityDate`), or a\nConnect Outstanding (as a transfer, but without `serviceRef` — the\nprevious occupant's AVC is unknown).\n\nOrders are checked against the Service Qualification for the Location\nbefore they are sent to nbn, so a mistake comes straight back as a 422\nwith the reason — no order is created at nbn when an error is found in\npre-validation. The reasons are:\n\n - `location_not_serviceable` the Location cannot take a service\n - `wrong_access_technology` the Location is not FTTB, FTTC or FTTN — use the order endpoint for its access technology\n - `copper_pair_id_required` supply a copper pair (CPI #) or \"NEW\"\n - `unknown_copper_pair` no such copper pair at this Location\n - `copper_pair_not_available` that pair carries a service — transfer it, or choose another pair\n - `new_pair_not_allowed` the premises has a spare pair, so a new line cannot be ordered\n - `appointment_required` this order needs an appointment — see the `appointmentId` field for the Demand Type it takes\n - `appointment_not_allowed` no appointment is required for this order\n - `appointment_wrong_demand_type` the appointment is not the Demand Type this order needs\n - `transfer_type_invalid` / `transfer_type_unsupported` see the `transferType` field for the accepted values\n - `service_ref_required` / `service_ref_not_allowed` only a Service Transfer names the AVC being taken over\n - `avc_mismatch` nbn does not report that AVC on that copper pair — check both\n - `authority_date_required` / `authority_date_invalid` / `authority_date_in_future` / `authority_date_expired` the Customer Authority must be dated within the last 45 calendar days\n - `pots_interconnect_required` a Service Class 12 Active line must name the phone service being transitioned\n - `pots_interconnect_not_allowed` the line does not transition a phone service\n - `central_splitter_not_allowed` a central splitter can only be installed on a Service Class 12 line\n - `installation_workforce_not_allowed` no installation is being performed\n - `installation_workforce_invalid` see the `installationWorkforce` field for the accepted values\n - `bandwidth_sku_required` / `bandwidth_sku_not_eligible` / `sla_sku_not_eligible` use the Product Qualification APIs for the selectable options\n - `order_reference_required` / `order_reference_invalid` up to 35 characters of letters, numbers, underscores, hyphens and periods\n - `informed_consent_required` confirm the End User has given Informed Consent\n - `vlan_mode_invalid` / `uni_vlan_id_required` / `uni_vlan_id_invalid` / `uni_vlan_id_not_allowed` `uniVlanId` applies only when `vlanMode` is \"Tagged\"\n",
        "operationId": "post_product_orders_ncas",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:create"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "locId",
                  "bandwidthProductSku",
                  "orderReference",
                  "copperPairId",
                  "informedConsent"
                ],
                "dependentRequired": {
                  "transferType": [
                    "customerAuthorityDate"
                  ],
                  "serviceRef": [
                    "transferType"
                  ],
                  "uniVlanId": [
                    "vlanMode"
                  ]
                },
                "dependentSchemas": {
                  "transferType": {
                    "if": {
                      "properties": {
                        "transferType": {
                          "const": "Service Transfer"
                        }
                      }
                    },
                    "then": {
                      "required": [
                        "serviceRef"
                      ]
                    },
                    "else": {
                      "not": {
                        "required": [
                          "serviceRef"
                        ]
                      }
                    }
                  },
                  "vlanMode": {
                    "if": {
                      "properties": {
                        "vlanMode": {
                          "const": "Tagged"
                        }
                      }
                    },
                    "then": {
                      "required": [
                        "uniVlanId"
                      ]
                    }
                  }
                },
                "properties": {
                  "locId": {
                    "type": "string",
                    "pattern": "^LOC\\d{12}$",
                    "description": "The NBN Location ID for the premises the order is for."
                  },
                  "bandwidthProductSku": {
                    "type": "string",
                    "maxLength": 64,
                    "description": "Product SKU of the Bandwidth Product being ordered.\nThis controls which Service Layer (Layer 2 or Layer 3) this Order can be Provisioned with.\nUse the Product Qualification > Eligible Bandwidth Products API to find selectable options for the Location (LOC #)\n"
                  },
                  "restorationSlaSku": {
                    "type": "string",
                    "maxLength": 64,
                    "description": "(Optional) Product SKU of the Service Restoration SLA.\nIf omitted, the Standard SLA (\"NBN-SLA-TC4-STD\") is applied.\nIndicates how quick NBN responds should this service be affected by an issue, depending upon the SLA Region.\nResponse times are Business Hours unless a (24/7) SLA is selected.\nEnhanced or Premium SLAs may incur an additional monthly cost.\nBundled SLA Product SKUs will only be accepted when provided with an eligible Bandwidth Product SKU.\nUse the Product Qualification > Eligible Restoration SLA Products API to find selectable options for the Location (LOC #).\n"
                  },
                  "orderReference": {
                    "type": "string",
                    "maxLength": 35,
                    "pattern": "^[A-Za-z0-9._-]+$",
                    "description": "Your Reference Number for this order. Max of 35 characters.\nOnly alphabetic characters (\"a-Z\"), numbers (\"0-9\"), underscores (\"_\"), hyphens (\"-\") and periods (\".\") are allowed.\n\nEXAMPLES:\n - \"New.Foo_BAR-2020-09-20\"\n - \"ExampleCompanyName\"\n - \"JaneCitizen-123456\"\n - \"Reseller.EndUser.123456\"\n"
                  },
                  "endUserRef": {
                    "type": "string",
                    "description": "NOT ACCEPTED: supplying this field returns 422. The platform assigns the End User; this API has no End User (Party) records.\nThe Reference (EUP #) of the End User to associate this Order to.\n\nEXAMPLES:\n - \"EUP000000000000\"\n"
                  },
                  "priorityAssist": {
                    "type": "boolean",
                    "default": false,
                    "description": "(Optional) Whether Priority Assistance is required.\nDefaults to \"false\" if value not set.\nOnly specify \"true\" where the end user is eligible for a Downstream Priority Assistance Service in accordance with NBN Co's Wholesale Broadband Agreement.\n\"true\" is accepted only for a customer on our Priority Assistance register (the end user named in `endUser`, or when none is named the account or your own end user, never another end user's); otherwise the order is refused with a 422 on `priorityAssist` before anything is drafted."
                  },
                  "endUser": {
                    "type": "string",
                    "maxLength": 64,
                    "description": "(Optional) Ours, not the carrier's `endUserRef`: the number of the end user the order is for, as `POST /data/orders` takes it. The order and its service are that end user's. With `priorityAssist` true it is that end user's registration that counts; an end user that is not this account's is refused with a 422 on `priorityAssist`, or on `endUser` without the flag."
                  },
                  "copperPairId": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "The copper pair (CPI #) this order runs over, or \"NEW\" to\norder a new line.\n\nUse the Service Qualification API to see the pairs at the\npremises. \"NEW\" is not accepted where the premises already has\na spare pair — the existing one must be used.\n"
                  },
                  "appointmentId": {
                    "type": "string",
                    "maxLength": 48,
                    "description": "(Conditional) NBN Appointment ID to attach to this order.\n\nService Class 13 and 33: no appointment — unless you are\nordering a new line (\"NEW\") because every pair at the premises\nis in use.\n\nService Class 12 Active without a central splitter: an\nappointment with Demand Type \"Non EU Jumper Only\" — the work is\nat the exchange, not the premises.\n\nEvery other case: an appointment with Demand Type\n\"Standard Install\".\n"
                  },
                  "informedConsent": {
                    "type": "boolean",
                    "description": "Verification that the End User has provided Informed Consent for this order to be placed."
                  },
                  "transferType": {
                    "type": "string",
                    "maxLength": 32,
                    "enum": [
                      "Service Transfer",
                      "Service Transfer Reversal",
                      "Connect Outstanding"
                    ],
                    "description": "(Conditional) Service Transfer Type.\nOnly applicable to, and is mandatory for Service Transfers.\n - \"Service Transfer\" - transfer an existing nbn service from another provider to you.\n - \"Service Transfer Reversal\" - recover an existing service that was incorrectly transferred away from you.\n - \"Connect Outstanding\" - connect a new service over a line that still has an existing active service not controlled by the End User.  This requires time to legally cancel the existing service.\n"
                  },
                  "occupancyDocumentId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "(Optional, ours) On a Connect Outstanding, the `id` of a proof of occupancy uploaded with `POST /data/occupancy-documents`: evidence that the End User occupies the premises. It is kept with the order and used by that order only: a retry with the same `orderReference` may name it again. Another account's, or one another order used, is a 422."
                  },
                  "serviceRef": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "(Conditional) Service ID (AVC #) for Service Transfer.\nOnly applicable to, and is mandatory for, Service Transfers.\n\nIMPORTANT > Validate the AVC # against the CPI # or NTD + UNI Port using the SQ Single Site API first."
                  },
                  "customerAuthorityDate": {
                    "type": "string",
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date"
                      },
                      {
                        "type": "string",
                        "format": "date-time"
                      }
                    ],
                    "description": "(Conditional) Date the Customer authorised this order, as `YYYY-MM-DD` (a date-time is read as its date). Must be within the last 45 calendar days only.\nThis is only applicable to Service Transfers and required if `transferType` is \"Service Transfer\" or \"Connect Outstanding\"."
                  },
                  "potsInterconnect": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "(Conditional) The Full National Number (FNN) or Unconditioned\nLocal Loop (ULL) of the phone service being transitioned, also\ncalled the Transition Service Identifier.\n\nRequired for a Service Class 12 Active line. Must NOT be\nsupplied for a Service Class 13 or 34 line, or for an Inactive\nService Class 12, 31, 32 or 33 line.\n"
                  },
                  "installationWorkforce": {
                    "type": "string",
                    "enum": [
                      "NBN Co Install",
                      "NBN Co Install End User"
                    ],
                    "description": "(Conditional) Who performs the installation.\n\n\"NBN Co Install End User\" is only available at a Service Class\n33 premises. Everywhere else an installation is required, it\nis \"NBN Co Install\" — a technician attends.\n"
                  },
                  "installOptionCentralSplitter": {
                    "type": "boolean",
                    "default": false,
                    "description": "(Optional) Install a central splitter.\n\nOnly applicable to a Service Class 12 line, and rare even\nthere. Defaults to false.\n"
                  },
                  "vlanMode": {
                    "type": "string",
                    "enum": [
                      "Default-Mapped",
                      "Tagged"
                    ],
                    "description": "(Optional) The VLAN Mode determines which Product Template will be used when ordering this connection.\n\nIMPORTANT> Do not specify unless explicitly needed.\n\nWhen this field is not specified, \"Default-Mapped\" will be the assumed value.\nIntended mainly for transitioning existing \"Tagged\" PPPoE services without needing to change the client CPE configuration.\n\nIMPORTANT> You cannot change this value with a Modify Order. Instead, the service must be cancelled and reordered, potentially bringing the service down for 24-48 hours.\n"
                  },
                  "uniVlanId": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 4094,
                    "description": "(Conditional) Required if `vlanMode` is \"Tagged\"\nThe UNI VLAN ID # used to tag the service traffic.\nThe value should be between 1 and 4094."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ProductOrder"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Orders"
        ]
      }
    },
    "/nbn/orders/products/nfas": {
      "post": {
        "summary": "Submit an Order to NBN for a NFAS Product",
        "description": "NFAS Products include: Fibre and FTTP\n\nLimit: 30 per minute for the account (carrier write).\n\n\nA successful submission will result in an \"Acknowledged\" response.\nThe order status can be checked when viewing the Order Details.\n\nIf nbn cannot accept an order as Check Networks sent it, the answer is\nstill a success, with `state` \"PendingReview\" and the order's PND as its\n`id`: the fault is ours, and Check Networks will correct and resubmit it.\nPoll the PND on the Order Details. A genuine refusal from nbn, such as\ninformed consent not evidenced or no NTD capacity, is a 422 instead.\n\nUse the Callbacks API to register a callback URL for receiving\nnotifications when the order is \"Accepted\", \"Complete\" or \"Rejected\".\n\nUse the Service Qualification API first — the Service Class, the NTDs at\nthe premises and the UNI-D port status determine which fields this order\nneeds.\n\n\nVALIDATION>\n\nAn order is one of four things: a new install (`ntdId` \"NEW\" with a\n\"Standard Install\" `appointmentId`), taking a spare port on an installed\nNTD (`ntdId` and optionally `unidPortId`), a Service Transfer (adding\n`transferType`, `serviceRef` and `customerAuthorityDate`), or a Connect\nOutstanding (as a transfer, but without `serviceRef` — the previous\noccupant's AVC is unknown). A transfer moving to a different UNI-D\nPort without downtime adds `overlapPeriod` \"4\" and `fromPortId`.\n\nOrders are checked against the Service Qualification for the Location\nbefore they are sent to nbn, so a mistake comes straight back as a 422\nwith the reason — no order is created at nbn when an error is found in\npre-validation. The reasons are:\n\n - `location_not_serviceable` the Location cannot take a service\n - `wrong_access_technology` the Location is not FTTP — use the order endpoint for its access technology\n - `ntd_id_required` supply an NTD ID or \"NEW\"\n - `ntd_must_be_new` Service Class 1 or 2 has no NTD installed yet, so `ntdId` must be \"NEW\"\n - `unknown_ntd` no such NTD at this Location\n - `appointment_required` a new NTD needs a \"Standard Install\" appointment\n - `appointment_not_allowed` an installed NTD needs no technician\n - `unknown_port` no such UNI-D Port on that NTD\n - `port_not_free` the Port carries a service — transfer it, or choose a free Port\n - `port_not_in_use` a transfer needs the Port the existing service is on\n - `no_free_port` the NTD is full — order an additional NTD with `ntdId` \"NEW\"\n - `transfer_type_invalid` / `transfer_type_unsupported` see the `transferType` field for the accepted values\n - `unid_port_required_for_transfer` a transfer must name the Port\n - `service_ref_required` / `service_ref_not_allowed` only a Service Transfer names the AVC being taken over\n - `avc_mismatch` nbn does not report that AVC on that Port — check both\n - `authority_date_required` / `authority_date_invalid` / `authority_date_in_future` / `authority_date_expired` the Customer Authority must be dated within the last 45 calendar days\n - `overlap_requires_service_transfer` / `overlap_period_invalid` / `overlap_period_required` the overlap applies only to a Service Transfer\n - `from_port_required` / `from_port_same_as_target` / `unknown_from_port` / `from_port_not_in_use` an overlap moves the service between two different Ports\n - `bandwidth_sku_required` / `bandwidth_sku_not_eligible` / `sla_sku_not_eligible` use the Product Qualification APIs for the selectable options\n - `order_reference_required` / `order_reference_invalid` up to 35 characters of letters, numbers, underscores, hyphens and periods\n - `informed_consent_required` confirm the End User has given Informed Consent\n - `vlan_mode_invalid` / `uni_vlan_id_required` / `uni_vlan_id_invalid` / `uni_vlan_id_not_allowed` `uniVlanId` applies only when `vlanMode` is \"Tagged\"\n",
        "operationId": "post_product_orders_nfas",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:create"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NfasProductOrderRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ProductOrder"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Orders"
        ]
      }
    },
    "/nbn/orders/products/nhas": {
      "post": {
        "summary": "Submit an Order to NBN for a NHAS Product",
        "description": "NHAS Products include: HFC\n\nLimit: 30 per minute for the account (carrier write).\n\n\nA successful submission will result in an \"Acknowledged\" response.\nThe order status can be checked when viewing the Order Details.\n\nIf nbn cannot accept an order as Check Networks sent it, the answer is\nstill a success, with `state` \"PendingReview\" and the order's PND as its\n`id`: the fault is ours, and Check Networks will correct and resubmit it.\nPoll the PND on the Order Details. A genuine refusal from nbn, such as\ninformed consent not evidenced or no NTD capacity, is a 422 instead.\n\nUse the Callbacks API to register a callback URL for receiving\nnotifications when the order is \"Accepted\", \"Complete\" or \"Rejected\".\n\nUse the Service Qualification API first — the Service Class and the NTD at\nthe premises determine which fields this order needs.\n\n\nVALIDATION>\n\nAn order is one of four things: a new install (`ntdId` \"NEW\" with a\n\"Standard Install\" `appointmentId`), a self-install where nbn delivers the\nNTD (Service Class 23 with `installationWorkforce` \"NBN Co Install End\nUser\", adding the delivery fields), a Service Transfer (adding\n`transferType`, `serviceRef` and `customerAuthorityDate`), or a Connect\nOutstanding (as a transfer, but without `serviceRef` — the previous\noccupant's AVC is unknown).\n\nOrders are checked against the Service Qualification for the Location\nbefore they are sent to nbn, so a mistake comes straight back as a 422\nwith the reason — no order is created at nbn when an error is found in\npre-validation. The reasons are:\n\n - `location_not_serviceable` the Location cannot take a service\n - `wrong_access_technology` the Location is not HFC — use the order endpoint for its access technology\n - `ntd_id_required` supply an NTD ID or \"NEW\"\n - `ntd_must_be_new` the Location has no NTD installed yet, so `ntdId` must be \"NEW\"\n - `unknown_ntd` no such NTD at this Location\n - `appointment_required` a new NTD needs a \"Standard Install\" appointment\n - `appointment_not_allowed` an installed NTD needs no technician\n - `transfer_type_invalid` / `transfer_type_unsupported` see the `transferType` field for the accepted values\n - `service_ref_required` / `service_ref_not_allowed` only a Service Transfer names the AVC being taken over\n - `avc_mismatch` nbn does not report that AVC at this Location — check the AVC\n - `authority_date_required` / `authority_date_invalid` / `authority_date_in_future` / `authority_date_expired` the Customer Authority must be dated within the last 45 calendar days\n - `installation_workforce_not_allowed` the NTD is already installed, so there is nothing to install\n - `installation_workforce_invalid` see the `installationWorkforce` field for the accepted values\n - `delivery_details_not_allowed` nbn only delivers an NTD for a Service Class 23 self-install\n - `delivery_details_required` a self-install must say where the NTD goes and who receives it\n - `delivery_address_not_allowed` `deliverToLocation` sends the NTD to the premises, so no address is given\n - `delivery_address_required` `deliverToLocation` is false, so the full delivery address is required\n - `bandwidth_sku_required` / `bandwidth_sku_not_eligible` / `sla_sku_not_eligible` use the Product Qualification APIs for the selectable options\n - `order_reference_required` / `order_reference_invalid` up to 35 characters of letters, numbers, underscores, hyphens and periods\n - `informed_consent_required` confirm the End User has given Informed Consent\n - `vlan_mode_invalid` / `uni_vlan_id_required` / `uni_vlan_id_invalid` / `uni_vlan_id_not_allowed` `uniVlanId` applies only when `vlanMode` is \"Tagged\"\n",
        "operationId": "post_product_orders_nhas",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:create"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "locId",
                  "bandwidthProductSku",
                  "orderReference",
                  "ntdId",
                  "informedConsent"
                ],
                "dependentRequired": {
                  "transferType": [
                    "customerAuthorityDate"
                  ],
                  "serviceRef": [
                    "transferType"
                  ],
                  "uniVlanId": [
                    "vlanMode"
                  ],
                  "deliverToLocation": [
                    "deliveryContactType",
                    "deliveryContactName",
                    "deliveryContactPhone",
                    "authorisedToLeave",
                    "installationWorkforce"
                  ]
                },
                "dependentSchemas": {
                  "ntdId": {
                    "if": {
                      "properties": {
                        "ntdId": {
                          "const": "NEW"
                        }
                      }
                    },
                    "then": {
                      "required": [
                        "appointmentId"
                      ]
                    },
                    "else": {
                      "not": {
                        "required": [
                          "appointmentId"
                        ]
                      }
                    }
                  },
                  "transferType": {
                    "if": {
                      "properties": {
                        "transferType": {
                          "const": "Service Transfer"
                        }
                      }
                    },
                    "then": {
                      "required": [
                        "serviceRef"
                      ]
                    },
                    "else": {
                      "not": {
                        "required": [
                          "serviceRef"
                        ]
                      }
                    }
                  },
                  "vlanMode": {
                    "if": {
                      "properties": {
                        "vlanMode": {
                          "const": "Tagged"
                        }
                      }
                    },
                    "then": {
                      "required": [
                        "uniVlanId"
                      ]
                    }
                  },
                  "deliveryAddressLine1": {
                    "required": [
                      "deliverToLocation"
                    ]
                  },
                  "installationWorkforce": {
                    "if": {
                      "properties": {
                        "installationWorkforce": {
                          "const": "NBN Co Install End User"
                        }
                      }
                    },
                    "else": {
                      "not": {
                        "required": [
                          "deliverToLocation"
                        ]
                      }
                    }
                  },
                  "deliverToLocation": {
                    "allOf": [
                      {
                        "if": {
                          "properties": {
                            "deliverToLocation": {
                              "const": true
                            }
                          }
                        },
                        "then": {
                          "allOf": [
                            {
                              "not": {
                                "required": [
                                  "deliveryAddressLine1"
                                ]
                              }
                            },
                            {
                              "not": {
                                "required": [
                                  "deliveryAddressLine2"
                                ]
                              }
                            },
                            {
                              "not": {
                                "required": [
                                  "deliveryLocalityName"
                                ]
                              }
                            },
                            {
                              "not": {
                                "required": [
                                  "deliveryStateTerritoryCode"
                                ]
                              }
                            },
                            {
                              "not": {
                                "required": [
                                  "deliveryPostcode"
                                ]
                              }
                            }
                          ]
                        }
                      },
                      {
                        "if": {
                          "properties": {
                            "deliverToLocation": {
                              "const": false
                            }
                          }
                        },
                        "then": {
                          "required": [
                            "deliveryAddressLine1",
                            "deliveryLocalityName",
                            "deliveryStateTerritoryCode",
                            "deliveryPostcode"
                          ]
                        }
                      }
                    ]
                  }
                },
                "properties": {
                  "locId": {
                    "type": "string",
                    "pattern": "^LOC\\d{12}$",
                    "description": "The NBN Location ID for the premises the order is for."
                  },
                  "bandwidthProductSku": {
                    "type": "string",
                    "maxLength": 64,
                    "description": "Product SKU of the Bandwidth Product being ordered.\nThis controls which Service Layer (Layer 2 or Layer 3) this Order can be Provisioned with.\nUse the Product Qualification > Eligible Bandwidth Products API to find selectable options for the Location (LOC #)\n"
                  },
                  "restorationSlaSku": {
                    "type": "string",
                    "maxLength": 64,
                    "description": "(Optional) Product SKU of the Service Restoration SLA.\nIf omitted, the Standard SLA (\"NBN-SLA-TC4-STD\") is applied.\nIndicates how quick NBN responds should this service be affected by an issue, depending upon the SLA Region.\nResponse times are Business Hours unless a (24/7) SLA is selected.\nEnhanced or Premium SLAs may incur an additional monthly cost.\nBundled SLA Product SKUs will only be accepted when provided with an eligible Bandwidth Product SKU.\nUse the Product Qualification > Eligible Restoration SLA Products API to find selectable options for the Location (LOC #).\n"
                  },
                  "orderReference": {
                    "type": "string",
                    "maxLength": 35,
                    "pattern": "^[A-Za-z0-9._-]+$",
                    "description": "Your Reference Number for this order. Max of 35 characters.\nOnly alphabetic characters (\"a-Z\"), numbers (\"0-9\"), underscores (\"_\"), hyphens (\"-\") and periods (\".\") are allowed.\n\nEXAMPLES:\n - \"New.Foo_BAR-2020-09-20\"\n - \"ExampleCompanyName\"\n - \"JaneCitizen-123456\"\n - \"Reseller.EndUser.123456\"\n"
                  },
                  "endUserRef": {
                    "type": "string",
                    "description": "NOT ACCEPTED: supplying this field returns 422. The platform assigns the End User; this API has no End User (Party) records.\nThe Reference (EUP #) of the End User to associate this Order to.\n\nEXAMPLES:\n - \"EUP000000000000\"\n"
                  },
                  "priorityAssist": {
                    "type": "boolean",
                    "default": false,
                    "description": "(Optional) Whether Priority Assistance is required.\nDefaults to \"false\" if value not set.\nOnly specify \"true\" where the end user is eligible for a Downstream Priority Assistance Service in accordance with NBN Co's Wholesale Broadband Agreement.\n\"true\" is accepted only for a customer on our Priority Assistance register (the end user named in `endUser`, or when none is named the account or your own end user, never another end user's); otherwise the order is refused with a 422 on `priorityAssist` before anything is drafted."
                  },
                  "endUser": {
                    "type": "string",
                    "maxLength": 64,
                    "description": "(Optional) Ours, not the carrier's `endUserRef`: the number of the end user the order is for, as `POST /data/orders` takes it. The order and its service are that end user's. With `priorityAssist` true it is that end user's registration that counts; an end user that is not this account's is refused with a 422 on `priorityAssist`, or on `endUser` without the flag."
                  },
                  "ntdId": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "The Reference Number of the Network Termination Device (NTD) to place the order against.\nSpecify \"NEW\" in this field to order against a new NTD.\n"
                  },
                  "appointmentId": {
                    "type": "string",
                    "maxLength": 48,
                    "description": "(Conditional) NBN Appointment ID to attach to this order.\nAn Appointment with Demand Type \"Standard Install\" is required for premises with:\n - Service Class 21\n - Service Class 22\n - Service Class 23\n - Service Class 24 when ordering a new NTD\n"
                  },
                  "transferType": {
                    "type": "string",
                    "maxLength": 32,
                    "enum": [
                      "Service Transfer",
                      "Service Transfer Reversal",
                      "Connect Outstanding"
                    ],
                    "description": "(Conditional) Service Transfer Type.\nOnly applicable to, and is mandatory for Service Transfers.\n - \"Service Transfer\" - transfer an existing nbn service from another provider to you.\n - \"Service Transfer Reversal\" - recover an existing service that was incorrectly transferred away from you.\n - \"Connect Outstanding\" - connect a new service over a line that still has an existing active service not controlled by the End User.  This requires time to legally cancel the existing service.\n"
                  },
                  "occupancyDocumentId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "(Optional, ours) On a Connect Outstanding, the `id` of a proof of occupancy uploaded with `POST /data/occupancy-documents`: evidence that the End User occupies the premises. It is kept with the order and used by that order only: a retry with the same `orderReference` may name it again. Another account's, or one another order used, is a 422."
                  },
                  "serviceRef": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "(Conditional) Service ID (AVC #) for Service Transfer.\nOnly applicable to, and is mandatory for, Service Transfers.\n\nIMPORTANT > Validate the AVC # against the CPI # or NTD + UNI Port using the SQ Single Site API first."
                  },
                  "customerAuthorityDate": {
                    "type": "string",
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date"
                      },
                      {
                        "type": "string",
                        "format": "date-time"
                      }
                    ],
                    "description": "(Conditional) Date the Customer authorised this order, as `YYYY-MM-DD` (a date-time is read as its date). Must be within the last 45 calendar days only.\nThis is only applicable to Service Transfers and required if `transferType` is \"Service Transfer\" or \"Connect Outstanding\"."
                  },
                  "informedConsent": {
                    "type": "boolean",
                    "description": "Verification that the End User has provided Informed Consent for this order to be placed."
                  },
                  "installationWorkforce": {
                    "type": "string",
                    "enum": [
                      "NBN Co Install",
                      "NBN Co Install End User"
                    ],
                    "description": "(Conditional) Who installs the NTD.\n\nService Class 21 and 22: \"NBN Co Install\" — a technician\nattends.\n\nService Class 23: \"NBN Co Install\" for a technician, or\n\"NBN Co Install End User\" for a self-install, where nbn\ndelivers the NTD and the delivery fields below apply.\n\nService Class 24: must NOT be supplied unless the order also\nrequests a new NTD — there is nothing to install.\n"
                  },
                  "deliveryContactType": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "(Conditional) The type of contact to receive the NTD delivery.\nRequired for Service Class 23 locations that are awaiting the delivery of the NTD."
                  },
                  "deliveryContactName": {
                    "type": "string",
                    "maxLength": 64,
                    "description": "(Conditional) The name of the contact person to receive the NTD delivery.\nRequired for Service Class 23 locations that are awaiting the delivery of the NTD."
                  },
                  "deliveryContactPhone": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "(Conditional) The phone number of the contact person to receive the NTD delivery.\nRequired for Service Class 23 locations that are awaiting the delivery of the NTD."
                  },
                  "deliveryContactEmail": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 128,
                    "description": "(Optional) The email address of the contact person to receive the NTD delivery.\nSpecify for Service Class 23 locations that are awaiting the delivery of the NTD."
                  },
                  "deliveryInstructions": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "(Optional) Custom instructions for the delivery of the NTD.\nOnly specify for Service Class 23 locations that are awaiting the delivery of the NTD."
                  },
                  "authorisedToLeave": {
                    "type": "boolean",
                    "description": "(Optional) Is the delivery agent authorised to leave the NTD at the Delivery Address if the Delivery Contact is not present at the time?\nOnly specify for Service Class 23 locations that are awaiting the delivery of the NTD."
                  },
                  "deliverToLocation": {
                    "type": "boolean",
                    "description": "(Conditional) Deliver the NTD to the premises being connected.\n\nSet false to have it delivered somewhere else, in which case\nthe delivery address fields are required.\n"
                  },
                  "deliveryAddressLine1": {
                    "type": "string",
                    "maxLength": 80,
                    "description": "(Optional) First line of the delivery street address.\nSpecify for Service Class 23 locations that are awaiting the delivery of the NTD where `deliverToLocation` is \"false\"."
                  },
                  "deliveryAddressLine2": {
                    "type": "string",
                    "maxLength": 80,
                    "description": "(Optional) Second line of the delivery street address.\nSpecify for Service Class 23 locations that are awaiting the delivery of the NTD where `deliverToLocation` is \"false\"."
                  },
                  "deliveryLocalityName": {
                    "type": "string",
                    "maxLength": 64,
                    "description": "(Optional) Town / Suburb / Locality name for the delivery address.\nSpecify for Service Class 23 locations that are awaiting the delivery of the NTD where `deliverToLocation` is \"false\"."
                  },
                  "deliveryStateTerritoryCode": {
                    "type": "string",
                    "maxLength": 3,
                    "description": "(Optional) State / Territory code for the delivery address.\nSpecify for Service Class 23 locations that are awaiting the delivery of the NTD where `deliverToLocation` is \"false\"."
                  },
                  "deliveryPostcode": {
                    "type": "string",
                    "maxLength": 4,
                    "description": "(Optional) Postal Code for the delivery address.\nSpecify for Service Class 23 locations that are awaiting the delivery of the NTD where `deliverToLocation` is \"false\"."
                  },
                  "vlanMode": {
                    "type": "string",
                    "enum": [
                      "Default-Mapped",
                      "Tagged"
                    ],
                    "description": "(Optional) The VLAN Mode determines which Product Template will be used when ordering this connection.\n\nIMPORTANT> Do not specify unless explicitly needed.\n\nWhen this field is not specified, \"Default-Mapped\" will be the assumed value.\nIntended mainly for transitioning existing \"Tagged\" PPPoE services without needing to change the client CPE configuration.\n\nIMPORTANT> You cannot change this value with a Modify Order. Instead, the service must be cancelled and reordered, potentially bringing the service down for 24-48 hours.\n"
                  },
                  "uniVlanId": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 4094,
                    "description": "(Conditional) Required if `vlanMode` is \"Tagged\"\nThe UNI VLAN ID # used to tag the service traffic.\nThe value should be between 1 and 4094."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ProductOrder"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Orders"
        ]
      }
    },
    "/nbn/orders/products/nwas": {
      "post": {
        "summary": "Submit an Order to NBN for a NWAS Product",
        "description": "NWAS Products include: Wireless and Fixed Wireless\n\nLimit: 30 per minute for the account (carrier write).\n\n\nA successful submission will result in an \"Acknowledged\" response.\nThe order status can be checked when viewing the Order Details.\n\nIf nbn cannot accept an order as Check Networks sent it, the answer is\nstill a success, with `state` \"PendingReview\" and the order's PND as its\n`id`: the fault is ours, and Check Networks will correct and resubmit it.\nPoll the PND on the Order Details. A genuine refusal from nbn, such as\ninformed consent not evidenced or no NTD capacity, is a 422 instead.\n\nUse the Callbacks API to register a callback URL for receiving\nnotifications when the order is \"Accepted\", \"Complete\" or \"Rejected\".\n\nUse the Service Qualification API first — the Service Class, the NTDs at\nthe premises and the UNI-D port status determine which fields this order\nneeds.\n\n\nVALIDATION>\n\nAn order is one of four things: a new install (`ntdId` \"NEW\" with a\n\"Standard Install\" `appointmentId`, and optionally an\n`installationWorkforce`), taking a spare port on an installed NTD\n(`ntdId` and optionally `unidPortId`), a Service Transfer (adding\n`transferType`, `serviceRef` and `customerAuthorityDate`), or a Connect\nOutstanding (as a transfer, but without `serviceRef` — the previous\noccupant's AVC is unknown). A transfer moving to a different UNI-D\nPort without downtime adds `overlapPeriod` \"4\" and `fromPortId`.\n\nOrders are checked against the Service Qualification for the Location\nbefore they are sent to nbn, so a mistake comes straight back as a 422\nwith the reason — no order is created at nbn when an error is found in\npre-validation. The reasons are the same\nset as the NFAS endpoint, plus:\n\n - `installation_workforce_not_allowed` the NTD is already installed\n - `installation_workforce_invalid` see the `installationWorkforce` field for the accepted values\n",
        "operationId": "post_product_orders_nwas",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:create"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "locId",
                  "bandwidthProductSku",
                  "orderReference",
                  "ntdId",
                  "informedConsent"
                ],
                "dependentRequired": {
                  "transferType": [
                    "customerAuthorityDate",
                    "unidPortId"
                  ],
                  "serviceRef": [
                    "transferType"
                  ],
                  "uniVlanId": [
                    "vlanMode"
                  ],
                  "fromPortId": [
                    "overlapPeriod"
                  ]
                },
                "dependentSchemas": {
                  "ntdId": {
                    "if": {
                      "properties": {
                        "ntdId": {
                          "const": "NEW"
                        }
                      }
                    },
                    "then": {
                      "required": [
                        "appointmentId"
                      ]
                    },
                    "else": {
                      "allOf": [
                        {
                          "not": {
                            "required": [
                              "appointmentId"
                            ]
                          }
                        },
                        {
                          "not": {
                            "required": [
                              "installationWorkforce"
                            ]
                          }
                        }
                      ]
                    }
                  },
                  "transferType": {
                    "if": {
                      "properties": {
                        "transferType": {
                          "const": "Service Transfer"
                        }
                      }
                    },
                    "then": {
                      "required": [
                        "serviceRef"
                      ]
                    },
                    "else": {
                      "not": {
                        "required": [
                          "serviceRef"
                        ]
                      }
                    }
                  },
                  "vlanMode": {
                    "if": {
                      "properties": {
                        "vlanMode": {
                          "const": "Tagged"
                        }
                      }
                    },
                    "then": {
                      "required": [
                        "uniVlanId"
                      ]
                    }
                  },
                  "overlapPeriod": {
                    "allOf": [
                      {
                        "required": [
                          "transferType"
                        ],
                        "properties": {
                          "transferType": {
                            "const": "Service Transfer"
                          }
                        }
                      },
                      {
                        "if": {
                          "properties": {
                            "overlapPeriod": {
                              "const": "4"
                            }
                          }
                        },
                        "then": {
                          "required": [
                            "fromPortId",
                            "unidPortId"
                          ]
                        }
                      }
                    ]
                  }
                },
                "properties": {
                  "locId": {
                    "type": "string",
                    "pattern": "^LOC\\d{12}$",
                    "description": "The NBN Location ID for the premises the order is for."
                  },
                  "bandwidthProductSku": {
                    "type": "string",
                    "maxLength": 64,
                    "description": "Product SKU of the Bandwidth Product being ordered.\nThis controls which Service Layer (Layer 2 or Layer 3) this Order can be Provisioned with.\nUse the Product Qualification > Eligible Bandwidth Products API to find selectable options for the Location (LOC #)\n"
                  },
                  "restorationSlaSku": {
                    "type": "string",
                    "maxLength": 64,
                    "description": "(Optional) Product SKU of the Service Restoration SLA.\nIf omitted, the Standard SLA (\"NBN-SLA-TC4-STD\") is applied.\nIndicates how quick NBN responds should this service be affected by an issue, depending upon the SLA Region.\nResponse times are Business Hours unless a (24/7) SLA is selected.\nEnhanced or Premium SLAs may incur an additional monthly cost.\nBundled SLA Product SKUs will only be accepted when provided with an eligible Bandwidth Product SKU.\nUse the Product Qualification > Eligible Restoration SLA Products API to find selectable options for the Location (LOC #).\n"
                  },
                  "orderReference": {
                    "type": "string",
                    "maxLength": 35,
                    "pattern": "^[A-Za-z0-9._-]+$",
                    "description": "Your Reference Number for this order. Max of 35 characters.\nOnly alphabetic characters (\"a-Z\"), numbers (\"0-9\"), underscores (\"_\"), hyphens (\"-\") and periods (\".\") are allowed.\n\nEXAMPLES:\n - \"New.Foo_BAR-2020-09-20\"\n - \"ExampleCompanyName\"\n - \"JaneCitizen-123456\"\n - \"Reseller.EndUser.123456\"\n"
                  },
                  "endUserRef": {
                    "type": "string",
                    "description": "NOT ACCEPTED: supplying this field returns 422. The platform assigns the End User; this API has no End User (Party) records.\nThe Reference (EUP #) of the End User to associate this Order to.\n\nEXAMPLES:\n - \"EUP000000000000\"\n"
                  },
                  "priorityAssist": {
                    "type": "boolean",
                    "default": false,
                    "description": "(Optional) Whether Priority Assistance is required.\nDefaults to \"false\" if value not set.\nOnly specify \"true\" where the end user is eligible for a Downstream Priority Assistance Service in accordance with NBN Co's Wholesale Broadband Agreement.\n\"true\" is accepted only for a customer on our Priority Assistance register (the end user named in `endUser`, or when none is named the account or your own end user, never another end user's); otherwise the order is refused with a 422 on `priorityAssist` before anything is drafted."
                  },
                  "endUser": {
                    "type": "string",
                    "maxLength": 64,
                    "description": "(Optional) Ours, not the carrier's `endUserRef`: the number of the end user the order is for, as `POST /data/orders` takes it. The order and its service are that end user's. With `priorityAssist` true it is that end user's registration that counts; an end user that is not this account's is refused with a 422 on `priorityAssist`, or on `endUser` without the flag."
                  },
                  "appointmentId": {
                    "type": "string",
                    "maxLength": 48,
                    "description": "(Conditional) NBN Appointment ID to attach to this order.\nAn Appointment with Demand Type \"Standard Install\" is required\nwhen `ntdId` is \"NEW\" — a technician attends to install the NTD\nand antenna. Taking a port on an NTD that is already installed\nrequires no appointment.\n"
                  },
                  "ntdId": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "The Reference Number of the Network Termination Device (NTD) to place the order against.\nSpecify \"NEW\" in this field to order against a new NTD.\n"
                  },
                  "unidPortId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "1",
                      "2",
                      "3",
                      "4",
                      null
                    ],
                    "description": "(Conditional) The Port ID for the UNI-D Resource. Required for Service Transfers or where you want to specify an exact port.\nNBN will assign the next available port where this field is not supplied or is `null`."
                  },
                  "transferType": {
                    "type": "string",
                    "maxLength": 32,
                    "enum": [
                      "Service Transfer",
                      "Service Transfer Reversal",
                      "Connect Outstanding"
                    ],
                    "description": "(Conditional) Service Transfer Type.\nOnly applicable to, and is mandatory for Service Transfers.\n - \"Service Transfer\" - transfer an existing nbn service from another provider to you.\n - \"Service Transfer Reversal\" - recover an existing service that was incorrectly transferred away from you.\n - \"Connect Outstanding\" - connect a new service over a line that still has an existing active service not controlled by the End User.  This requires time to legally cancel the existing service.\n"
                  },
                  "occupancyDocumentId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "(Optional, ours) On a Connect Outstanding, the `id` of a proof of occupancy uploaded with `POST /data/occupancy-documents`: evidence that the End User occupies the premises. It is kept with the order and used by that order only: a retry with the same `orderReference` may name it again. Another account's, or one another order used, is a 422."
                  },
                  "serviceRef": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "(Conditional) Service ID (AVC #) for Service Transfer.\nOnly applicable to, and is mandatory for, Service Transfers.\n\nIMPORTANT > Validate the AVC # against the CPI # or NTD + UNI Port using the SQ Single Site API first."
                  },
                  "customerAuthorityDate": {
                    "type": "string",
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date"
                      },
                      {
                        "type": "string",
                        "format": "date-time"
                      }
                    ],
                    "description": "(Conditional) Date the Customer authorised this order, as `YYYY-MM-DD` (a date-time is read as its date). Must be within the last 45 calendar days only.\nThis is only applicable to Service Transfers and required if `transferType` is \"Service Transfer\" or \"Connect Outstanding\"."
                  },
                  "informedConsent": {
                    "type": "boolean",
                    "description": "Verification that the End User has provided Informed Consent for this order to be placed."
                  },
                  "overlapPeriod": {
                    "type": "string",
                    "enum": [
                      "0",
                      "4"
                    ],
                    "description": "(Optional) The overlap period for Service Transfers.\nFor use when transferring a service to a new UNI-D Port.  The number of hours after Order Completion during which the service will be active on both the old and new ports.  The End User infrastructure should be updated during this period.\nOnly applicable to Service Transfers."
                  },
                  "fromPortId": {
                    "type": "string",
                    "enum": [
                      "1",
                      "2",
                      "3",
                      "4"
                    ],
                    "description": "(Conditional) The UNI-D Port ID of the existing service. Specify the new Port ID via `unidPortId`.\nOnly applicable to Service Transfers and is mandatory if the `overlapPeriod` value is \"4\"."
                  },
                  "installationWorkforce": {
                    "type": "string",
                    "enum": [
                      "NBN Co Install",
                      "NBN Co Install End User",
                      "RSP Install",
                      "RSP Install End User"
                    ],
                    "description": "(Conditional) Installation Workforce for the NTD and/or antenna\ndevice. Only applicable where `ntdId` is \"NEW\" — an installed\nNTD needs no installation.\n\nDefaults to \"NBN Co Install\" when not supplied.\n"
                  },
                  "vlanMode": {
                    "type": "string",
                    "enum": [
                      "Default-Mapped",
                      "Tagged"
                    ],
                    "description": "(Optional) The VLAN Mode determines which Product Template will be used when ordering this connection.\n\nIMPORTANT> Do not specify unless explicitly needed.\n\nWhen this field is not specified, \"Default-Mapped\" will be the assumed value.\nIntended mainly for transitioning existing \"Tagged\" PPPoE services without needing to change the client CPE configuration.\n\nIMPORTANT> You cannot change this value with a Modify Order. Instead, the service must be cancelled and reordered, potentially bringing the service down for 24-48 hours.\n"
                  },
                  "uniVlanId": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 4094,
                    "description": "(Conditional) Required if `vlanMode` is \"Tagged\"\nThe UNI VLAN ID # used to tag the service traffic.\nThe value should be between 1 and 4094."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ProductOrder"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Orders"
        ]
      }
    },
    "/nbn/orders/products/{productInstanceRef}": {
      "parameters": [
        {
          "name": "productInstanceRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The NBN Product Instance Reference of the active product to modify.\nFor Example: \"PRI000000000000\""
        }
      ],
      "patch": {
        "x-badges": [
          {
            "name": "Coming Soon",
            "color": "#f59e0b"
          }
        ],
        "summary": "Submit a Modify Order to change an active NBN Product",
        "description": "**🚧 Coming Soon — not yet available.**\n",
        "operationId": "patch_modify_product",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "productSku": {
                    "type": "string",
                    "description": "(Optional) SKU of the Bandwidth Product to change to. Ignored if empty\nFor Example: \"NBN-BW-TC4-100_20-FTN\""
                  },
                  "serviceRestorationSla": {
                    "type": "string",
                    "description": "(Optional) SKU of the Service Restoration SLA to change to. Ignored if empty\nThere is a cost involved with selecting a Premium or Enhanced SLA.\nYou cannot set an Enhanced SLA for a (NWAS) Fixed Wireless service, or for a residential-grade bandwidth.\nFor Example: \"NBN-SLA-TC4-STD\""
                  },
                  "stabilityProfile": {
                    "type": "string",
                    "enum": [
                      "",
                      "Standard",
                      "Stable",
                      "Repair"
                    ],
                    "description": "(Optional - NCAS (FTTN/FTTB) Only!) The stability profile to use. Ignored if empty.\nFor Example: \"Stable\""
                  },
                  "vlanId": {
                    "type": "integer",
                    "description": "(Optional) Only applies to the Tagged services. Ignored if empty.\nChange the VLAN ID the CPE must supply to the UNI Port.\nFor Example: \"100\""
                  },
                  "wiringIsolation": {
                    "type": "boolean",
                    "default": false,
                    "description": "(Optional - NCAS (FTTC) Only!) Request Wiring Isolation.\nNo other attribute can be modified in this order. A Standard Install `appointmentRef` is required."
                  },
                  "appointmentRef": {
                    "type": "string",
                    "description": "(Optional) The nbn Appointment Ref # of an appointment needed for this modification.\nThis must be supplied for the following:\n -  FTTC where `wiringIsolation` is true\n -  FTTP for Hyperfast NTD replacement via NBN Co Install\n -  HFC for Hyperfast NTD replacement via NBN Co Install\n -  FW for FW HST NTD replacement via NBN Co Install\n"
                  },
                  "endUserRef": {
                    "type": "string",
                    "description": "(Optional - NFAS/NCAS Only!) Change the End User for this service.\nFor example, \"EUP000000000001\"\n"
                  },
                  "customerRequiredDate": {
                    "type": "string",
                    "format": "date",
                    "description": "(Optional) Change the Customer Required Date for this order.\nDate Format: \"YYYY-MM-DD\"\nOnly for NTD replacement orders with delivery details."
                  },
                  "removeBatteryBackup": {
                    "type": "boolean",
                    "default": false,
                    "description": "(Optional - NFAS only!) Set to \"true\" to disable the Battery Backup for this Product Instance. Ignored if \"false\".\nMust have Informed Consent from the End User before using.\n"
                  },
                  "installationWorkforce": {
                    "type": "string",
                    "enum": [
                      "NBN Co Install",
                      "NBN Co Install End User",
                      "RSP Install",
                      "RSP Install End User"
                    ],
                    "description": "(Conditional - NHAS Only) The Installation Workforce for the network shortfall and missing devices.\nDo not specify for HFC SC24 orders against an existing NTD.\nIf device installation is needed, the preferred value is \"NBN Co Install\".\n"
                  },
                  "ntdMacAddress": {
                    "type": "string",
                    "description": "(Conditional - NHAS Only) The MAC Address of the existing NTD.\nMust be specified if `installationWorkforce` is \"RSP Install\" or \"RSP Install End User\".\nMust not be specified if `installationWorkforce` is \"NBN Co Install\" or \"NBN Co Install End User\".\n"
                  },
                  "ntdSerialNumber": {
                    "type": "string",
                    "description": "(Conditional - NHAS Only) The Serial Number of the existing NTD.\nMust be specified if `installationWorkforce` is \"RSP Install\" or \"RSP Install End User\".\nMust not be specified if `installationWorkforce` is \"NBN Co Install\" or \"NBN Co Install End User\".\n"
                  },
                  "ntdType": {
                    "type": "string",
                    "enum": [
                      "1_PORT",
                      "4_PORT"
                    ],
                    "description": "(Optional - NFAS Residential Hyperfast Uplift Only) The type of new Hyperfast NTD to upgrade to.\n - \"1_PORT\" - default option\n - \"4_PORT\" - additional upgrade fee may apply\n"
                  },
                  "portId": {
                    "type": "integer",
                    "enum": [
                      1,
                      2,
                      3,
                      4
                    ],
                    "description": "(Optional - NFAS Only!) Not for V3 (1_PORT) NTD.\nMove the service to a different UNI Port on the NTD.\nThe new Port cannot be zero (0), \"Used\" or reserved.\n"
                  },
                  "speedAndDuplex": {
                    "type": "string",
                    "enum": [
                      "Auto Negotiation (10/100/1000Mbps, Half/Full Duplex)",
                      "100Mbps, Auto Duplex (Half/Full)"
                    ],
                    "description": "(Optional - Older NFAS only!) Not for services with V13, V14 or newer Product Templates.\n"
                  },
                  "afterHours": {
                    "type": "boolean",
                    "default": false,
                    "description": "For EEAS (Enterprise Ethernet) products only! Request this Modify Order be processed after standard business hours.\n"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ProductOrder"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Orders"
        ]
      }
    },
    "/nbn/orders/request_more_time": {
      "patch": {
        "x-badges": [
          {
            "name": "Coming Soon",
            "color": "#f59e0b"
          }
        ],
        "summary": "Request more time for a NBN Product Order",
        "description": "**🚧 Coming Soon — not yet available.**\n",
        "operationId": "patch_request_more_time",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "orderId"
                ],
                "properties": {
                  "orderId": {
                    "type": "string",
                    "description": "NBN Order ID to request more time for.\nFor Example: \"ORD000000000000\""
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ProductOrder"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Orders"
        ]
      }
    },
    "/nbn/orders/update_installation_dispatch": {
      "patch": {
        "x-badges": [
          {
            "name": "Coming Soon",
            "color": "#f59e0b"
          }
        ],
        "summary": "Update the Installation Dispatch details for an Order",
        "description": "**🚧 Coming Soon — not yet available.**\n",
        "operationId": "patch_update_installation_dispatch",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "orderId",
                  "authorityToLeave"
                ],
                "properties": {
                  "orderId": {
                    "type": "string",
                    "description": "NBN Order ID to update the Dispatch Details for.\nFor Example: \"ORD000000000000\""
                  },
                  "authorityToLeave": {
                    "type": "boolean",
                    "description": "Does NBN have the authority to leave the device?"
                  },
                  "deliveryInstructions": {
                    "type": "string",
                    "description": "Instructions for delivery"
                  },
                  "deliveryContactType": {
                    "type": "string",
                    "description": "Delivery Contact, Type of Contact"
                  },
                  "deliveryContactName": {
                    "type": "string",
                    "description": "Delivery Contact, Name of the Contact Person"
                  },
                  "deliveryContactPhone": {
                    "type": "string",
                    "description": "Delivery Contact, Contact Phone Number"
                  },
                  "deliveryContactEmail": {
                    "type": "string",
                    "format": "email",
                    "description": "Delivery Contact, Contact Email Address"
                  },
                  "addressLine1": {
                    "type": "string",
                    "description": "Delivery To Address, Address Line #1"
                  },
                  "addressLine2": {
                    "type": "string",
                    "description": "Delivery To Address, Address Line #2"
                  },
                  "addressLine3": {
                    "type": "string",
                    "description": "Delivery To Address, Address Line #3"
                  },
                  "localityName": {
                    "type": "string",
                    "description": "Delivery To Address, Name of Locality (Town / Suburb)"
                  },
                  "stateTerritoryCode": {
                    "type": "string",
                    "description": "Delivery To Address, State/Territory"
                  },
                  "postCode": {
                    "type": "string",
                    "description": "Delivery To Address, PostCode"
                  },
                  "installationWorkforce": {
                    "type": "string",
                    "description": "Details of the Installation Workforce. e.g., \"NBN Co Install End User\""
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ProductOrder"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Orders"
        ]
      }
    },
    "/nbn/outage/poi/{poiRef}": {
      "parameters": [
        {
          "name": "poiRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The Point of Interconnect (POI) Reference # to find Outages for"
        }
      ],
      "get": {
        "summary": "List known Outages for a POI",
        "description": ">**Required Scope(s):** data:read\n\nList will include:\n\n - Current Outages\n\n - Future Outages\n\n - Recent Outages (last 7 days only)\n",
        "operationId": "get_outages_for_poi",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/Outages"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Outage"
        ]
      }
    },
    "/nbn/outage/service/{serviceRef}": {
      "parameters": [
        {
          "name": "serviceRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The Service Reference (AVC #) to find Outages for"
        }
      ],
      "get": {
        "summary": "List known Outages for a Service",
        "description": ">**Required Scope(s):** data:read\n\nList will include:\n\n - Current Outages\n\n - Future Outages\n\n - Recent Outages (last 7 days only)\n\nIncludes outages declared against the service itself and outages on\nthe POI the service is delivered through.\n",
        "operationId": "get_outages_for_service",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/Outages"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Outage"
        ]
      }
    },
    "/nbn/outage/{outageRef}": {
      "parameters": [
        {
          "name": "outageRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The Outage Reference # to retrieve"
        }
      ],
      "get": {
        "summary": "Retrieve outage details",
        "description": ">**Required Scope(s):** data:read\n\nReturned when the outage affects one of your services or the POIs\nthey ride; impacted-service entries list your own services only.\n",
        "operationId": "get_nbn_outage",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/Outage"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Outage"
        ]
      }
    },
    "/nbn/planning/fibre_uplift/locations": {
      "parameters": [
        {
          "name": "localityName",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "The locality/suburb name to find Fibre Uplift locations in.\n(Conditional) One of `localityName`, `postcode` or `locId` fields must be specified."
        },
        {
          "name": "postcode",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "The postcode to find Fibre Uplift locations in.\n(Conditional) One of `localityName`, `postcode` or `locId` fields must be specified."
        },
        {
          "name": "locId",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "The NBN Location ID to look up.\n(Conditional) One of `localityName`, `postcode` or `locId` fields must be specified."
        },
        {
          "name": "programType",
          "in": "query",
          "schema": {
            "type": "string",
            "enum": [
              "Fibre Connect",
              "MDU Fibre Upgrade",
              "Fibre Uplift"
            ]
          },
          "description": "(Optional) Filter results to one of the available program types"
        }
      ],
      "get": {
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "$ref": "#/components/schemas/FibreUpliftResponse"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "summary": "nbn™ Fibre Uplift Locations",
        "description": ">**Required Scope(s):** data:read\n\nQuery the nbn™ Rollout Status Report for planned or ready Fibre Uplift\nlocations, filtered by locality, postcode or location reference.\n",
        "operationId": "get_locations",
        "tags": [
          "Planning"
        ]
      }
    },
    "/nbn/planning/{locId}": {
      "parameters": [
        {
          "name": "locId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** data:read\n\nRetrieve the Change of Access Technology (COAT) status for a location — the\ncurrent access technology, planned technology flip and related planning data.\nnbn's resource planning record, as Kinetix returns it and without a\n`result` wrapper.\n",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourcePlanning"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "summary": "Change of Access Technology (COAT) Status",
        "operationId": "get_status",
        "tags": [
          "Planning"
        ]
      }
    },
    "/nbn/product_qualification/bandwidths": {
      "parameters": [
        {
          "name": "location_ref",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "The Address LOC # for the order. Required: give `location_ref` (Kinetix's name) or `locId`."
        },
        {
          "name": "locId",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "The same as `location_ref`."
        },
        {
          "name": "service_type",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "The Service Type to find Product SKUs for, as named by the\n/product_qualification/service_types API endpoint. `serviceType` is\naccepted too; when both are given, `service_type` is the one read, and\nthe response's `serviceType` echoes it.\n"
        },
        {
          "name": "serviceType",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "The same as `service_type`."
        },
        {
          "name": "cpi_ref",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "(Conditional) The Copper Pair Identifier (CPI #) for the order. `cpiRef` is accepted too.\nEach Copper Line can support different speeds due to line quality. Specify the CPI # when ordering NCAS (FTTN/FTTB/FTTC) technology against an existing Copper Line.\nDo not specify if requesting \"Enterprise Ethernet\" or `techUplift`."
        },
        {
          "name": "techUplift",
          "in": "query",
          "schema": {
            "type": "boolean"
          },
          "description": "(Optional) Filter the results for technology uplift Product SKUs.\nSpecify as \"true\" to only return Tech Uplift SKUs, specify as \"false\" to only return normal bandwidth SKUs, or do not specify this parameter to return both types of SKUs.\nOnly specify \"true\" when the Location (LOC #) is:\n - NCAS (FTTN/B/C) and eligible for a Fibre Uplift\n - NWAS (Fixed Wireless) and eligible for a High-Speed Uplift\n"
        },
        {
          "name": "termLength",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "(Optional) Request only Product SKUs with this minimum Term Length"
        }
      ],
      "get": {
        "summary": "Eligible Bandwidth Products",
        "description": "Retrieve eligible Bandwidth Product SKUs for a Location and Service Type, in Kinetix's Qualify Bandwidths document and without a `result` wrapper.\n\nDo this AFTER calling the Service Qualification > Single Site and Enterprise Ethernet endpoints with the `loc_id` to ensure accurate results are returned.",
        "operationId": "get_qualify_bandwidths",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BandwidthProductSKUs"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Product Qualification"
        ]
      }
    },
    "/nbn/product_qualification/order_feasibility": {
      "get": {
        "summary": "Feasibility of a Product Connect Order",
        "description": ">**Required Scope(s):** data:read\n\nNBN will analyse and evaluate a 'Connect' order without reserving or committing any services or resources.  Other order types, such as 'Amend', 'Modify', 'Disconnect' and 'Service Transfer' are not supported.\nPass the order you intend to place as query parameters: the Connect order's fields for the location's technology, without `orderReference` and `ntdId`. No order is created.\n\nThe following Primary Access Technologies are supported:\n - Fibre\n - FTTB\n - FTTN\n - FTTC\n - Wireless\n - Satellite\n\nThese technologies are not supported, and are refused with a 422:\n - HFC\n - Enterprise Ethernet",
        "operationId": "get_order_feasibility",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "locId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^LOC\\d{12}$"
            },
            "description": "NBN Location ID of the Premises the order will be for",
            "example": "LOC000000000000"
          },
          {
            "name": "bandwidthProductSku",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 64
            },
            "description": "The Stock Keeping Unit (SKU) identifier for the bandwidth product to be ordered from Check Networks.\nUse the /product_qualification/bandwidths API endpoint to find which SKUs are available at the location."
          },
          {
            "name": "restorationSlaSku",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 64,
              "default": "NBN-SLA-TC4-STD"
            },
            "description": "(Optional) SKU identifier for the Service Restoration SLA."
          },
          {
            "name": "unidPortId",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4"
              ]
            },
            "description": "(Optional) The UNI-D port the service would use on an existing NTD. Leave it out for NBN to choose."
          },
          {
            "name": "copperPairId",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 32
            },
            "description": "(Optional, FTTB/FTTN/FTTC) The copper pair (CPI #) the service would run over. Its Service Class sets the jumpering and exchange pair options for you."
          },
          {
            "name": "potsInterconnect",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 32
            },
            "description": "(Optional, FTTB/FTTN/FTTC) The Full National Number (FNN) or Unconditioned Local Loop (ULL) of the phone service being transitioned."
          },
          {
            "name": "installOptionCentralSplitter",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "(Optional, FTTB/FTTN/FTTC) Installation Options, Central Splitter"
          },
          {
            "name": "appointmentId",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 48
            },
            "description": "(Optional) One of your NBN Appointment IDs to evaluate with the order.\nFor Example: \"APT000000000000\""
          },
          {
            "name": "priorityAssist",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "(Optional) Whether Priority Assistance is required: `true`/`false` or `1`/`0`. Only specify \"true\" where the end user is eligible for a Downstream Priority Assistance Service in accordance with NBN Co's Wholesale Broadband Agreement. \"true\" is accepted only for a customer on our Priority Assistance register (the end user named in `endUser`, or when none is named the account or your own end user); otherwise the check is refused with a 422 on `priorityAssist` before the carrier is asked."
          },
          {
            "name": "endUser",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 64
            },
            "description": "(Optional) Ours, not the carrier's: the number of the end user the order would be for, as `POST /data/orders` takes it. With `priorityAssist` \"true\" it is that end user's registration that counts; an end user that is not this account's is refused with a 422 on `priorityAssist`. Left out, the account's own registration counts, or the one on your own end user (made when you register yourself); another end user's counts only when named."
          },
          {
            "name": "installationWorkforce",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "NBN Co Install",
                "NBN Co Install End User",
                "RSP Install",
                "RSP Install End User"
              ]
            },
            "description": "(Optional) Installation Workforce"
          },
          {
            "name": "transferType",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 32,
              "enum": [
                "Service Transfer",
                "Service Transfer Reversal",
                "Connect Outstanding"
              ]
            },
            "description": "(Optional) Service Transfer Type."
          },
          {
            "name": "serviceRef",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 32
            },
            "description": "(Optional) Service ID (AVC"
          },
          {
            "name": "customerAuthorityDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "(Optional) Customer Authority Date for a Service Transfer. Must be within the last 45 calendar days."
          },
          {
            "name": "overlapPeriod",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "4"
              ]
            },
            "description": "(Optional) The overlap period for a Service Transfer."
          },
          {
            "name": "fromPortId",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4"
              ]
            },
            "description": "(Optional) The UNI-D port of the service being transferred. Required when `overlapPeriod` is \"4\"."
          },
          {
            "name": "vlanMode",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "Default-Mapped",
                "Tagged"
              ]
            },
            "description": "(Optional) The UNI-D VLAN mode."
          },
          {
            "name": "uniVlanId",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 4094
            },
            "description": "(Optional) The UNI-D VLAN ID, with a `Tagged` VLAN mode."
          }
        ],
        "responses": {
          "200": {
            "x-summary": "Success",
            "description": "NBN's evaluation. A \"Feasible\" result lists the shortfalls; a \"Rejected\" one lists the reasons.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "status"
                      ],
                      "properties": {
                        "status": {
                          "type": "string",
                          "description": "NBN's verdict on the proposed Connect order.",
                          "example": "Feasible"
                        },
                        "shortfall": {
                          "type": "array",
                          "description": "The infrastructure NBN would need to provide. A \"true\" value flags work that may bring a New Development Charge.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "example": "LEADIN"
                              },
                              "value": {
                                "type": "boolean"
                              }
                            }
                          }
                        },
                        "reasonCode": {
                          "type": "array",
                          "description": "Why NBN would reject the order as specified.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "example": "RJ006003"
                              },
                              "reason": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "serviceQualificationType": {
                          "type": "string",
                          "example": "ProductOrder"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "result": {
                    "shortfall": [
                      {
                        "type": "NTD",
                        "value": false
                      },
                      {
                        "type": "LEADIN",
                        "value": false
                      },
                      {
                        "type": "NBNCOINFRASTRUCTURE",
                        "value": false
                      }
                    ],
                    "status": "Feasible",
                    "serviceQualificationType": "ProductOrder"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Product Qualification"
        ]
      }
    },
    "/nbn/product_qualification/restoration_sla": {
      "parameters": [
        {
          "name": "locId",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "required": true,
          "description": "The Address LOC # for the order"
        },
        {
          "name": "bandwidthProductSku",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "required": true,
          "description": "The Bandwidth Product SKU for the order"
        }
      ],
      "get": {
        "summary": "Eligible Restoration SLA Products",
        "description": "Retrieve eligible Restoration SLA Product SKUs for a Location and Bandwidth Product SKU.\n\nDo this AFTER calling the Service Qualification > Single Site and Enterprise Ethernet endpoints with the `locId` to ensure accurate results are returned.",
        "operationId": "get_qualify_restoration_sla",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/RestorationSLAProductSKUs"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Product Qualification"
        ]
      }
    },
    "/nbn/product_qualification/service_types": {
      "parameters": [
        {
          "name": "location_ref",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "The LOC # of the Address. Required: give `location_ref` (Kinetix's name) or `locId`."
        },
        {
          "name": "locId",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "The same as `location_ref`."
        }
      ],
      "get": {
        "summary": "Eligible Service Types",
        "description": ">**Required Scope(s):** data:read\n\nRetrieve the Service Types your account can order from Check Networks\nat a Location, in Kinetix's Qualify Service Types document and without\na `result` wrapper. TC4 only — Enterprise Ethernet is never ordered via\nthis endpoint.\n\n`Layer 3 - IPoE` is available at every serviceable location.\n`Layer 2 - TC4` is listed when your interconnect covers the location's\nPOI.\n",
        "operationId": "get_qualify_service_types",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceTypes"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Product Qualification"
        ]
      }
    },
    "/nbn/products": {
      "parameters": [
        {
          "name": "status",
          "in": "query",
          "schema": {
            "type": "string",
            "default": "Active",
            "enum": [
              "Active",
              "Deleted"
            ]
          },
          "description": "(Optional) Filter results to this Status. Defaults to \"Active\". A product is only ever Active or Deleted; any other value, such as an order state (New, InProgress, Held, Pending), is `400`."
        },
        {
          "$ref": "#/components/parameters/NbnProductType"
        },
        {
          "$ref": "#/components/parameters/NbnTechType"
        },
        {
          "name": "customerRef",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "(Optional) Filter results to this Customer Ref."
        }
      ],
      "get": {
        "summary": "List Product Instances",
        "operationId": "get_products",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListProducts"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Product Inventory"
        ]
      }
    },
    "/nbn/products/active": {
      "parameters": [
        {
          "$ref": "#/components/parameters/NbnProductType"
        },
        {
          "$ref": "#/components/parameters/NbnTechType"
        }
      ],
      "get": {
        "summary": "List the 'Active' Product Instances",
        "operationId": "get_active_products",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListProducts"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Product Inventory"
        ]
      }
    },
    "/nbn/products/in_progress": {
      "parameters": [
        {
          "$ref": "#/components/parameters/NbnProductType"
        },
        {
          "$ref": "#/components/parameters/NbnTechType"
        }
      ],
      "get": {
        "summary": "List Product Instances still being provisioned (always empty)",
        "description": "**Always answers an empty list, by design.** A service does not exist as\na Product Instance until its order completes, so there is never anything\nto list here. The path is kept so that clients built against the\npublished contract keep working.\n\nTo see orders in flight (quoting, ordered, provisioning, or waiting for\nyou), use `GET /data/orders`, which covers NBN and Opticomm alike and\ncarries each order's status and what it needs next.\n",
        "operationId": "get_in_progress_products",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListProducts"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Product Inventory"
        ]
      }
    },
    "/nbn/products/recently_disconnected": {
      "parameters": [
        {
          "$ref": "#/components/parameters/NbnProductType"
        },
        {
          "$ref": "#/components/parameters/NbnTechType"
        }
      ],
      "get": {
        "summary": "List Product Instances disconnected in the past seven days",
        "description": "Lists your account's NBN services disconnected in the past seven days.\n",
        "operationId": "get_recently_disconnected_products",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListProducts"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Product Inventory"
        ]
      }
    },
    "/nbn/products/related/{productRef}/orders": {
      "parameters": [
        {
          "name": "productRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The Product Instance or Product Service reference to query."
        }
      ],
      "get": {
        "summary": "Retrieve the orders related to this Product Instance",
        "description": ">**Required Scope(s):** data:read\n\nOrders are grouped by kind: the Connect Order that created the\nProduct Instance, plus any Modify and Disconnect Orders raised\nagainst it. Only orders submitted through this platform appear.\n",
        "operationId": "get_related_orders",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ProductRelatedOrders"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Product Inventory"
        ]
      }
    },
    "/nbn/products/service/{serviceRef}": {
      "parameters": [
        {
          "name": "serviceRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The Service Reference (AVC #) of the Product Instance."
        }
      ],
      "get": {
        "summary": "Retrieve Product Instance details via the Service Ref",
        "description": "Retrieve one of your NBN product instances by its service reference\n(the AVC). Returns the same detail as `/nbn/products/{productId}`,\nkeyed by the service ref instead of the PRI.",
        "operationId": "get_product_via_service",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ProductInventory"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Product Inventory"
        ]
      }
    },
    "/nbn/products/{productId}": {
      "parameters": [
        {
          "name": "productId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The NBN Product Instance ID.\nFor Example: \"PRI000000000000\""
        }
      ],
      "get": {
        "summary": "Retrieve the details of a nbn™ Product Instance",
        "description": ">**Required Scope(s):** data:read\n",
        "operationId": "get_product",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ProductInventory"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Product Inventory"
        ]
      },
      "patch": {
        "summary": "Update the administrative details of the Product Instance",
        "description": ">**Required Scope(s):** data:update\n\nChanging the nbn™ values will require a Modify Order instead.\n\nEditable fields include:\n - `customerReference` - Your Reference for this record\n - `endUser` - The End User this record is delivered to\n\nThese details are held by Check Networks — updating them does not\nchange the carrier's records. A request that sends `customer` is\nrefused: use `endUser` instead.\n",
        "operationId": "patch_product",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "customerReference": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255,
                    "description": "Change the Customer Reference for this Product Instance. Pass null to clear it."
                  },
                  "endUser": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 32,
                    "description": "Change the End User this Product Instance is associated to. Specify the End User Number of one of your End User records (as shown in the portal). Pass null to unlink the End User."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ProductInventory"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Product Inventory"
        ]
      }
    },
    "/nbn/provisioning/layer2/destinations": {
      "get": {
        "summary": "List Layer 2 Link Destinations",
        "description": ">**Required Scope(s):** data:read\n\nThe active Layer 2 link destinations available to your account for nbn™\nservices — the outer VLANs (S-Tags) on your customer interconnects, where a\nLayer 2 service can be handed off to you. Use an `interconnectRef` from\nhere as the `destination` when provisioning a Layer 2 order.\n\nA single-tag interconnect carries all your services on one outer VLAN\nacross every POI and carrier; it is presented under the reserved POI code\n`0NAT` and appears here as well as under Opticomm.\n\nThis is the carrier-scoped view of `GET /data/layer2/destinations`, which\nreturns the same destinations across every carrier at once. New\nintegrations should prefer that one.\n",
        "operationId": "get_nbn_provisioning_layer2_destinations",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "results"
                  ],
                  "properties": {
                    "results": {
                      "type": "array",
                      "description": "The active Layer 2 link destinations available to you.",
                      "items": {
                        "$ref": "#/components/schemas/Layer2Destination"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Provisioning"
        ]
      }
    },
    "/nbn/provisioning/order": {
      "post": {
        "summary": "Provision a Product Order",
        "description": ">**Required Scope(s):** data:create\n\nProvisions a Connect Order as a service on the Check Networks network —\nits authentication identity, addressing, VLAN tags and edge configuration.\n\nThis is a separate step from ordering the tail. The Connect Order APIs\n(NFAS, NWAS, NHAS, NCAS) order the access service from nbn™; this builds\nthe service on our side and links it to that order.\n\n**A service is not built until you ask.** Completing at the carrier does\nnot provision anything by itself — if this is never called for an order,\nthe service never goes live. You may call it at any point after the order\nis placed: ask before the carrier has finished and the service is built as\nsoon as it delivers; ask afterwards and it is built immediately.\n\nThe same endpoint serves both delivery modes — supply `destination` for a\nLayer 2 handoff, or the Layer 3 fields (`fixedIp`, `ipv6Method`,\n`protocol`) for a Layer 3 service. Do not mix the two.\n\nYour settings can be changed by calling this again, up until the service\nis built. After that, changes require a Modify Order.\n\nIf the order is later rejected or cancelled by the carrier, the\nprovisioning request is cancelled with it.\n",
        "operationId": "post_provision_order",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:create"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "orderRef"
                ],
                "properties": {
                  "orderRef": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "The Reference ID of the Connect Order to be provisioned.\nOrders that are marked \"Rejected\" will have any provisioning requests rejected too."
                  },
                  "fixedIp": {
                    "type": "boolean",
                    "default": false,
                    "description": "(Optional) Assign a Fixed IPv4 address to a Layer 3 Service.\nNOTE: Fees and charges may apply - refer to your Agreement for details.\nLeave empty to have Check Networks assign a Dynamic address instead.\nDo not specify this field for a Layer 2 Order.\n"
                  },
                  "ipv6Method": {
                    "type": "string",
                    "enum": [
                      "Disabled",
                      "DHCPv6"
                    ],
                    "description": "(Optional) Enable IPv6 for a Layer 3 service.\nLeft unspecified, IPv6 is enabled.\nNOTES:\n - There is no charge for enabling IPv6 for a service.\n - Can be applied whether `fixedIp` is specified or not.\n - The End User's CPE may need configuring to enable IPv6.\n - You can safely assign IPv6 to services without IPv6 support.\n - IPv6 Addresses and Prefixes will be assigned at processing.\n - Do not specify this field for a Layer 2 Order.\n\nOPTIONS:\n - 'Disabled' - Do not enable IPv6 for this service.\n - 'DHCPv6' - Enable IPv6 via DHCPv6 with Prefix Delegation.\n"
                  },
                  "protocol": {
                    "type": "string",
                    "enum": [
                      "IPoE",
                      "PPPoE"
                    ],
                    "description": "(Optional) The protocol used to connect and authenticate the Layer 3 service within RADIUS.\nThe default \"IPoE\" is preferred.  If using \"PPPoE\" you must provide the EXACT username and password configured on the end-user's device.\nPPPoE requires a realm on your account. Contact support if you do not have one.\nDo not specify this field for a Layer 2 Order.\n"
                  },
                  "username": {
                    "type": "string",
                    "maxLength": 32,
                    "pattern": "^[A-Za-z0-9._-]+$",
                    "description": "(Optional) - For `protocol` = \"PPPoE\" only.\nThe PPPoE Username the user will authenticate with, without a realm —\nyour realm is appended for you.\nLeave it out and a username is generated with the service.\nDo not specify this field for a Layer 2 Order.\n"
                  },
                  "password": {
                    "type": "string",
                    "format": "password",
                    "minLength": 8,
                    "maxLength": 64,
                    "description": "(Optional) - For `protocol` = \"PPPoE\" only.\nThe PPPoE Password the user will authenticate with.\nLeave it out and a password is generated with the service.\nDo not specify this field for a Layer 2 Order.\n"
                  },
                  "destination": {
                    "type": "string",
                    "format": "uuid",
                    "description": "(Conditional) - Required for Layer 2 Orders.\nThe Peer NNI to use as the \"Destination\" of the Layer 2 link for this Service, where its traffic will be handed over to you.\nUse the Provisioning Layer 2 Destinations API (`GET /nbn/provisioning/layer2/destinations`) for allowed values.\nDo not specify this field for a Layer 3 Order.\n"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ProvisioningResponse"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Provisioning"
        ]
      }
    },
    "/nbn/provisioning/{reference}": {
      "parameters": [
        {
          "name": "reference",
          "in": "path",
          "required": true,
          "description": "A 15-character order reference (`PND…` draft, `ORD…` NBN order, `OPO…` Opticomm order) or a carrier provisioning-request id (`PRV…`). Both resolve to the same provisioning status. Anything else returns 404.",
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "summary": "Get Provisioning Status (Order or Provisioning Request)",
        "description": ">**Required Scope(s):** data:read\n\nReturns the provisioning status for one of your orders or provisioning\nrequests. Accepts either an order reference (`PND…`/`ORD…`/`OPO…`) or a\ncarrier provisioning-request id (`PRV…`) — both resolve to the same status.\n\nThe `provisioning` block carries the carrier's connection detail (protocol,\nIP, speed plan, Layer 2 handoff tags) once the service has been provisioned;\nit is empty for an order still in flight.\n",
        "operationId": "get_provisioning",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ProvisioningResponse"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Provisioning"
        ]
      }
    },
    "/nbn/quotes": {
      "get": {
        "summary": "List your in-date EE FBC Quotes",
        "description": ">**Required Scope(s):** data:read\n\nThe Enterprise Ethernet Fibre Build Contribution quotes attributed to your\naccount that are still in date: the ones you requested, and any our staff\nattributed to you. A build cost belongs to the location, so a quote someone\nelse requested for the same location is listed only once it is attributed\nto you. Expired quotes are not listed; request a new one with\n`POST /nbn/quotes`.\n\nAn account with no in-date quote gets an empty list.\n\nSearch, filter and sort it as the portal's NBN Quotes page does: the same\nchoice gives the same quotes in the same order. Soonest to expire first\nunless you ask for another order; the quote id breaks every tie, so the\norder is stable between pages. Paged by `page` and `perPage` like every\nlist of your own records.\n\nThe search, filters, sort and paging are ours, not the carrier's: the\ncarrier has no list of quotes, so this list is our own register of yours\nrather than a relay.\n",
        "operationId": "list_quotes",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Quotes whose premises address, location id, quote id or your reference contains this text, ignoring case. At most 100 characters.",
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "poi",
            "in": "query",
            "required": false,
            "description": "Quotes at this nbn POI, as `poiName` shows it (`2ALB - Albury`), ignoring case.",
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "buildCategory",
            "in": "query",
            "required": false,
            "description": "Quotes with this fibre build category, as `fibreBuildCategory` shows it (`A`), ignoring case.",
            "schema": {
              "type": "string",
              "maxLength": 8
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "The order: by premises address (the location id where we hold no address), POI, fibre build category, the Fibre Build Contribution (`cost`), or the last day the quote is valid (`expiry`).",
            "schema": {
              "type": "string",
              "enum": [
                "premises",
                "poi",
                "category",
                "cost",
                "expiry"
              ],
              "default": "expiry"
            }
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "description": "Ascending or descending.",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "asc"
            }
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "total",
                    "page",
                    "perPage",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer",
                      "description": "Quotes matching the search and filters."
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "description": "One page of your in-date quotes.",
                      "items": {
                        "$ref": "#/components/schemas/Quote"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Quotes"
        ]
      },
      "post": {
        "summary": "Create an Enterprise Ethernet (EE) Fibre Build Contribution (FBC) Quote",
        "description": "A successful request will return an \"Acknowledged\" response. A repeat request for a location with an in-date quote, or one the carrier is still working, returns that quote instead of asking again.\nThe carrier works the quote over hours or days. When it is priced, held waiting on you (\"Action Required\"), or ends unpriced, the `quote.completed`, `quote.actionRequired` or `quote.closed` webhook is sent, and your users with EE quote updates on are emailed. Read it any time with `GET /nbn/quotes/{quoteId}`.\n\nTo try this call without reaching the carrier, use the [sandbox](https://help.checknetworks.tools/api/sandbox/) with one of your account's [test addresses](https://help.checknetworks.tools/api/sandbox/#addresses).\n\nNBN error codes surfaced via the 400 response include:\n|Type|Code|Message|\n|---|---|---|\n|ValidationException|001000|The following mandatory field is not provided: %fieldName%|\n|ValidationException|001003|Incorrect enumeration of %enumeration% provided for field %fieldName%|\n|ValidationException|001012|The value for %fieldName% : %fieldValue% is in an invalid format|\n|ValidationException|001015|The value of %fieldName% %value% is invalid|\n|InvalidAddressException|005036|The requested location is currently not serviceable|\n|InvalidAddressException|012000|The NBN Location ID provided in the request : %NBN Location ID% does not result in a valid NBN Location Address match|",
        "operationId": "post_create_quote",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:create"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "locId"
                ],
                "properties": {
                  "locId": {
                    "type": "string",
                    "description": "NBN Location ID for the site/premises the quote is for"
                  },
                  "rspReference": {
                    "type": "string",
                    "description": "RSP Reference ID, specified by the Access Seeker"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The quote request has been acknowledged.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/QuoteCreated"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Quotes"
        ]
      }
    },
    "/nbn/quotes/{quoteId}": {
      "parameters": [
        {
          "name": "quoteId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The EE FBC Quote ID.\nFor Example: \"EEQ-0000000000\""
        }
      ],
      "get": {
        "summary": "Get details of an EE FBC Quote",
        "description": "One quote attributed to your account, in any status: still being worked, held waiting on you (`subStatus` Pending), priced, or ended. A quote not attributed to your account answers 404, as a missing one does.\n\nThe quote is read from what the carrier last told us, which its callbacks and an hourly re-read keep current, so this never waits on the carrier.",
        "operationId": "get_quote",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/Quote"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Quotes"
        ]
      }
    },
    "/nbn/sales": {
      "parameters": [
        {
          "name": "locId",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "required": true,
          "description": "The Address Reference (LOC #) to find historical Sales Leads for"
        }
      ],
      "get": {
        "summary": "Historical nbn™ Sales Leads for a Location",
        "description": ">**Required Scope(s):** data:read\n\nReturns the historical nbn™ Sales Leads for an address (`locId`),\nrelayed from the carrier.\n",
        "operationId": "get_sales_search",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "results"
                  ],
                  "properties": {
                    "results": {
                      "type": "array",
                      "description": "The historical Sales Leads for the Location.",
                      "items": {
                        "$ref": "#/components/schemas/SalesLead"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Sales"
        ]
      }
    },
    "/nbn/sales/{salesRef}": {
      "parameters": [
        {
          "name": "salesRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The nbn™ Sales Lead reference.\nFor Example: \"SLE000000000000\""
        }
      ],
      "get": {
        "summary": "nbn™ Sales Leads record",
        "description": ">**Required Scope(s):** data:read\n\nReturns a single nbn™ Sales Leads record by its reference, relayed from the\ncarrier.\n",
        "operationId": "get_sales_record",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/SalesLead"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Sales"
        ]
      }
    },
    "/nbn/service_health/report/{hrId}": {
      "parameters": [
        {
          "name": "hrId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The Service Health Record ID.\nFor Example: \"HRI000000000000\""
        }
      ],
      "get": {
        "summary": "Request the details of a Service Health Record",
        "operationId": "get_health_report",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ServiceHealth"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Service Health"
        ]
      }
    },
    "/nbn/service_health/report/{hrId}/tests/{testRef}": {
      "parameters": [
        {
          "name": "hrId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The Service Health Record ID.\nFor Example: \"HRI000000000000\""
        },
        {
          "name": "testRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The Service Test reference, as the report's `relatedServiceTest` gives it.\nFor Example: \"TRI000000000000\""
        }
      ],
      "get": {
        "summary": "Get Service Health Test",
        "description": "Retrieve the details of a Service Health Test for a given Service Health Record.\nThe results of each test a report links in `relatedServiceTest` are fetched\nwhen the report completes and served from then on; a test not yet fetched\nanswers 404.",
        "operationId": "get_health_report_test",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ServiceTest"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Service Health"
        ]
      }
    },
    "/nbn/service_health/service/{serviceRef}": {
      "parameters": [
        {
          "name": "serviceRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The TC4 Service (AVC #) to list Service Health Reports for"
        }
      ],
      "get": {
        "summary": "List the recent Service Health Reports for a Service",
        "description": "Will only show results within the last 30 days",
        "parameters": [
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "(Optional) When to retrieve records from (YYYY-MM-DDTHH:mm:ssZ).\nDefaults to 7 days ago (UTC)."
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "(Optional) When to retrieve records until (YYYY-MM-DDTHH:mm:ssZ).\nDefaults to now (UTC)."
          }
        ],
        "operationId": "get_service_health_reports",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "results"
                  ],
                  "properties": {
                    "results": {
                      "type": "array",
                      "description": "The recent Service Health Reports for the Service.",
                      "items": {
                        "$ref": "#/components/schemas/ServiceHealth"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Service Health"
        ]
      },
      "post": {
        "summary": "Request a new Service Health Report for a TC4 Service (AVC #)",
        "description": "Limit: 30 per minute for the account (carrier write).\n\nRequests a fresh Service Health Report from the carrier. The report completes asynchronously: subscribe a webhook to `serviceHealth.reportReady`, sent once when the report is stored, then read it with `GET /nbn/service_health/report/{hrId}`. Or poll that endpoint.",
        "operationId": "post_request_report",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The report completes in the background.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "hrId": {
                          "type": "string",
                          "description": "The Service Health record identifier (HRI",
                          "example": "HRI0000000000001"
                        },
                        "requestStatus": {
                          "type": "string",
                          "description": "Carrier acceptance status of the request.",
                          "example": "Pending"
                        },
                        "overall": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Overall condition — null until the report completes."
                        },
                        "requestedAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "When the report was requested."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Service Health"
        ]
      }
    },
    "/nbn/service_health/service/{serviceRef}/latest": {
      "parameters": [
        {
          "name": "serviceRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The TC4 Service (AVC #)"
        }
      ],
      "get": {
        "summary": "Get the latest Service Health details for a Service",
        "operationId": "get_latest_service_health",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ServiceHealth"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Service Health"
        ]
      }
    },
    "/nbn/service_health/service/{serviceRef}/telemetry": {
      "parameters": [
        {
          "name": "serviceRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The TC4 Service (AVC #) to retrieve Telemetry for"
        },
        {
          "name": "fromDate",
          "in": "query",
          "schema": {
            "type": "string",
            "format": "date-time"
          },
          "description": "(Optional) When to retrieve records from (YYYY-MM-DDTHH:mm:ssZ).\nDefaults to 7 days ago (UTC)."
        },
        {
          "name": "toDate",
          "in": "query",
          "schema": {
            "type": "string",
            "format": "date-time"
          },
          "description": "(Optional) When to retrieve records until (YYYY-MM-DDTHH:mm:ssZ).\nDefaults to now (UTC)."
        }
      ],
      "get": {
        "summary": "Service Health Telemetry",
        "description": "Retrieve the Telemetry for a Service Health Record for a given Service.\nRead live from nbn on each call, so it counts against the same rate limit\nas the other live carrier reads.",
        "operationId": "get_service_telemetry",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/Telemetry"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Service Health"
        ]
      }
    },
    "/nbn/service_qualification/enterprise_ethernet": {
      "parameters": [
        {
          "name": "loc_id",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "NBN Location ID, use an \"/address/search\" request to get this ID for an address. Required: give `loc_id` (Kinetix's name) or `locId`."
        },
        {
          "name": "locId",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "The same as `loc_id`."
        }
      ],
      "get": {
        "summary": "Enterprise Ethernet Site Qualification query",
        "description": "Return information about the availability of Enterprise Ethernet services at a given NBN Location ID: nbn's own body, as Kinetix returns it and without a `result` wrapper.",
        "operationId": "get_enterprise_ethernet",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NbnEnterpriseEthernetQualification"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Service Qualification"
        ]
      }
    },
    "/nbn/service_qualification/fibre_uplift": {
      "parameters": [
        {
          "name": "loc_id",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "NBN Location ID, use an \"/address/search\" request to get this ID for an address. Required: give `loc_id` (Kinetix's name) or `locId`.\nMust be an eligible NCAS (FTTN) or NCAS (FTTC) location. Use the $.siteRestriction.supportingTechnology.alternativeTechnology field in a standard Site Qualification response to determine eligibility."
        },
        {
          "name": "locId",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "The same as `loc_id`."
        }
      ],
      "get": {
        "summary": "Fibre Uplift Site Qualification query",
        "description": "Return information about the Fibre Uplift product available to an eligible location: nbn's own body, as Kinetix returns it and without a `result` wrapper. Its `siteRestriction` is one object, not a list.\n\nTo be eligible, the $.siteRestriction.supportingTechnology.alternativeTechnology field in the single site qualification must be \"Fibre\"\n\nNBN error codes surfaced via the 400 response include:\n|Type|Code|Message|\n|---|---|---|\n|TechnicalException|000000|A technical error has occurred during the processing of the request.|\n|ValidationException|001000|The following mandatory field or fields are not provided - %field1%, %field2%, ....|\n|ValidationException|001001|Field length of %fieldName% is invalid, the length provided is %providedLengthOfField% but it should be %acceptedLengthOfField%|\n|ValidationException|001002|Invalid parameter combination- %parameter1% cannot be provided with %parameter2%, ...|\n|ValidationException|001004|Invalid parameter combination: %parameter1% cannot be provided with %parameter2% ...|\n|ValidationException|001005|The following field or fields should not be provided for this operation- %field1%, %field2%, ....|\n|ValidationException|001011|At least one of the following fields must be provided: %field1%, %field2% ....|\n|ValidationException|001012|The value for %field name% = %field value% is in an invalid format.|\n|ValidationException|001013|The value for %fieldname% is outside of the allowable range : %Date Range%|\n|ValidationException|001015|The value of %fieldname% %fieldvalue% is invalid.|\n|ValidationException|001207|Rejected - Invalid request. [%fieldname%]: [%field value%] is invalid.|\n|NotAllowedException|008000|The operation cannot be performed with the specified parameters: %parameter1%, %parameter2%, ....|\n|RecordNotFoundException|011000|No records were found to match the %fieldName% %fieldValue% specified in the request.|\n|InvalidAddressException|012000|There are no matches for the address details provided in the request.|",
        "operationId": "get_fibre_uplift",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NbnFibreUpliftQualification"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Service Qualification"
        ]
      }
    },
    "/nbn/service_qualification/single_site": {
      "parameters": [
        {
          "name": "loc_id",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "NBN Location ID, use an \"/address/search\" request to retrieve this for an address. Required: give `loc_id` (Kinetix's name) or `locId`."
        },
        {
          "name": "locId",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "The same as `loc_id`."
        },
        {
          "name": "pots_interconnect",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "Existing Full National Number (FNN) or Unconditional Local Loop (ULL) ID to check against. `potsInterconnect` is accepted too."
        },
        {
          "name": "potsInterconnect",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "The same as `pots_interconnect`."
        },
        {
          "name": "service_ref",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "(Conditional) Existing Service ID for Service Transfer. Either the entire AVC # (e.g. AVC000000000000) or the last 5 digits only (e.g 00000). `serviceRef` is accepted too.\n\nMandatory for, and only relevant to, Service Transfer orders.\n\nRequires `customer_authority_date` to be supplied as well; a `service_ref` without one is rejected with a 400.\n\nIf specified, the response indicates the matching resource via `serviceIDMatch` on the copper line resources (FTTB / FTTN / FTTC) or on the NTD's `uniPortD` ports (FTTP / HFC / Fixed Wireless). Exactly one carries `true` when the AVC validates.\n\nAny issues with validating the Service ID match are indicated via the `siteRestrictionError` object on the `siteRestriction`. These issues include:\n\n - RJ002003 - The provided AVC does not exist: {AVC}\n - RJ002004 - The provided AVC has recently been disconnected: {AVC}\n - RJ002005 - The provided AVC exists at a different location: {AVC}\n - RJ002006 - The provided AVC has recently been disconnected at a different location: {AVC}\n"
        },
        {
          "name": "serviceRef",
          "in": "query",
          "schema": {
            "type": "string"
          },
          "description": "The same as `service_ref`."
        },
        {
          "name": "customer_authority_date",
          "in": "query",
          "schema": {
            "type": "string",
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "string",
                "format": "date-time"
              }
            ]
          },
          "description": "(Conditional) The date the Customer certifies to NBN Co that the Customer obtained Customer Authority applicable to the Premises. It must be less than 45 days old. `customerAuthorityDate` is accepted too.\n\nMandatory for Service Transfer queries that specify a `service_ref` value. With it, `supportingProduct` lists the services already at the location.\n\nThe valid formats are:\n a. DateTime stamp in UTC format e.g. yyyy-mm-ddThh:mm:ssZ\n b. DateTime stamp in UTC format with time offset e.g. \"yyyy-mm-ddThh:mm:ss+hh:mm\" or \"yyyy-mm-ddThh:mm:ss-hh:mm\"\n c. Date format e.g. yyyy-mm-dd\n"
        },
        {
          "name": "customerAuthorityDate",
          "in": "query",
          "schema": {
            "type": "string",
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "string",
                "format": "date-time"
              }
            ]
          },
          "description": "The same as `customer_authority_date`."
        },
        {
          "name": "site_restriction",
          "in": "query",
          "schema": {
            "type": "string",
            "enum": [
              "array"
            ]
          },
          "description": "Accepted as Kinetix accepts it, and changes nothing: `siteRestriction` is always a list."
        }
      ],
      "get": {
        "summary": "Site Qualification query for a single NBN Location ID",
        "description": "nbn's own single-site qualification, as Kinetix returns it and without a `result` wrapper. Response can include serviceability status, service class, primary access technology, bandwidth rates, new development charges and more.\n\nNBN error codes surfaced via the 400 response include:\n|Type|Code|Message|\n|---|---|---|\n|TechnicalException|000000|A technical error has occurred during the processing of the request.|\n|ValidationException|001000|The following mandatory field or fields are not provided - %field1%, %field2%, ....|\n|ValidationException|001001|Field length of %fieldName% is invalid, the length provided is %providedLengthOfField% but it should be %acceptedLengthOfField%|\n|ValidationException|001002|Invalid parameter combination- %parameter1% cannot be provided with %parameter2%, ...|\n|ValidationException|001004|Invalid parameter combination: %parameter1% cannot be provided with %parameter2% ...|\n|ValidationException|001005|The following field or fields should not be provided for this operation- %field1%, %field2%, ....|\n|ValidationException|001011|At least one of the following fields must be provided: %field1%, %field2% ....|\n|ValidationException|001012|The value for %field name% = %field value% is in an invalid format.|\n|ValidationException|001013|The value for %fieldname% is outside of the allowable range : %Date Range%|\n|ValidationException|001015|The value of %fieldname% %fieldvalue% is invalid.|\n|ValidationException|001207|Rejected - Invalid request. [%fieldname%]: [%field value%] is invalid.|\n|NotAllowedException|008000|The operation cannot be performed with the specified parameters: %parameter1%, %parameter2%, ....|\n|RecordNotFoundException|011000|No records were found to match the %fieldName% %fieldValue% specified in the request.|\n|InvalidAddressException|012000|There are no matches for the address details provided in the request.|",
        "operationId": "get_single_site",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceQualification"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Service Qualification"
        ]
      }
    },
    "/opticomm/geographicAddress": {
      "get": {
        "summary": "Search Geographic Addresses",
        "description": ">**Required Scope(s):** data:read\n\nSearch the Opticomm property dataset with the upstream npis-address\nparameters — a bare array of the carrier's own `geographicAddress`\ndocuments. Served from Check Networks' daily-imported copy of the\ncarrier feed, so there is no carrier round-trip and no rate concern.\n\nAt least one search parameter is required: the unbounded dataset read\nis upstream's `bulkDownload`, which this API does not expose.\nServiceability truth (service class, offered products) stays with the\nlive single-site qualification read — the dataset's values can lag the\ncarrier by up to a day.\n",
        "operationId": "get_opticomm_geographicAddress",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "lotNumber",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roadNumber1",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roadName",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roadTypeCode",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Full word or abbreviation — Street and ST both match."
          },
          {
            "name": "localityName",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "postcode",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stateTerritoryCode",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "unitNumber",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "latitude",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "longitude",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fullText",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Free-text address search, relevance ranked."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 50,
              "minimum": 1,
              "maximum": 500
            },
            "description": "Limit the number of properties returned, from 1 to 500. A value outside that range is brought into it."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OpticommGeographicAddress"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Opticomm Address"
        ]
      }
    },
    "/opticomm/geographicAddress/{opcId}": {
      "parameters": [
        {
          "name": "opcId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The Opticomm Property ID (OPC #)."
        }
      ],
      "get": {
        "summary": "Return Geographic Address by ID",
        "description": ">**Required Scope(s):** data:read\n\nOne Opticomm property by its OPC # — the carrier's own\n`geographicAddress` document. Unknown and malformed ids both answer\n404.\n",
        "operationId": "get_opticomm_geographicAddress_by_id",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpticommGeographicAddress"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Opticomm Address"
        ]
      }
    },
    "/opticomm/appointments": {
      "get": {
        "summary": "Find Appointments",
        "description": ">**Required Scope(s):** data:read\n\nYour Opticomm appointments, as the carrier's own `Appointment`\ndocuments — a bare array, newest first, served from the held documents\n(no carrier round-trip). Filter by property (`place`), your reference\n(`externalId`), `status` (the carrier's vocabulary, e.g. RESERVED),\nor a slot-start window (`startDateTime`/`endDateTime`).\n",
        "operationId": "get_opticomm_appointments",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "place",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The Opticomm Property ID (OPC #) to filter to."
          },
          {
            "name": "externalId",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Your reference for the appointment."
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "RESERVED",
                "BOOKED",
                "IN PROGRESS",
                "COMPLETED",
                "INCOMPLETE",
                "CANCELLED"
              ]
            }
          },
          {
            "name": "startDateTime",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Only slots starting at or after this instant."
          },
          {
            "name": "endDateTime",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Only slots starting before this instant."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OpticommAppointment"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Opticomm Appointments"
        ]
      },
      "post": {
        "summary": "Create (Reserve) an Appointment",
        "description": ">**Required Scope(s):** data:create\n\nLimit: 30 per minute for the account (carrier write).\n\nReserve a technician slot (upstream `createAppointment`) — the body is\nthe carrier's own `Appointment` create shape. The carrier answers the\nappointment RESERVED with a sunset timer; attach it to a Connect order\nbefore the timer lapses to book it. Answers `200` with the created\ndocument in a single-element array, exactly as upstream.\n\n`externalId` is YOUR reference and is held on the Check Networks side;\nthe carrier-side correlation key is ours. `accessSeekerContact` is\nserver-owned and refused. `Service Restoration` and `Single Truck\nRoll` require the caller to hold a service at the property.\n\nAn account may hold at most **5 open install reservations**\n(`Standard Install` or `Additional Install`, RESERVED, not yet attached\nto an order, timer not lapsed). The next one answers `409`: waiting does\nnot free a place, so attach one to a Connect order or cancel it first. Like every carrier\nwrite, it needs an `Idempotency-Key`.\n",
        "operationId": "post_opticomm_appointments",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:create"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "demandType",
                  "place",
                  "appointmentSlot",
                  "endUserContact"
                ],
                "properties": {
                  "externalId": {
                    "type": "string",
                    "maxLength": 45,
                    "pattern": "^[A-Za-z0-9._-]+$",
                    "description": "Your reference for the appointment."
                  },
                  "demandType": {
                    "type": "string",
                    "enum": [
                      "Standard Install",
                      "Service Restoration",
                      "Additional Install",
                      "Single Truck Roll"
                    ]
                  },
                  "appointmentType": {
                    "type": "string",
                    "enum": [
                      "Appointment"
                    ]
                  },
                  "appointmentSLA": {
                    "type": "string",
                    "enum": [
                      "Standard"
                    ]
                  },
                  "endUserType": {
                    "type": "string",
                    "enum": [
                      "Residential",
                      "Business"
                    ]
                  },
                  "priorityAssist": {
                    "type": "string",
                    "enum": [
                      "Yes",
                      "No"
                    ],
                    "description": "(Optional) Sent to the carrier as its priority assist flag. \"Yes\" is accepted only for a customer on our Priority Assistance register (the end user named in `endUser`, or when none is named the account or your own end user); otherwise the reservation is refused with a 422 on `priorityAssist` before the carrier is asked."
                  },
                  "endUser": {
                    "type": "string",
                    "maxLength": 64,
                    "description": "(Optional) Ours, not the carrier's: the number of the end user the appointment is for, as `POST /data/orders` takes it. With `priorityAssist` \"Yes\" it is that end user's registration that counts; an end user that is not this account's is refused with a 422 on `priorityAssist`. Left out, the account's own registration counts, or the one on your own end user (made when you register yourself); another end user's counts only when named."
                  },
                  "place": {
                    "type": "object",
                    "required": [
                      "id"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "example": "OPC000000010859"
                      }
                    }
                  },
                  "appointmentSlot": {
                    "type": "object",
                    "required": [
                      "validFor"
                    ],
                    "properties": {
                      "appointmentSlotType": {
                        "type": "string",
                        "enum": [
                          "AM",
                          "PM"
                        ]
                      },
                      "validFor": {
                        "type": "object",
                        "description": "The slot as `GET /opticomm/timeSlots` returned it: a date-time with or without an offset, passed to Opticomm as given.",
                        "required": [
                          "startDateTime",
                          "endDateTime"
                        ],
                        "properties": {
                          "startDateTime": {
                            "type": "string",
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$"
                              }
                            ]
                          },
                          "endDateTime": {
                            "type": "string",
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$"
                              }
                            ],
                            "description": "Must be after `startDateTime`."
                          }
                        }
                      }
                    }
                  },
                  "endUserContact": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 2,
                    "items": {
                      "type": "object",
                      "required": [
                        "contactName",
                        "phoneNumber"
                      ],
                      "properties": {
                        "contactName": {
                          "type": "string",
                          "maxLength": 255
                        },
                        "contactType": {
                          "type": "string",
                          "enum": [
                            "Primary Contact",
                            "Secondary Contact"
                          ]
                        },
                        "phoneNumber": {
                          "type": "string",
                          "maxLength": 32
                        },
                        "emailAddress": {
                          "type": "string",
                          "format": "email"
                        },
                        "notes": {
                          "type": "string",
                          "maxLength": 1000
                        }
                      }
                    }
                  },
                  "siteAccess": {
                    "type": "object",
                    "description": "The full upstream site-access block.",
                    "properties": {
                      "accessInstructions": {
                        "type": "string",
                        "maxLength": 2000
                      },
                      "accreditationRequirements": {
                        "type": "string",
                        "maxLength": 2000
                      },
                      "buildingName": {
                        "type": "string",
                        "maxLength": 2000
                      },
                      "buildingType": {
                        "type": "string",
                        "maxLength": 2000
                      },
                      "hazardsInformation": {
                        "type": "string",
                        "maxLength": 2000
                      },
                      "inductionRequirements": {
                        "type": "string",
                        "maxLength": 2000
                      },
                      "notes": {
                        "type": "string",
                        "maxLength": 2000
                      },
                      "operationalHours": {
                        "type": "string",
                        "maxLength": 2000
                      },
                      "siteConsiderations": {
                        "type": "string",
                        "maxLength": 2000
                      },
                      "specialConditions": {
                        "type": "string",
                        "maxLength": 2000
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "Success",
            "description": "The reserved appointment.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OpticommAppointment"
                  }
                }
              }
            }
          },
          "400": {
            "x-summary": "Bad Request",
            "description": "The request was malformed, carried a server-owned field, or the carrier rejected it outright (the carrier's own error object is relayed).",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/OpticommCarrierError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The account already holds 5 open install reservations. Release one first, by attaching it to a Connect order or cancelling it; retrying unchanged gets the same answer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Opticomm Appointments"
        ]
      }
    },
    "/opticomm/appointments/{appointmentId}": {
      "parameters": [
        {
          "name": "appointmentId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The carrier appointment id (OAT #)."
        }
      ],
      "get": {
        "summary": "Return Appointment by ID",
        "description": ">**Required Scope(s):** data:read\n\nOne appointment — the carrier's own `Appointment` document, served\nfrom the held document. Unknown and other accounts' references both\nanswer 404.\n",
        "operationId": "get_opticomm_appointment",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpticommAppointment"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Opticomm Appointments"
        ]
      },
      "patch": {
        "summary": "Update an Appointment",
        "description": ">**Required Scope(s):** data:update\n\nLimit: 30 per minute for the account (carrier write).\n\nReschedule (a new `appointmentSlot` from `/opticomm/timeSlots`),\nreplace `endUserContact`, update `siteAccess`, and/or rename YOUR\n`externalId` (held on the Check Networks side — the carrier-side key\nis ours and never changes). At least one field is required;\n`accessSeekerContact` is server-owned and refused. Answers `200` with\nthe updated document in a single-element array, as upstream.\n",
        "operationId": "patch_opticomm_appointment",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string",
                    "maxLength": 45,
                    "pattern": "^[A-Za-z0-9._-]+$"
                  },
                  "appointmentSlot": {
                    "type": "object",
                    "required": [
                      "validFor"
                    ],
                    "properties": {
                      "appointmentSlotType": {
                        "type": "string",
                        "enum": [
                          "AM",
                          "PM"
                        ]
                      },
                      "validFor": {
                        "type": "object",
                        "required": [
                          "startDateTime",
                          "endDateTime"
                        ],
                        "properties": {
                          "startDateTime": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "endDateTime": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Must be after `startDateTime`."
                          }
                        }
                      }
                    }
                  },
                  "endUserContact": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 2,
                    "items": {
                      "type": "object",
                      "required": [
                        "contactName",
                        "phoneNumber"
                      ],
                      "properties": {
                        "contactName": {
                          "type": "string",
                          "maxLength": 255
                        },
                        "contactType": {
                          "type": "string",
                          "enum": [
                            "Primary Contact",
                            "Secondary Contact"
                          ]
                        },
                        "phoneNumber": {
                          "type": "string",
                          "maxLength": 32
                        },
                        "emailAddress": {
                          "type": "string",
                          "format": "email"
                        },
                        "notes": {
                          "type": "string",
                          "maxLength": 1000
                        }
                      }
                    }
                  },
                  "siteAccess": {
                    "type": "object",
                    "description": "The full upstream site-access block.",
                    "properties": {
                      "accessInstructions": {
                        "type": "string",
                        "maxLength": 2000
                      },
                      "accreditationRequirements": {
                        "type": "string",
                        "maxLength": 2000
                      },
                      "buildingName": {
                        "type": "string",
                        "maxLength": 2000
                      },
                      "buildingType": {
                        "type": "string",
                        "maxLength": 2000
                      },
                      "hazardsInformation": {
                        "type": "string",
                        "maxLength": 2000
                      },
                      "inductionRequirements": {
                        "type": "string",
                        "maxLength": 2000
                      },
                      "notes": {
                        "type": "string",
                        "maxLength": 2000
                      },
                      "operationalHours": {
                        "type": "string",
                        "maxLength": 2000
                      },
                      "siteConsiderations": {
                        "type": "string",
                        "maxLength": 2000
                      },
                      "specialConditions": {
                        "type": "string",
                        "maxLength": 2000
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "Success",
            "description": "The updated appointment.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OpticommAppointment"
                  }
                }
              }
            }
          },
          "400": {
            "x-summary": "Bad Request",
            "description": "The request was malformed, carried a server-owned field, or the carrier rejected it outright (the carrier's own error object is relayed).",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/OpticommCarrierError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Opticomm Appointments"
        ]
      },
      "delete": {
        "summary": "Cancel an Appointment",
        "description": ">**Required Scope(s):** data:delete\n\nLimit: 30 per minute for the account (carrier write).\n\nCancel the appointment (upstream `deleteAppointment`). Answers `200`\nwith the CANCELLED document in a single-element array, as upstream.\n",
        "operationId": "delete_opticomm_appointment",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:delete"
            ]
          }
        ],
        "responses": {
          "200": {
            "x-summary": "Success",
            "description": "The cancelled appointment.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OpticommAppointment"
                  }
                }
              }
            }
          },
          "400": {
            "x-summary": "Bad Request",
            "description": "The carrier rejected the cancellation (the carrier's own error object is relayed).",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/OpticommCarrierError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Opticomm Appointments"
        ]
      }
    },
    "/opticomm/timeSlots": {
      "get": {
        "summary": "Find Available Time Slots",
        "description": ">**Required Scope(s):** data:read\n\nAvailable technician slots at a property within a window — a LIVE\ncarrier read (availability is volatile, so it is never cached), in the\ncarrier's own `SearchTimeSlot` shape. Supply `propertyId`, or\n`appointmentId` to search around an existing appointment (its property\nis used). `Service Restoration` and `Single Truck Roll` searches\nrequire the caller to hold a service at the property.\n",
        "operationId": "get_opticomm_timeSlots",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "propertyId",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The Opticomm Property ID (OPC #). Required unless appointmentId is supplied."
          },
          {
            "name": "appointmentId",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Search around this existing appointment (reschedule)."
          },
          {
            "name": "demandType",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "Standard Install",
                "Service Restoration",
                "Additional Install",
                "Single Truck Roll"
              ]
            }
          },
          {
            "name": "startDateTime",
            "in": "query",
            "required": true,
            "description": "A date-time, with or without an offset (`2026-09-08T00:00:00`, as Opticomm writes the slots it returns), passed to Opticomm as given.",
            "schema": {
              "type": "string",
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$"
                }
              ]
            }
          },
          {
            "name": "endDateTime",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$"
                }
              ]
            },
            "description": "Must be after `startDateTime`, in the same form."
          },
          {
            "name": "appointmentSLA",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "Standard"
              ]
            },
            "description": "Standard is the only SLA the carrier offers over the API."
          },
          {
            "name": "appointmentSlotType",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "AM",
                "PM"
              ]
            }
          },
          {
            "name": "appointmentType",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "Appointment"
              ]
            }
          },
          {
            "name": "endUserType",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "Residential",
                "Business"
              ]
            }
          },
          {
            "name": "priorityAssist",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "Yes",
                "No"
              ]
            },
            "description": "(Optional) \"Yes\" asks the carrier for priority timeslots, as the appointment booking sends it. It is accepted only for a customer on our Priority Assistance register (the end user named in `endUser`, or when none is named the account or your own end user); otherwise the search is refused with a 422 on `priorityAssist`."
          },
          {
            "name": "endUser",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 64
            },
            "description": "(Optional) Ours, not the carrier's: the number of the end user the appointment would be for, as `POST /data/orders` takes it. With `priorityAssist` \"Yes\" it is that end user's registration that counts; an end user that is not this account's is refused with a 422 on `priorityAssist`. Left out, the account's own registration counts, or the one on your own end user (made when you register yourself); another end user's counts only when named."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OpticommSearchTimeSlot"
                  }
                }
              }
            }
          },
          "400": {
            "x-summary": "Bad Request",
            "description": "The request was malformed, or the carrier rejected the search parameters (the carrier's own error object is relayed).",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/OpticommCarrierError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Opticomm Appointments"
        ]
      }
    },
    "/opticomm/serviceTest": {
      "post": {
        "summary": "Request a Service Test",
        "description": ">**Required Scope(s):** data:update\n\nLimit: 30 per minute for the account (carrier write).\n\nRequest a diagnostic test — the upstream npis-diagnostics surface's\nonly operation, with its own body shape: name the service\n(`serviceRef.id`, the OAC #) and the test template\n(`testSpecificationRef.id`, from the service's\n`/opticomm/diagnostics/service/{serviceRef}/test_types` catalogue).\nAnswers the carrier-style acknowledgement; upstream has no result\nread — progress and results arrive by callback onto\n`/opticomm/diagnostics/{testRef}`. A webhook subscribed to\n`diagnostic.completed` is told once the test finishes, with its result.\n\nA test the service's delivery layer cannot run (the RADIUS-side tests\non a service where Check Networks provides the Layer 3) is refused\nsynchronously rather than failing later by callback. `externalId` is\nYOUR reference and is held on the Check Networks side.\n",
        "operationId": "post_opticomm_serviceTest",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "serviceRef",
                  "testSpecificationRef"
                ],
                "properties": {
                  "serviceRef": {
                    "type": "object",
                    "required": [
                      "id"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "example": "OAC000000250963"
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "OAC"
                        ]
                      }
                    }
                  },
                  "testSpecificationRef": {
                    "type": "object",
                    "required": [
                      "id"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "example": "OST000000001001"
                      },
                      "version": {
                        "type": "string"
                      }
                    }
                  },
                  "externalId": {
                    "type": "string",
                    "maxLength": 45,
                    "pattern": "^[A-Za-z0-9._-]+$",
                    "description": "Your reference for the test."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "Success",
            "description": "The test is acknowledged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpticommServiceTestAck"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Opticomm Diagnostics"
        ]
      }
    },
    "/opticomm/diagnostics/service/{serviceRef}": {
      "parameters": [
        {
          "name": "serviceRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The service's access-circuit id (OAC #)."
        }
      ],
      "get": {
        "summary": "List Recent Service Tests",
        "description": ">**Required Scope(s):** data:read\n\nThe service's recent diagnostic tests, newest first — a Check\nNetworks extension (upstream has no read; results arrive only by\ncallback). Each entry wraps the carrier's own `ServiceTest` document\nfrom the latest callback.\n",
        "operationId": "get_opticomm_diagnostics_for_service",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OpticommDiagnosticTest"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Opticomm Diagnostics"
        ]
      }
    },
    "/opticomm/diagnostics/service/{serviceRef}/test_types": {
      "parameters": [
        {
          "name": "serviceRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The service's access-circuit id (OAC #)."
        }
      ],
      "get": {
        "summary": "List Eligible Test Templates for a Service",
        "description": ">**Required Scope(s):** data:read\n\nThe NPIS diagnostic test catalogue (`testSpecificationRef` templates)\neligible for the service. The RADIUS-side templates (Auth / Session\nHistory) only appear where Opticomm provides the Layer 3 — on a\nservice where Check Networks terminates the Layer 3 the session lives\non our BNG, not the carrier's.\n",
        "operationId": "get_opticomm_diagnostics_test_types",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OpticommTestSpecification"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Opticomm Diagnostics"
        ]
      }
    },
    "/opticomm/diagnostics/{testRef}": {
      "parameters": [
        {
          "name": "testRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The carrier test reference (OTR #)."
        }
      ],
      "get": {
        "summary": "Return a Service Test",
        "description": ">**Required Scope(s):** data:read\n\nOne diagnostic test — a Check Networks extension wrapping the\ncarrier's own `ServiceTest` document from the latest callback.\nUnknown and other accounts' references both answer 404.\n",
        "operationId": "get_opticomm_diagnostics_test",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpticommDiagnosticTest"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Opticomm Diagnostics"
        ]
      }
    },
    "/opticomm/productOrders": {
      "get": {
        "summary": "Retrieve Product Orders",
        "description": ">**Required Scope(s):** data:read\n\nYour Opticomm product orders, as the carrier's own `ProductOrder`\ndocuments — a bare array, most recent first, mirroring the upstream\nnpis-product-order surface. Filter by your reference (`externalId`)\nor bound the order date with `start` / `end`.\n",
        "operationId": "get_opticomm_product_orders_list",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "externalId",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 45
            },
            "description": "Your reference supplied when the order was created."
          },
          {
            "name": "start",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Only orders created on or after this date."
          },
          {
            "name": "end",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Only orders created on or before this date."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OpticommProductOrder"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Opticomm Orders"
        ]
      },
      "post": {
        "summary": "Create Product Order",
        "description": ">**Required Scope(s):** data:create (a Modify also requires data:update, a Disconnect data:delete)\n\nLimit: 30 per minute for the account (carrier write).\n\nSubmit an order of type Connect, Modify or Disconnect — one endpoint,\nthe carrier's own semantics. Use the Service Qualification read first:\nit confirms serviceability, whether an installation appointment is\nrequired, and which Bandwidth Products (and NTD ports) are selectable.\nA live qualification also runs at submission and refuses an order the\ncarrier would reject.\n\nA Disconnect of a service still in its contract term is charged early\ntermination. To see what before you place it, GET\n/data/services/{ref}/disconnect-quote.\n\nReturns `200` with the carrier's accepted `ProductOrder`, as upstream\ndoes. A carrier rejection is relayed as the carrier's own error object\nat the carrier's status code.\n",
        "operationId": "post_opticomm_product_order",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:create"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpticommProductOrderCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "Success",
            "description": "The carrier accepted the order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpticommProductOrder"
                }
              }
            }
          },
          "400": {
            "x-summary": "Bad Request",
            "description": "The request was malformed, carried a field Check Networks sets itself, or the carrier rejected it outright (the carrier's own error object is relayed).",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/OpticommCarrierError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "x-summary": "Unprocessable Entity",
            "description": "The order cannot be placed — the carrier rejected it (their error object is relayed), or the service cannot take this order type.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/OpticommCarrierError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Opticomm Orders"
        ]
      }
    },
    "/opticomm/productOrders/{orderId}": {
      "parameters": [
        {
          "name": "orderId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The Opticomm Order ID (OPO #)."
        }
      ],
      "get": {
        "summary": "Retrieve Product Order",
        "description": ">**Required Scope(s):** data:read\n\nOne product order by its Opticomm Order ID — the carrier's own\n`ProductOrder` document, kept current from the carrier's order\nlifecycle notifications.\n",
        "operationId": "get_opticomm_product_order",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpticommProductOrder"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Opticomm Orders"
        ]
      },
      "patch": {
        "summary": "Update Product Order",
        "description": ">**Required Scope(s):** data:update\n\nLimit: 30 per minute for the account (carrier write).\n\nAmend an in-flight order, with the carrier's own PATCH semantics:\nattach a reserved `appointment`, add a `note`, answer a carrier\naction with a `reasonCode` (resume-info / action-completed), or move\nthe `plannedCompletionDate`. `externalId` renames YOUR reference on\nthe Check Networks side only — the carrier-side reference is Check\nNetworks' own and never changes.\n",
        "operationId": "patch_opticomm_product_order",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "At least one amendment key is required.",
                "properties": {
                  "appointment": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      }
                    }
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 4000
                  },
                  "reasonCode": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "example": "IP0015"
                      },
                      "reason": {
                        "type": "string"
                      }
                    }
                  },
                  "plannedCompletionDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "externalId": {
                    "type": "string",
                    "maxLength": 45,
                    "pattern": "^[A-Za-z0-9._-]+$"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation — the amended order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpticommProductOrder"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "The carrier refused the amendment.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/OpticommCarrierError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Opticomm Orders"
        ]
      },
      "delete": {
        "summary": "Cancel Product Order",
        "description": ">**Required Scope(s):** data:delete\n\nLimit: 30 per minute for the account (carrier write).\n\nCancel an in-flight order. Returns `200` with the cancelled\n`ProductOrder`, as upstream does; `422` once the order has passed the\npoint of no return. To cease an ACTIVE service, submit a Disconnect\norder instead.\n",
        "operationId": "delete_opticomm_product_order",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:delete"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation — the cancelled order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpticommProductOrder"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "The order can no longer be cancelled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Opticomm Orders"
        ]
      }
    },
    "/opticomm/outage/change-request/{ocrId}": {
      "parameters": [
        {
          "name": "ocrId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The change request reference (OCR #)."
        }
      ],
      "get": {
        "summary": "Return Planned Outage (Change Request) Details",
        "description": ">**Required Scope(s):** data:read\n\nDetail for a planned outage — a LIVE carrier read, upstream's\n`ChangeRequest` document verbatim. Returned only when the outage\naffects one of your services; its `oacIds` name only your own. An\noutage touching none of your services answers 404, indistinguishable\nfrom an unknown reference.\n",
        "operationId": "get_opticomm_outage_change_request",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpticommChangeRequest"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Opticomm Network Outage"
        ]
      }
    },
    "/opticomm/outage/trouble-ticket/{ottId}": {
      "parameters": [
        {
          "name": "ottId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The trouble ticket reference (OTT #)."
        }
      ],
      "get": {
        "summary": "Return Unplanned Outage (Trouble Ticket) Details",
        "description": ">**Required Scope(s):** data:read\n\nDetail for an unplanned outage — a LIVE carrier read, upstream's\n`TroubleTicket` document verbatim; `?extended=true` answers the fuller\nrecord (condition, reason, estimated restoration, comments), as\nupstream. Returned only when the outage affects one of your services;\nits `oacIds` name only your own, and comment authors are omitted.\n",
        "operationId": "get_opticomm_outage_trouble_ticket",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "extended",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Return the extended record."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpticommTroubleTicket"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Opticomm Network Outage"
        ]
      }
    },
    "/opticomm/outage/{oacId}": {
      "parameters": [
        {
          "name": "oacId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "One of your services' access-circuit ids (OAC #)."
        }
      ],
      "get": {
        "summary": "Return Outage Position for a Service",
        "description": ">**Required Scope(s):** data:read\n\nThe outage position for one of your services — a LIVE carrier read\n(there is no callback feed for positions). Answers upstream's\n`NoOutage`, `CurrentOutage` or `FutureOutage` body verbatim; the id\narrays name planned (OCR) and unplanned (OTT) outages readable at\ntheir own endpoints. An OAC you do not hold answers 404.\n",
        "operationId": "get_opticomm_outage_position",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpticommOutagePosition"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Opticomm Network Outage"
        ]
      }
    },
    "/opticomm/product": {
      "get": {
        "summary": "Find Services",
        "description": ">**Required Scope(s):** data:read\n\nYour Opticomm services, as the carrier's own `Product` documents — a\nbare array, mirroring the upstream npis-product-inventory surface.\nFilter by property (`place`, the OPC #), your reference (`name`) or\nproduct class (`category`, matched against the document's `@type`).\n\n`legacyName` is not supported — Check Networks holds no legacy names —\nand is refused rather than silently ignored.\n",
        "operationId": "get_opticomm_products",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "place",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 32
            },
            "description": "The Opticomm Property ID (OPC #) to filter to."
          },
          {
            "name": "name",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 45
            },
            "description": "Your reference for the service."
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 32
            },
            "description": "The product class, e.g. FTTP."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OpticommProduct"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Opticomm Product Inventory"
        ]
      }
    },
    "/opticomm/product/static_ip/{productId}": {
      "parameters": [
        {
          "name": "productId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The Product Instance (OPI #)."
        }
      ],
      "get": {
        "summary": "Add or Remove Layer 3 Service Static IP",
        "description": ">**Required Scope(s):** data:update\n\nLimit: 30 per minute for the account (carrier write).\n\nToggle the static-IP add-on on a Layer 3 service at the carrier — the\nupstream surface's own (state-changing) GET, relayed. Answers `200`\nwith no body, as the carrier does; the applied policy shows on the\nservice document at `/opticomm/product/{productId}` once the carrier\nconfirms it.\n\nIt changes the service, so it is a write: a suspended account is\nrefused with `403` `account_suspended`, as on any other write.\n",
        "operationId": "get_opticomm_product_static_ip",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation (no body)."
          },
          "400": {
            "x-summary": "Bad Request",
            "description": "The carrier rejected the action outright (the carrier's own error object is relayed with the carrier's status code) — e.g. the service holds no Layer 3 profile — or our own check refused the request, such as a missing `Idempotency-Key`, in the standard `Error` envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/OpticommCarrierError"
                    },
                    {
                      "$ref": "#/components/schemas/Error"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Opticomm Product Inventory"
        ]
      }
    },
    "/opticomm/product/update/{productId}": {
      "parameters": [
        {
          "name": "productId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The Product Instance (OPI #)."
        }
      ],
      "post": {
        "summary": "Change the ID of a Service",
        "description": ">**Required Scope(s):** data:update\n\nRename YOUR reference for the service. The change applies on the Check\nNetworks side only — the carrier-side name is Check Networks' own\nreference and never changes. Returns the updated document, as the\nupstream operation does.\n",
        "operationId": "post_opticomm_product_update",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "externalId"
                ],
                "properties": {
                  "externalId": {
                    "type": "string",
                    "maxLength": 45,
                    "pattern": "^[A-Za-z0-9._-]+$",
                    "description": "Your new reference for the service.",
                    "example": "PO-2026-04821"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation — the updated document.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OpticommProduct"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Opticomm Product Inventory"
        ]
      }
    },
    "/opticomm/product/{productId}": {
      "parameters": [
        {
          "name": "productId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The Product Instance (OPI #)."
        }
      ],
      "get": {
        "summary": "Return Service by Product Instance",
        "description": ">**Required Scope(s):** data:read\n\nOne service by its Product Instance (OPI #) — the carrier's own\n`Product` document, kept current from the carrier's inventory\nnotifications and policy actions.\n",
        "operationId": "get_opticomm_product",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpticommProduct"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Opticomm Product Inventory"
        ]
      }
    },
    "/opticomm/provisioning/layer2/destinations": {
      "get": {
        "summary": "List Layer 2 Link Destinations",
        "description": ">**Required Scope(s):** data:read\n\nThe active Layer 2 link destinations available to your account for Opticomm\nservices — the outer VLANs (S-Tags) on your customer interconnects, where a\nLayer 2 service can be handed off to you. Use an `interconnectRef` from\nhere as the `destination` when provisioning a Layer 2 order.\n\nA single-tag interconnect carries all your services on one outer VLAN\nacross every POI and carrier; it is presented under the reserved POI code\n`0NAT` and appears here as well as under nbn™.\n\nThis is the carrier-scoped view of `GET /data/layer2/destinations`, which\nreturns the same destinations across every carrier at once. New\nintegrations should prefer that one.\n",
        "operationId": "get_opticomm_provisioning_layer2_destinations",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "results"
                  ],
                  "properties": {
                    "results": {
                      "type": "array",
                      "description": "The active Layer 2 link destinations available to you.",
                      "items": {
                        "$ref": "#/components/schemas/Layer2Destination"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Opticomm Provisioning"
        ]
      }
    },
    "/opticomm/provisioning/order": {
      "post": {
        "summary": "Provision an Opticomm Service",
        "description": ">**Required Scope(s):** data:create\n\nProvisions a Connect Order as a service on the Check Networks network —\nits authentication identity, addressing, VLAN tags and edge configuration.\n\nThis is a separate step from ordering the tail. The Product Order API\n(`POST /opticomm/productOrders`, orderType Connect) orders the access\nservice from Opticomm; this builds the service on our side and links it\nto that order.\n\n**A service is not built until you ask.** Completing at the carrier does\nnot provision anything by itself — if this is never called for an order,\nthe service never goes live. You may call it at any point after the order\nis placed: ask before the carrier has finished and the service is built as\nsoon as it delivers; ask afterwards and it is built immediately.\n\nThe same endpoint serves both delivery modes — supply `destination` for a\nLayer 2 handoff, or the Layer 3 fields (`fixedIp`, `ipv6Method`,\n`protocol`) for a Layer 3 service. Do not mix the two.\n\nYour settings can be changed by calling this again, up until the service\nis built. After that, changes require a Modify Order.\n\nIf the order is later rejected or cancelled by the carrier, the\nprovisioning request is cancelled with it.\n",
        "operationId": "post_opticomm_provision_order",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:create"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "orderRef"
                ],
                "properties": {
                  "orderRef": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "The Check Networks Reference ID of the Opticomm Connect Order to be provisioned.\nOrders that are marked \"Rejected\" will have any provisioning requests rejected too."
                  },
                  "fixedIp": {
                    "type": "boolean",
                    "default": false,
                    "description": "(Optional) Assign a Fixed IPv4 address to a Layer 3 Service.\nNOTE: Fees and charges may apply - refer to your Agreement for details.\nLeave empty to have Check Networks assign a Dynamic address instead.\nDo not specify this field for a Layer 2 Order.\n"
                  },
                  "ipv6Method": {
                    "type": "string",
                    "enum": [
                      "Disabled",
                      "DHCPv6"
                    ],
                    "description": "(Optional) Enable IPv6 for a Layer 3 service.\nLeft unspecified, IPv6 is enabled.\nNOTES:\n - There is no charge for enabling IPv6 for a service.\n - Can be applied whether `fixedIp` is specified or not.\n - The End User's CPE may need configuring to enable IPv6.\n - You can safely assign IPv6 to services without IPv6 support.\n - IPv6 Addresses and Prefixes will be assigned at processing.\n - Do not specify this field for a Layer 2 Order.\n\nOPTIONS:\n - 'Disabled' - Do not enable IPv6 for this service.\n - 'DHCPv6' - Enable IPv6 via DHCPv6 with Prefix Delegation.\n"
                  },
                  "protocol": {
                    "type": "string",
                    "enum": [
                      "IPoE",
                      "PPPoE"
                    ],
                    "description": "(Optional) The protocol used to connect and authenticate the Layer 3 service within RADIUS.\nThe default \"IPoE\" is preferred.  If using \"PPPoE\" you must provide the EXACT username and password configured on the end-user's device.\nPPPoE requires a realm on your account. Contact support if you do not have one.\nDo not specify this field for a Layer 2 Order.\n"
                  },
                  "username": {
                    "type": "string",
                    "maxLength": 32,
                    "pattern": "^[A-Za-z0-9._-]+$",
                    "description": "(Optional) - For `protocol` = \"PPPoE\" only.\nThe PPPoE Username the user will authenticate with, without a realm —\nyour realm is appended for you.\nLeave it out and a username is generated with the service.\nDo not specify this field for a Layer 2 Order.\n"
                  },
                  "password": {
                    "type": "string",
                    "format": "password",
                    "minLength": 8,
                    "maxLength": 64,
                    "description": "(Optional) - For `protocol` = \"PPPoE\" only.\nThe PPPoE Password the user will authenticate with.\nLeave it out and a password is generated with the service.\nDo not specify this field for a Layer 2 Order.\n"
                  },
                  "destination": {
                    "type": "string",
                    "format": "uuid",
                    "description": "(Conditional) - Required for Layer 2 Orders.\nThe Peer NNI to use as the \"Destination\" of the Layer 2 link for this Service, where its traffic will be handed over to you.\nUse the Layer 2 Destinations API (`GET /opticomm/provisioning/layer2/destinations`) for allowed values.\nDo not specify this field for a Layer 3 Order.\n"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ProvisioningResponse"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Opticomm Provisioning"
        ]
      }
    },
    "/opticomm/serviceHealth": {
      "post": {
        "summary": "Request a Service Health Report",
        "description": ">**Required Scope(s):** data:update\n\nLimit: 30 per minute for the account (carrier write).\n\nAsk the carrier to produce a fresh health report for a service — the\nupstream npis-service-health surface's only operation, with its own\nbody (`oacId` + the fixed `specificationType`). Answers `202` with\nthe carrier-style acknowledgement; upstream has no report read — the\nRAG report arrives by callback onto\n`/opticomm/service_health/{hrId}` and the service's reads. A webhook\nsubscribed to `serviceHealth.reportReady` is told once it has landed.\n\n`externalId` is YOUR reference and is held on the Check Networks\nside.\n",
        "operationId": "post_opticomm_serviceHealth",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "oacId"
                ],
                "properties": {
                  "oacId": {
                    "type": "string",
                    "example": "OAC000000250963"
                  },
                  "specificationType": {
                    "type": "string",
                    "enum": [
                      "Service Health Template"
                    ]
                  },
                  "externalId": {
                    "type": "string",
                    "maxLength": 45,
                    "pattern": "^[A-Za-z0-9._-]+$",
                    "description": "Your reference for the request."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted — the report is being produced.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpticommServiceHealthAck"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Opticomm Service Health"
        ]
      }
    },
    "/opticomm/service_health/service/{serviceRef}": {
      "parameters": [
        {
          "name": "serviceRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The service's access-circuit id (OAC #)."
        }
      ],
      "get": {
        "summary": "List Health Requests for a Service",
        "description": ">**Required Scope(s):** data:read\n\nThe service's health requests, newest first — a Check Networks\nextension (upstream has no read; reports arrive only by callback).\nEach entry wraps the carrier's own report from the latest callback.\n\nThe body is a bare array, as upstream's reads are, so the page is given\nin headers: `X-Total-Count`, `X-Page` and `X-Per-Page`.\n",
        "operationId": "get_opticomm_service_health_for_service",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "headers": {
              "X-Total-Count": {
                "description": "Health requests for the service, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page returned.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "The number of entries per page.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OpticommServiceHealth"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Opticomm Service Health"
        ]
      }
    },
    "/opticomm/service_health/service/{serviceRef}/latest": {
      "parameters": [
        {
          "name": "serviceRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The service's access-circuit id (OAC #)."
        }
      ],
      "get": {
        "summary": "Return the Latest Health Request for a Service",
        "description": ">**Required Scope(s):** data:read\n\nThe service's most recent health request, wrapping the carrier's own\nreport from the latest callback. 404 when no health checks have been\nrun for the service.\n",
        "operationId": "get_opticomm_service_health_latest",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpticommServiceHealth"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Opticomm Service Health"
        ]
      }
    },
    "/opticomm/service_health/{hrId}": {
      "parameters": [
        {
          "name": "hrId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The health report reference (OHR #)."
        }
      ],
      "get": {
        "summary": "Return a Health Report",
        "description": ">**Required Scope(s):** data:read\n\nOne health request/report — a Check Networks extension wrapping the\ncarrier's own report from the latest callback. Unknown and other\naccounts' references both answer 404.\n",
        "operationId": "get_opticomm_service_health_report",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpticommServiceHealth"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Opticomm Service Health"
        ]
      }
    },
    "/opticomm/singleSiteQualification/{opcId}": {
      "parameters": [
        {
          "name": "opcId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The Opticomm Property ID (OPC #) to qualify."
        }
      ],
      "get": {
        "summary": "Single Site Qualification",
        "description": ">**Required Scope(s):** data:read\n\nQualifies an Opticomm property for service — the carrier's own\n`SiteQualification` document: serviceability status and class, access\ntechnology, NTD and port inventory, applicable charges, and (with\n`productAvailability=true`) the bandwidth products offered at the\npremises.\n\nServed from Check Networks' qualification cache, fresh until 01:00\nSydney the next day. A request carrying `customerAuthorityDate` (a\ntransfer qualification — the carrier's answer depends on it) is always\nanswered live and never served from, or written over, the cache.\n",
        "operationId": "get_opticomm_singleSiteQualification",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "customerAuthorityDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "(Conditional) The date Customer Authority was obtained from the end user. Supply when qualifying for a Service Transfer; must be less than 45 days old."
          },
          {
            "name": "productAvailability",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Display the products available at this property. Absent behaves as false, as upstream."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpticommSiteQualification"
                }
              }
            }
          },
          "400": {
            "x-summary": "Bad Request",
            "description": "The request was malformed, or the carrier rejected the qualification parameters (the carrier's own error object is relayed).",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/OpticommCarrierError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Opticomm Service Qualification"
        ]
      }
    },
    "/numbers": {
      "get": {
        "tags": [
          "Numbers"
        ],
        "summary": "List Phone Numbers",
        "operationId": "list_numbers",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nReturns a paginated list of all DID (Direct Inward Dialing) phone numbers assigned to your account,\nin number order. The filters below narrow it and combine; they match the same numbers as the\nportal's Numbers page. Filter by `endUser` for the numbers one end user holds.\n\nFor the whole list, set `format=csv` or `format=ndjson` to stream **every** match in one response,\nignoring `page` and `perPage`. `csv` returns `text/csv` (a header row and one row per number, the\ncolumns of a `results[]` item, with `routing` and `ipnd` as JSON); `ndjson` returns\n`application/x-ndjson` (one `results[]` item per line).\n",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Part of a number or of its description. A national number matches too: `07` finds numbers stored as `617`.",
            "schema": {
              "type": "string",
              "maxLength": 100,
              "example": "0755512"
            }
          },
          {
            "$ref": "#/components/parameters/ExternalRef"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "The number type.",
            "schema": {
              "type": "string",
              "enum": [
                "fixed",
                "mobile",
                "local_rate_1300",
                "toll_free_1800",
                "thirteen",
                "premium",
                "nz_geographic",
                "nz_0800"
              ]
            }
          },
          {
            "name": "szu",
            "in": "query",
            "required": false,
            "description": "The standard zone unit (SZU) of the number's block, by name.",
            "schema": {
              "type": "string",
              "example": "Brisbane"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "suspended",
                "releasing",
                "cancelled"
              ]
            }
          },
          {
            "name": "trunk",
            "in": "query",
            "required": false,
            "description": "Only the numbers on this trunk, by its `sipUsername`. A trunk that is not yours is a 422.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "routeType",
            "in": "query",
            "required": false,
            "description": "Only the numbers whose first route is of this type.",
            "schema": {
              "type": "string",
              "enum": [
                "trunk",
                "redirect",
                "sip_address",
                "fax2email",
                "disconnected",
                "time_of_day",
                "geographic",
                "route_to_server"
              ]
            }
          },
          {
            "name": "assigned",
            "in": "query",
            "required": false,
            "description": "`false` for the numbers on no trunk; `true` for those on one.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "hasEmergencyAddress",
            "in": "query",
            "required": false,
            "description": "`false` for the numbers with no emergency address linked; `true` for those with one.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "Omit for paged JSON; `csv` or `ndjson` streams every match.",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "ndjson"
              ]
            }
          },
          {
            "name": "endUser",
            "in": "query",
            "required": false,
            "description": "Only the numbers this end user holds, by its public number: those tagged to it, and untagged ones on its trunks. A number that is not one of your end users is a 422, not an empty list. With `needsAttention`, it narrows the group to that end user.",
            "schema": {
              "type": "string",
              "maxLength": 64,
              "example": "100042"
            }
          },
          {
            "name": "needsAttention",
            "in": "query",
            "required": false,
            "description": "Only the numbers in this needs-attention group, exactly as `GET /account/summary` counted them. With it, `endUser` (an end user's number) narrows the group to that end user.",
            "schema": {
              "type": "string",
              "enum": [
                "numberMissingFromIpnd",
                "numberReleaseDeclined"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Order by this field, `-` in front for descending. An unknown field is `422`.",
            "schema": {
              "type": "string",
              "enum": [
                "number",
                "-number",
                "createdAt",
                "-createdAt"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/UpdatedSince"
          },
          {
            "$ref": "#/components/parameters/CreatedFrom"
          },
          {
            "$ref": "#/components/parameters/CreatedTo"
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A paginated JSON object containing an array of phone numbers.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer",
                      "description": "Total number of phone numbers matching the query."
                    },
                    "page": {
                      "type": "integer",
                      "description": "The current page number."
                    },
                    "perPage": {
                      "type": "integer",
                      "description": "The number of records returned per page."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DidNumber"
                      }
                    }
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string",
                  "description": "Present only when `format=csv`. Every matching number as CSV: a header row, then one row per number with the columns of a `results[]` item.\n"
                }
              },
              "application/x-ndjson": {
                "schema": {
                  "type": "string",
                  "description": "Present only when `format=ndjson`. Every matching number as newline-delimited JSON, one `results[]` item per line.\n"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Numbers"
        ],
        "summary": "Order a Number",
        "operationId": "order_number",
        "security": [
          {
            "OAuth2": [
              "voice:create"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:create\n\nLimit: 30 per minute for the account (carrier write).\n\nOrder a number, or a block of 10 or 100, as the portal's Order Numbers page\ndoes. Say the type and, for a geographic number, the area (`szu`, from\n`GET /numbers/areas`), and where it goes: a trunk and the emergency\naddress it is listed at, or `spare: true` to keep it on no service, routed\nto Disconnected until you route it.\n\nWhich number: a `holdId` from `POST /numbers/holds` orders the number you\nheld; an `offerId` from `GET /numbers/available` orders a number our\nsupplier offered, which is bought now; neither takes the next number (or\nthe first complete block) we hold. If an order buys a supplier number and\nthen cannot be placed (say, the trunk's account is on credit hold), the\n`422` carries `error.holdId` and `error.heldUntil`: fix the cause and order\nagain with that `holdId`, and the number you bought is used, not bought\nagain.\n\nWith `bundle`, the order is recorded as a `draft` in that bundle and\nnothing is allocated until the bundle is released. A bundle that has been\nsubmitted takes nothing more, and a bundle's numbers are always ones we\nhold, on a trunk.\n\nThe order is set up in the background: the answer is `202` with the order\nand a `Location` to read it from. Poll it until it is `completed` or\n`failed`. The `Idempotency-Key` is required, so a retry never orders twice.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "fixed",
                      "mobile",
                      "local_rate_1300",
                      "toll_free_1800",
                      "nz_geographic",
                      "nz_0800"
                    ],
                    "description": "The number type: an Australian geographic, mobile, 1300 or 1800 number, or a New Zealand geographic or 0800 number. 13 and premium numbers are by request through your account manager."
                  },
                  "szu": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "The numbering area, required for `fixed` and `nz_geographic`.",
                    "example": "Brisbane"
                  },
                  "blockSize": {
                    "type": "integer",
                    "enum": [
                      1,
                      10,
                      100
                    ],
                    "default": 1,
                    "description": "Consecutive numbers to order. Blocks are for geographic types only."
                  },
                  "holdId": {
                    "type": "string",
                    "description": "A hold from `POST /numbers/holds`, for a single number, or the `error.holdId` of an order that bought a supplier number but could not be placed, for the same area and block size. A hold that has run out answers `422` with the code `hold_expired`."
                  },
                  "offerId": {
                    "type": "string",
                    "description": "A `supplier` offer from `GET /numbers/available` for the same area and block size. Not with `holdId`, and not in a bundle."
                  },
                  "spare": {
                    "type": "boolean",
                    "default": false,
                    "description": "Keep the numbers on no service, routed to Disconnected. Leave `trunk`, `emergencyAddressId` and `routeType` out. Not in a bundle."
                  },
                  "trunk": {
                    "type": "string",
                    "description": "The `sipUsername` of the trunk the numbers go on. Required unless `spare`. In a `bundle`, the `id` of a trunk drafted in the same bundle puts them on that trunk once it is set up: they always start after it.",
                    "example": "acme-main"
                  },
                  "emergencyAddressId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The emergency address the numbers are listed at. Required unless `spare`."
                  },
                  "routeType": {
                    "type": "string",
                    "enum": [
                      "trunk",
                      "redirect",
                      "sip_address"
                    ],
                    "default": "trunk",
                    "description": "Where calls go: the trunk, forwarded to a number (`redirect`), or a SIP address (`sip_address`). Time of day, geographic routes and failovers are set on the number once it is live. A Res Line always has a number that rings it, so its first number must be `trunk`: `redirect` or `sip_address` on a line with no number ringing it, and none on order to, is a `422`."
                  },
                  "routeTarget": {
                    "type": "string",
                    "description": "The forward number, or a `sip:`/`sips:` URI that is not a private address. A forward to 000, 112 or 106, in any form, is a `422`, \"Calls can’t be diverted to an emergency number (000, 112 or 106).\""
                  },
                  "bundle": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The bundle to add the order to."
                  },
                  "externalRef": {
                    "$ref": "#/components/schemas/ExternalRef",
                    "description": "Your own reference for the number, set on it once it is allocated. A reference names one number, so a block (a `blockSize` above 1) is a 422 with one: give a block metadata only. One another number holds, or another open order holds for its number, is a 422 before anything is ordered."
                  },
                  "metadata": {
                    "$ref": "#/components/schemas/MetadataInput",
                    "description": "Your own metadata, set on each number the order allocates."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "x-summary": "Accepted",
            "description": "The order is recorded. Read it at `Location` to see it set up.",
            "headers": {
              "Location": {
                "description": "Where to read the order.",
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/NumberOrder"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/numbers/{number}": {
      "parameters": [
        {
          "name": "number",
          "in": "path",
          "required": true,
          "description": "The E.164 phone number (e.g. `61299999999`).",
          "schema": {
            "type": "string"
          },
          "example": "61299999999"
        }
      ],
      "get": {
        "tags": [
          "Numbers"
        ],
        "summary": "Get Phone Number",
        "operationId": "get_number",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nReturns the full details for a single DID phone number on your account.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A JSON object containing the phone number details.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/DidNumber"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "Numbers"
        ],
        "summary": "Update Phone Number",
        "operationId": "update_number",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:update\n\nUpdate the label, inbound routing and/or emergency address for a DID phone number on your account.\n\nYou may update any combination of the fields below. Fields not included in the request body are left unchanged:\na request with only `description` leaves the routing as it is. Every field is checked before any is applied,\nso a `422` means nothing changed.\n\n**One route.** `routeType` and `routeTarget` set a single route. `routeTarget` is interpreted per `routeType`:\n  - `trunk` — the target trunk's `sipUsername` (as returned by `GET /trunks`).\n  - `redirect` — the destination phone number.\n  - `sip_address` — a SIP URI (`sip:user@host`). Private/reserved hosts are rejected.\n  - `fax2email` — the destination email address. Only a number on one of your fax plans (`faxEnabled`) can be\n    routed here; any other answers `422` on `routeType`.\n  - `disconnected` — no target; `disconnectResponse` says what the caller hears (`hangup` when omitted).\n\nA single route replaces the number's whole chain. When the number has more than one route (`hasAdvancedRouting`:\na failover, time-of-day or geographic routing), `routeType` answers `409` and changes nothing, unless you also send\n`replaceRouting: true`.\n\n**The whole chain.** `routing` sets every route at once: a first route, up to three failovers, time-of-day windows\nand geographic rules, each step checked by the same rules as the portal. Read `routing` from `GET`, change it and\nsend it back. `routing` cannot be sent with `routeType`.\n\n**Emergency address.** On a spare number the new address applies at once. On a number in use it goes to the\nIPND record shortly after the call: the response shows `emergencyAddressChange` with `status: pending`, and\n`emergencyAddressId` keeps the old address until the change is done; `GET /numbers/{number}` then shows the new one.\n\n**SMS delivery.** `smsDelivery` sets where a mobile number's inbound SMS are delivered (a\n`422` on any other number), with the portal's rules:\n  - A field left out of `smsDelivery` keeps what is stored; `method: null`\n    turns forwarding off (messages are still received and stored).\n  - `webhook` needs a public HTTPS `destination`; a private or reserved\n    address is refused. `email` needs a valid email address.\n  - Every webhook request is signed (see the `SmsDelivery` schema). For\n    `yeastar`, send the `secret` set on the PBX; it is required while none\n    is stored. For `generic` and `3cx`, leave `secret` out and one is\n    generated: it is returned once, as `smsDelivery.secret` in this answer.\n    A blank `secret` keeps the stored one; switching to `email` or off\n    removes it. `secret` is write-only and never returned on a read.\n\n**A Res Line always has a number.** A route that takes away the last number ringing a Res Line answers `409`\n`res_line_needs_number` and changes nothing; `error.resLines` names each line. Send the request again with\n`resLineResolutions`, a choice for each line: give it a new number, move another of your numbers to it, suspend\nit or cancel it. The route and the choices are made together.\n",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "externalRef": {
                    "$ref": "#/components/schemas/ExternalRef"
                  },
                  "metadata": {
                    "$ref": "#/components/schemas/MetadataInput"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 80,
                    "description": "A label or description for this number, up to 80 characters. Null or empty clears it."
                  },
                  "routeType": {
                    "type": "string",
                    "description": "How incoming calls to this number should be routed, as one route.",
                    "enum": [
                      "trunk",
                      "redirect",
                      "sip_address",
                      "fax2email",
                      "disconnected"
                    ]
                  },
                  "routeTarget": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255,
                    "description": "The target for the route, interpreted per `routeType` (see above). Omit it, or send null, for `disconnected`. A `redirect` to 000, 112 or 106, in any form, is a `422`, \"Calls can’t be diverted to an emergency number (000, 112 or 106).\""
                  },
                  "disconnectResponse": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "hangup",
                      "busy_486",
                      "reject_603",
                      "unallocated_404",
                      "out_of_service_410",
                      "no_answer",
                      null
                    ],
                    "description": "For `routeType` `disconnected`, what the caller hears. Defaults to `hangup` when omitted or null."
                  },
                  "replaceRouting": {
                    "type": "boolean",
                    "description": "Send `true` with `routeType` to replace a chain of more than one route with the single route. Without it, such a number answers `409`."
                  },
                  "routing": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 4,
                    "description": "The whole routing chain, first route first. Replaces the number's chain.",
                    "items": {
                      "$ref": "#/components/schemas/NumberRoutingStep"
                    }
                  },
                  "emergencyAddressId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "List the number at another of your emergency addresses. An Australian number needs one before it can be routed, so send it with the first `routeType` on a spare number."
                  },
                  "smsDelivery": {
                    "type": "object",
                    "additionalProperties": false,
                    "description": "Where this mobile number's inbound SMS are delivered (see above).",
                    "properties": {
                      "method": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "webhook",
                          "email",
                          null
                        ]
                      },
                      "vendor": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "generic",
                          "3cx",
                          "yeastar",
                          null
                        ],
                        "description": "The webhook payload shape; `generic` when left out."
                      },
                      "destination": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 255,
                        "description": "The webhook URL or email address."
                      },
                      "secret": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 255,
                        "writeOnly": true,
                        "description": "The signing secret. Required for `yeastar` while none is stored; generated for `generic` and `3cx` when left out."
                      }
                    }
                  },
                  "resLineResolutions": {
                    "type": "array",
                    "description": "One choice for each Res Line the route would leave with no number, as a `409` `res_line_needs_number` names them.",
                    "items": {
                      "$ref": "#/components/schemas/ResLineResolution"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "Number updated successfully. Returns the updated number details.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/DidNumber"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "emergencyAddressChange": {
                              "type": "object",
                              "description": "Present when the request changed the emergency address of a number in use: the IPND record is updated shortly after, and `emergencyAddressId` shows the new address once it is.",
                              "required": [
                                "status",
                                "emergencyAddressId"
                              ],
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "pending"
                                  ]
                                },
                                "emergencyAddressId": {
                                  "type": "string",
                                  "format": "uuid",
                                  "description": "The address the number is moving to."
                                }
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "x-summary": "Conflict",
            "description": "The request sent `routeType`, and the number has more than one route (a failover, time-of-day or geographic routing) that a single route would delete. The message names the steps. Nothing changed: send `replaceRouting: true` to replace them, or the whole chain as `routing`. Or, with `code` `res_line_needs_number`, the route would leave a Res Line with no number: `error.resLines` names each line, and the request is sent again with `resLineResolutions`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Numbers"
        ],
        "summary": "Cancel a Phone Number",
        "operationId": "cancel_number",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:delete"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:delete\n\nCancel (release) a phone number by specifying it in the path.\n\nThe release runs shortly after the call. Until then `GET` shows the\nnumber as `releasing`; once it is done, `GET` answers `404` and the\n`number.released` webhook is sent.\n\n**What a release does.** When it runs, the number stops working and its\nbilling stops, and an IPND disconnect record is sent for a number that\nis listed in the IPND. The number\nthen cools off for 30 days, during which no one can order it, you\nincluded; after that it can be issued to anyone. **There is no undo in\nthe API**: a number released by mistake is a request to Support, and\nonce it has cooled off it may already be someone else's. If your end\nuser is moving to another provider, have them port the number out\ninstead.\n\n**Refusals.** Each answers `409` with `code` `conflict` and a `reason`,\nand the number stays yours, unchanged:\n  - a number Check Networks has suspended: only Check Networks can lift\n    the suspension, so contact Support;\n  - a number a trunk presents as its default caller ID: change that\n    trunk's default caller ID first (`PATCH /trunks/{username}`), then\n    release the number.\n\n**A Res Line always has a number.** Releasing a Res Line's last number\nanswers `409` with `code` `res_line_needs_number`, and `error.resLines`\nnames the line. Send the request again with a `resLineResolutions` body\nholding a choice for it: give it a new number, move another of your\nnumbers to it, suspend it or cancel it. The release and the choice are\nmade together when the release runs; a line given a choice has its\ndefault caller ID moved off the number.\n\nThe same checks run again when the release runs. If the number was\nsuspended, or made a trunk's default caller ID, after the `202`, or the\nchoice can no longer be made, the release is dropped: `GET` no longer\nshows it as `releasing`, and no `number.released` webhook is sent.\n",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "resLineResolutions": {
                    "type": "array",
                    "description": "One choice for each Res Line the release would leave with no number, as a `409` `res_line_needs_number` names them.",
                    "items": {
                      "$ref": "#/components/schemas/ResLineResolution"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "x-summary": "Accepted",
            "description": "The cancellation is queued.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "number",
                        "status"
                      ],
                      "properties": {
                        "number": {
                          "type": "string",
                          "example": "61299999999"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "releasing"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "x-summary": "Conflict",
            "description": "Check Networks has suspended the number, which only Check Networks can lift, or a trunk presents it as its default caller ID. Or, with `code` `res_line_needs_number`, it is a Res Line's last number and no choice was sent for the line. Nothing changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/emergency-addresses": {
      "get": {
        "tags": [
          "Emergency Addresses"
        ],
        "summary": "List Emergency Addresses",
        "operationId": "list_emergency_addresses",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nReturns a paginated list of your emergency addresses, ordered by label.\n`q` searches the label, customer name, long name, street and locality.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Order by this field, `-` in front for descending. An unknown field is `422`.",
            "schema": {
              "type": "string",
              "enum": [
                "label",
                "-label",
                "createdAt",
                "-createdAt",
                "updatedAt",
                "-updatedAt"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Q"
          },
          {
            "$ref": "#/components/parameters/UpdatedSince"
          },
          {
            "$ref": "#/components/parameters/CreatedFrom"
          },
          {
            "$ref": "#/components/parameters/CreatedTo"
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A paginated list of emergency addresses.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EmergencyAddress"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Emergency Addresses"
        ],
        "summary": "Create an Emergency Address",
        "operationId": "create_emergency_address",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:create"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:create\n\nCreate an emergency address. It is lodged with the emergency register when\na number is linked to it.\n\nTo fill the address from an address search, send the `gnafId` of a\n`GET /addresses/search` result as `serviceAddress.gnafPid` (and, for a\nseparate directory listing, `directoryAddress.gnafPid`) with no other\naddress fields: the building, unit, level, street number, street name and\ntype, locality, state and postcode are filled in the shape the emergency\nregister needs, as the portal does. A field sent beside the PID wins.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EmergencyAddress"
                  },
                  {
                    "type": "object",
                    "required": [
                      "label",
                      "listing",
                      "customer",
                      "serviceAddress"
                    ],
                    "properties": {
                      "listing": {
                        "required": [
                          "listCode",
                          "usageCode"
                        ]
                      },
                      "customer": {
                        "required": [
                          "name1",
                          "contactName1",
                          "contactNumber"
                        ]
                      },
                      "serviceAddress": {
                        "anyOf": [
                          {
                            "required": [
                              "locality",
                              "state",
                              "postcode"
                            ]
                          },
                          {
                            "required": [
                              "gnafPid"
                            ],
                            "properties": {
                              "gnafPid": {
                                "type": "string"
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The address was created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/EmergencyAddress"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/emergency-addresses/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "description": "The emergency address's `id`.",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "tags": [
          "Emergency Addresses"
        ],
        "summary": "Get an Emergency Address",
        "operationId": "get_emergency_address",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The emergency address.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/EmergencyAddress"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "Emergency Addresses"
        ],
        "summary": "Update an Emergency Address",
        "operationId": "update_emergency_address",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:update\n\nSend only the fields to change; the others are kept. The address that\nresults is checked whole, as on create. A change to an address your\nnumbers are listed at is lodged with the emergency register for each of\nthem.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmergencyAddress"
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The updated address.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/EmergencyAddress"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Emergency Addresses"
        ],
        "summary": "Delete an Emergency Address",
        "operationId": "delete_emergency_address",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:delete"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:delete\n\nAn address cannot be deleted while any of your numbers are listed at it\n(`liveNumbers` above zero): the call answers `409`. Move those numbers to\nanother address first.\n",
        "responses": {
          "204": {
            "x-summary": "No Content",
            "description": "The address is deleted. The response has no body."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/fax/plans": {
      "get": {
        "tags": [
          "Fax Plans"
        ],
        "summary": "List Fax Plans",
        "operationId": "list_fax_plans",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nReturns the account's fax plans, oldest first, paged like every list.\nOpen plans by default; pass `status=closed` for closed ones, or\n`status=all` for both. `q` searches the plan's numbers and its end user's\nreference.\n",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "The statuses a plan shows, `open` (the default) or `closed`, one or both comma-separated, or `all`. Case does not matter. Any other value is `422`.",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "open",
                  "closed",
                  "all"
                ]
              },
              "default": [
                "open"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Order by this field, `-` in front for descending. An unknown field is `422`.",
            "schema": {
              "type": "string",
              "enum": [
                "openedOn",
                "-openedOn",
                "closedOn",
                "-closedOn",
                "createdAt",
                "-createdAt"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Q"
          },
          {
            "$ref": "#/components/parameters/UpdatedSince"
          },
          {
            "$ref": "#/components/parameters/CreatedFrom"
          },
          {
            "$ref": "#/components/parameters/CreatedTo"
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A paginated JSON object containing an array of fax plans.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "total",
                    "page",
                    "perPage",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FaxPlan"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Fax Plans"
        ],
        "summary": "Order a Fax Plan",
        "operationId": "create_fax_plan",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:create"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:create\n\nOpens a fax plan for your account, or for one of your end users. The plan\nstarts billing today. Put numbers on it with\n`POST /fax/plans/{planId}/numbers`.\n\nRefused with `422` when the account cannot take new orders (over its\ncredit limit, or overdue).\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "kind"
                ],
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "bundle",
                      "service"
                    ],
                    "description": "`bundle`: one number, pages included. `service`: any number of numbers, each charged monthly, and each page sent charged."
                  },
                  "endUser": {
                    "type": "string",
                    "maxLength": 64,
                    "description": "The number of the end user the plan is for. Omit it for your own plan. An end user's plan takes that end user's numbers only, and its charges go on their invoice.",
                    "example": "100245"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The plan was opened.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/FaxPlan"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/fax/plans/{planId}": {
      "parameters": [
        {
          "name": "planId",
          "in": "path",
          "required": true,
          "description": "The fax plan's ID.",
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "example": "9b2f6c1e-3a47-4d0b-8a55-2f0d6f6f2c11"
        }
      ],
      "get": {
        "tags": [
          "Fax Plans"
        ],
        "summary": "Get a Fax Plan",
        "operationId": "get_fax_plan",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nReturns one fax plan, with the pages it has sent this month.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The fax plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/FaxPlan"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "thisMonth": {
                              "type": "object",
                              "properties": {
                                "pagesCharged": {
                                  "type": "integer",
                                  "description": "Pages sent this month that are charged per page."
                                },
                                "pagesIncluded": {
                                  "type": "integer",
                                  "description": "Pages sent this month that the plan includes."
                                }
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Fax Plans"
        ],
        "summary": "Close a Fax Plan",
        "operationId": "close_fax_plan",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:delete"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:delete\n\nCloses the plan. Every number comes off it and stops sending and receiving\nfaxes: its sender addresses are removed and its Fax to Email route is\ncleared. The plan stops billing today. A fax already queued still sends.\n\nClosing a plan that is already closed changes nothing and returns `204`.\n",
        "responses": {
          "204": {
            "x-summary": "No Content",
            "description": "The plan is closed. The response has no body."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/fax/plans/{planId}/numbers": {
      "parameters": [
        {
          "name": "planId",
          "in": "path",
          "required": true,
          "description": "The fax plan's ID.",
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "example": "9b2f6c1e-3a47-4d0b-8a55-2f0d6f6f2c11"
        }
      ],
      "post": {
        "tags": [
          "Fax Plans"
        ],
        "summary": "Add a Number to a Fax Plan",
        "operationId": "add_fax_plan_number",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:create"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:create\n\nPuts one of your active numbers on the plan. From then on it can send and\nreceive faxes, and it has no separate monthly number charge.\n\nRefused with `422` when:\n  - the number is already on a fax plan (move it instead);\n  - the plan is a Fax Bundle that already has its one number;\n  - the plan is for an end user and the number is not on that end user's\n    services;\n  - the plan is closed.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "number"
                ],
                "properties": {
                  "number": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "One of your numbers, as E.164 digits.",
                    "example": "61299990001"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The number is on the plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/FaxPlan"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/fax/plans/{planId}/numbers/{number}": {
      "parameters": [
        {
          "name": "planId",
          "in": "path",
          "required": true,
          "description": "The fax plan's ID.",
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "example": "9b2f6c1e-3a47-4d0b-8a55-2f0d6f6f2c11"
        },
        {
          "name": "number",
          "in": "path",
          "required": true,
          "description": "A number on the plan, as E.164 digits.",
          "schema": {
            "type": "string"
          },
          "example": "61299990001"
        }
      ],
      "delete": {
        "tags": [
          "Fax Plans"
        ],
        "summary": "Remove a Number from a Fax Plan",
        "operationId": "remove_fax_plan_number",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:delete"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:delete\n\nTakes the number off the plan. It stops sending and receiving faxes: its\nsender addresses are removed and its Fax to Email route is cleared. A fax\nalready queued still sends. The plan is charged for the days it held the\nnumber.\n\nTo change plans without losing the sender addresses and the route, use\n`POST /fax/plans/{planId}/numbers/{number}/move`.\n",
        "responses": {
          "204": {
            "x-summary": "No Content",
            "description": "The number is off the plan. The response has no body."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/fax/plans/{planId}/numbers/{number}/move": {
      "parameters": [
        {
          "name": "planId",
          "in": "path",
          "required": true,
          "description": "The ID of the fax plan the number is on now.",
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "example": "9b2f6c1e-3a47-4d0b-8a55-2f0d6f6f2c11"
        },
        {
          "name": "number",
          "in": "path",
          "required": true,
          "description": "A number on the plan, as E.164 digits.",
          "schema": {
            "type": "string"
          },
          "example": "61299990001"
        }
      ],
      "post": {
        "tags": [
          "Fax Plans"
        ],
        "summary": "Move a Number to Another Fax Plan",
        "operationId": "move_fax_plan_number",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:update\n\nMoves the number to another of your open fax plans in one step. Its sender\naddresses and Fax to Email route move with it, and each plan is charged\nfor the days it held the number.\n\nRefused with `422` when the target plan cannot take the number: a Fax\nBundle that already has its number, or an end user's plan when the number\nis not on that end user's services.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "toPlan"
                ],
                "properties": {
                  "toPlan": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The ID of the plan to move the number to."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The number is on the target plan, which is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/FaxPlan"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/fax/plans/{planId}/senders": {
      "parameters": [
        {
          "name": "planId",
          "in": "path",
          "required": true,
          "description": "The fax plan's ID.",
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "example": "9b2f6c1e-3a47-4d0b-8a55-2f0d6f6f2c11"
        }
      ],
      "get": {
        "tags": [
          "Fax Plans"
        ],
        "summary": "List a Fax Plan's Sender Addresses",
        "operationId": "list_fax_plan_senders",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nReturns the email addresses that may send faxes by email under this plan,\nand the number each sends as, by email, paged like every list. `q`\nsearches the email.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Order by this field, `-` in front for descending. An unknown field is `422`.",
            "schema": {
              "type": "string",
              "enum": [
                "email",
                "-email",
                "createdAt",
                "-createdAt"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Q"
          },
          {
            "$ref": "#/components/parameters/UpdatedSince"
          },
          {
            "$ref": "#/components/parameters/CreatedFrom"
          },
          {
            "$ref": "#/components/parameters/CreatedTo"
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A paginated JSON object containing an array of sender addresses.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "total",
                    "page",
                    "perPage",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "The sender address's id, as `DELETE /fax/plans/{planId}/senders/{senderId}` takes it."
                          },
                          "email": {
                            "type": "string",
                            "format": "email"
                          },
                          "sendsAs": {
                            "type": "string",
                            "description": "The plan's number faxes from this address are sent as.",
                            "example": "61299990001"
                          },
                          "createdAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the address was added, in UTC."
                          },
                          "updatedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the address last changed, in UTC."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Fax Plans"
        ],
        "summary": "Authorise a Sender Address",
        "operationId": "add_fax_plan_sender",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:create"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:create\n\nAuthorises an email address to send faxes by email as one of the plan's\nnumbers. Mail from any other address is rejected.\n\nRefused with `422` when `sendsAs` is not a number on this plan, or the\naddress is already authorised on your account.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email",
                  "sendsAs"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 320
                  },
                  "sendsAs": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "A number on this plan, as E.164 digits.",
                    "example": "61299990001"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The address is authorised.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "email": {
                          "type": "string",
                          "format": "email"
                        },
                        "sendsAs": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/fax/plans/{planId}/senders/{senderId}": {
      "parameters": [
        {
          "name": "planId",
          "in": "path",
          "required": true,
          "description": "The fax plan's ID.",
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "example": "9b2f6c1e-3a47-4d0b-8a55-2f0d6f6f2c11"
        },
        {
          "name": "senderId",
          "in": "path",
          "required": true,
          "description": "The sender address's `id`, as the plan's sender list gives it.",
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "example": "0192f0c4-5b7e-7c1a-9d3e-2f6a8b4c1d22"
        }
      ],
      "delete": {
        "tags": [
          "Fax Plans"
        ],
        "summary": "Remove a Sender Address",
        "operationId": "delete_fax_plan_sender",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:delete"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:delete\n\nRemoves a sender address from the plan. Faxes emailed from it are rejected\nfrom then on.\n",
        "responses": {
          "204": {
            "x-summary": "No Content",
            "description": "The sender address is removed. The response has no body."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/trunks": {
      "get": {
        "tags": [
          "SIP Trunks"
        ],
        "summary": "List SIP Trunks",
        "operationId": "list_trunks",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nReturns a paginated list of all SIP trunks assigned to your account, oldest first.\n`q` searches the name, handle, description and SIP username. Filter by\n`endUser` for one end user's trunks and by `status`, as the portal's trunk\nlist does. A trunk's `connection.allowList` is on `GET /trunks/{username}`\nonly, not here.\n\nFor bulk pulls, set `format=csv` or `format=ndjson` to stream **every**\nmatching trunk as a single download instead of paged JSON. `page`/`perPage`\nare ignored in this mode. `csv` returns `text/csv` (a header row and one row\nper trunk, with arrays and objects as JSON in their cells); `ndjson` returns\n`application/x-ndjson` (one JSON object per line, each identical to a\n`results[]` item). An unrecognised `format` returns `422`.\n",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Only trunks with this `status`.",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "suspended",
                "cancelled"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "Bulk export format. Omit for paged JSON; `csv` or `ndjson` streams the full result set as a download.",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "ndjson"
              ]
            }
          },
          {
            "name": "endUser",
            "in": "query",
            "required": false,
            "description": "Only the trunks of this end user, by its public number. A number that is not one of your end users is a 422, not an empty list.",
            "schema": {
              "type": "string",
              "example": "100042"
            }
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Order by this field, `-` in front for descending. An unknown field is `422`.",
            "schema": {
              "type": "string",
              "enum": [
                "name",
                "-name",
                "createdAt",
                "-createdAt"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Q"
          },
          {
            "$ref": "#/components/parameters/ExternalRef"
          },
          {
            "$ref": "#/components/parameters/UpdatedSince"
          },
          {
            "$ref": "#/components/parameters/CreatedFrom"
          },
          {
            "$ref": "#/components/parameters/CreatedTo"
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A paginated JSON object containing an array of SIP trunks.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer",
                      "description": "Total number of trunks matching the query."
                    },
                    "page": {
                      "type": "integer",
                      "description": "The current page number."
                    },
                    "perPage": {
                      "type": "integer",
                      "description": "The number of records returned per page."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SipTrunk"
                      }
                    }
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string",
                  "description": "Present only when `format=csv`. Every matching trunk as CSV — a header row followed by one row per trunk, with the same columns as a `results[]` item.\n"
                }
              },
              "application/x-ndjson": {
                "schema": {
                  "type": "string",
                  "description": "Present only when `format=ndjson`. Every matching trunk as newline-delimited JSON — one object per line, each identical to a `results[]` item.\n"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "SIP Trunks"
        ],
        "summary": "Create SIP Trunk",
        "operationId": "create_trunk",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:create"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:create\n\nCreate a new SIP trunk on your account.\n\nThe SIP domain, username and password are platform-assigned: the trunk\nis created on the shared wholesale SIP domain and the generated\ncredentials are returned in the response. The password is revealed\n**only once**, in the `201` response — store it securely.\n\nWith `bundleId`, the trunk is checked the same way and joins that bundle\nas a draft instead (see `POST /bundles`): it is set up when the bundle is\nsubmitted, and the answer is the bundle item, with the bundle at\n`Location`. Order numbers onto it in the same bundle with the item's `id`\nas `trunk`. Once it is set up, its `href` reads it; take its password with\n`POST /trunks/{username}/credential/rotate`. A description, recording,\nnumber formats and calling limits are set on the trunk then, so a request\nin a bundle that sends them is a 422. `externalRef` and `metadata` are\ntaken now and held for the trunk: a reference another trunk holds, or one\nanother open order holds for its trunk, is a 422 now, and one another\ntrunk takes before the bundle sets this one up is left off it, with the\nreason in the bundle item's `outcomeReason`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "`sipUsername`, `sipDomain`, `cpsLimit` and `faxEnabled` are set by Check Networks; a request that sends any of them is refused.",
                "required": [
                  "name",
                  "defaultCallerId"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "A friendly name for this trunk.",
                    "example": "Head Office Trunk"
                  },
                  "externalRef": {
                    "$ref": "#/components/schemas/ExternalRef"
                  },
                  "metadata": {
                    "$ref": "#/components/schemas/MetadataInput"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500,
                    "description": "An optional description for this trunk."
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "payg",
                      "ultimate"
                    ],
                    "default": "payg",
                    "description": "The plan to provision on. Omitted means `payg`. On `ultimate` each channel is a recurring billed assignment; on `payg` outbound calls are metered per use."
                  },
                  "channels": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100,
                    "description": "Maximum concurrent calls on this trunk. On `ultimate` this is also the number of channels billed, and is required. On `payg` it is a ceiling and defaults to 5."
                  },
                  "maxInternational": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9999,
                    "description": "Maximum concurrent international calls. Only for a trunk that may call internationally: a limit sent without `International` in `callingPermissions` is refused with a 422."
                  },
                  "callingPermissions": {
                    "type": "array",
                    "description": "The calling-permission classes to enable. Omitted means `AUNational`, `AUMobile` and `AU13`. `AUEmergency` and `AUFreecall` are always on: you may send them, as a fetched trunk lists them, and they cannot be left out.",
                    "items": {
                      "$ref": "#/components/schemas/CallingPermission"
                    }
                  },
                  "defaultCallerId": {
                    "type": "string",
                    "maxLength": 24,
                    "pattern": "^[0-9+\\s]*[0-9][0-9+\\s]*$",
                    "description": "Default outbound caller ID: a number on your account with an emergency address linked, or one approved through `POST /caller-id-authorisations`. Digits, which may include `+` and spaces. Any other number is a 422 with the code `caller_id_authorisation_required`."
                  },
                  "forceOutboundCli": {
                    "type": "boolean",
                    "default": false,
                    "description": "Present `defaultCallerId` on every outbound call, whatever caller ID the PBX sends."
                  },
                  "recordingEnabled": {
                    "type": "boolean",
                    "default": false,
                    "description": "Order call recording with the trunk, a monthly charge per trunk. Every call is recorded, with no announcement: you are responsible for telling your callers that calls may be recorded. Needs `acknowledgeRecording: true`, and an account that may place orders."
                  },
                  "acknowledgeRecording": {
                    "type": "boolean",
                    "default": false,
                    "description": "With `recordingEnabled: true`, confirms that you accept the monthly recording charge and are responsible for telling your callers. Without it the request answers `422` `charge_acknowledgement_required`, with `error.consent` (the text you are agreeing to) and `error.charge` (the monthly price). The acknowledgement is kept on the trunk's history with the API key that sent it. A credit hold or a suspended account answers `422` and nothing is ordered."
                  },
                  "endUser": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 64,
                    "description": "The end user this trunk is for, by its public number: the trunk's calls are billed to that end user. One of your end users that is not archived; any other number is a 422. Omitted or null makes the trunk your own.",
                    "example": "100042"
                  },
                  "allowedCountries": {
                    "anyOf": [
                      {
                        "type": "array",
                        "minItems": 1,
                        "items": {
                          "type": "string",
                          "pattern": "^[A-Za-z]{2}$"
                        }
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "The trunk's own list of countries it may call, as ISO 3166 alpha-2 codes. Omitted or null, the new trunk follows your account's list (Get Allowed Countries), later changes included."
                  },
                  "dailySpendCapExGst": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^\\d{1,7}(\\.\\d{1,2})?$",
                    "example": "50.00",
                    "description": "The most the trunk's outbound calls may cost in a day, ex GST, as a dollar string. Omitted or null is no cap. 000 always connects."
                  },
                  "calledNumberFormat": {
                    "$ref": "#/components/schemas/TrunkNumberFormat",
                    "description": "How the dialled number arrives on calls to this trunk. Omitted means `international`."
                  },
                  "callerNumberFormat": {
                    "$ref": "#/components/schemas/TrunkNumberFormat",
                    "description": "How an Australian caller's number arrives on calls to this trunk. Omitted follows `calledNumberFormat`'s plus: with a plus for `international`, digits only otherwise."
                  },
                  "bundleId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "An open bundle to add the trunk to, as a draft that is set up when the bundle is submitted. A bundle that has been submitted, or is not yours, is a 422."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "SIP trunk created successfully. Includes the one-time SIP password. With `bundleId`, the trunk joined the bundle; this is the item.",
            "headers": {
              "Location": {
                "description": "With `bundleId`, the bundle.",
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "anyOf": [
                        {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/SipTrunk"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "sipPassword": {
                                  "type": "string",
                                  "description": "The generated SIP password. To read it again later, call `GET /trunks/{username}/credential`, which needs `secrets:read`."
                                }
                              }
                            }
                          ]
                        },
                        {
                          "$ref": "#/components/schemas/BundleItem"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/trunks/{username}": {
      "parameters": [
        {
          "name": "username",
          "in": "path",
          "required": true,
          "description": "The trunk's `id`, or its SIP digest username. A trunk with no SIP credential has only its `id`.",
          "schema": {
            "type": "string"
          },
          "example": "784512"
        }
      ],
      "get": {
        "tags": [
          "SIP Trunks"
        ],
        "summary": "Get SIP Trunk",
        "operationId": "get_trunk",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nReturns the full details for a single SIP trunk on your account, including\nits IP ACL entries and, in `connection.allowList`, the addresses to allow\nthrough your firewall (read from DNS, so returned here and not on the list).\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A JSON object containing the SIP trunk details.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/SipTrunk"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "SIP Trunks"
        ],
        "summary": "Update SIP Trunk",
        "operationId": "update_trunk",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:update\n\nUpdate settings on an existing SIP trunk. Fields not included in the request body will remain unchanged.\n\n### Changing plan or channels\n\n`type` and `channels` are billing-affecting on an `ultimate` trunk — each\nchannel is a recurring charge — so they follow the upgrade/downgrade rule\nrather than applying as a plain edit:\n\n* **Upgrades take effect immediately** and are billed from today. Moving\n  `payg` → `ultimate` is an upgrade whatever the channel counts say, as is\n  raising the channel count on an `ultimate` trunk.\n* **Downgrades take effect at the start of your next billing cycle.**\n  Lowering the channel count, or moving `ultimate` → `payg`, is a\n  downgrade. Channels in use above the new limit are never cut mid-period.\n\nWhen a plan change happens the response carries a `planChange` block. On a\nscheduled downgrade `result` still shows the plan the trunk is on **today**\n— `planChange.effectiveOn` is when the new one starts.\n\nRequesting a change supersedes any change already scheduled on the trunk,\nso an upgrade also clears a pending downgrade that would otherwise reverse\nit on the 1st. A scheduled change shows in the trunk's `pendingPlanChange`\non every read until it applies, and `DELETE /trunks/{username}/plan-change`\ncancels it.\n\nEvery field is checked before anything is applied, and the whole request\napplies in one step: a `422` (for example a caller ID you may not present)\nleaves recording, the plan and every other field as they were.\n",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "`cpsLimit` and `faxEnabled` are managed by Check Networks; a request that sends either is refused.",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "externalRef": {
                    "$ref": "#/components/schemas/ExternalRef"
                  },
                  "metadata": {
                    "$ref": "#/components/schemas/MetadataInput"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500,
                    "description": "Your free-text notes on the trunk, up to 500 characters. Null clears them."
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "payg",
                      "ultimate"
                    ],
                    "description": "The trunk's billing plan. Omit to leave it unchanged. Moving onto `ultimate` requires `channels`, since each channel is a recurring charge and one will never be assumed for you."
                  },
                  "channels": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100,
                    "description": "Maximum concurrent calls on this trunk. On `ultimate` this is the number of billed channels, and changing it is an upgrade or a downgrade (see above); omit it to leave the count alone. On `payg` it is a concurrency ceiling only, with no billing effect. An `ultimate` trunk needs at least 1."
                  },
                  "maxInternational": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 9999,
                    "description": "Maximum concurrent international calls; null removes the trunk's own limit. Only for a trunk that may call internationally: a limit sent while `International` is not among the calling permissions (after this request's change) is refused with a 422. Removing `International` clears the limit."
                  },
                  "callingPermissions": {
                    "type": "array",
                    "description": "The trunk's call barring: the calling-permission classes it may dial, replacing the current list. Remove `International` to cut international calling in one call. 000 and freecall are never barred: `AUEmergency` and `AUFreecall` stay on whether sent or not, and the answer's `callingPermissionsKept` names any this list left out.",
                    "items": {
                      "$ref": "#/components/schemas/CallingPermission"
                    }
                  },
                  "defaultState": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "NSW",
                      "VIC",
                      "QLD",
                      "SA",
                      "WA",
                      "TAS",
                      "NT",
                      "ACT",
                      null
                    ],
                    "description": "The trunk's default state; null clears it."
                  },
                  "defaultCallerId": {
                    "type": "string",
                    "maxLength": 24,
                    "pattern": "^[0-9+\\s]*[0-9][0-9+\\s]*$",
                    "description": "Default outbound caller ID: a number on your account, or one approved through `POST /caller-id-authorisations`. Digits, which may include `+` and spaces. Any other number is a 422 with the code `caller_id_authorisation_required`. The change is in the trunk's history with its before and after values."
                  },
                  "forceOutboundCli": {
                    "type": "boolean",
                    "description": "Present `defaultCallerId` on every outbound call, whatever caller ID the PBX sends. The caller ID must pass the same checks as `defaultCallerId`."
                  },
                  "forcePrivateCli": {
                    "type": "boolean",
                    "description": "Force all outbound calls to present as Private/Anonymous."
                  },
                  "recordingEnabled": {
                    "type": "boolean",
                    "description": "`true` orders call recording, a monthly charge per trunk; `false` cancels it, and recordings already made are kept. Every call is recorded, with no announcement: you are responsible for telling your callers that calls may be recorded. Turning it on needs `acknowledgeRecording: true`, and an account that may place orders."
                  },
                  "acknowledgeRecording": {
                    "type": "boolean",
                    "default": false,
                    "description": "With `recordingEnabled: true` on a trunk without recording, confirms that you accept the monthly recording charge and are responsible for telling your callers. Without it the request answers `422` `charge_acknowledgement_required`, with `error.consent` and `error.charge`. A credit hold answers `422` and nothing is ordered. Not needed to turn recording off."
                  },
                  "allowedCountries": {
                    "anyOf": [
                      {
                        "type": "array",
                        "minItems": 1,
                        "items": {
                          "type": "string",
                          "pattern": "^[A-Za-z]{2}$"
                        }
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "This trunk's own list of countries it may call, as ISO 3166 alpha-2 codes (the United Kingdom is `GB`). `null` drops the override, so the trunk follows your account's list again (Get Allowed Countries). It applies when `International` is in `callingPermissions`; calls to Australia and New Zealand follow their own permissions, high-risk destinations stay blocked, and 000 always connects."
                  },
                  "dailySpendCapExGst": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^\\d{1,7}(\\.\\d{1,2})?$",
                    "example": "50.00",
                    "description": "The most this trunk's outbound calls may cost in a day, ex GST, as a dollar string. At the cap its new outbound calls stop until midnight Brisbane time; calls already up carry on. Spend counts a call when it ends. A cap at or below `spendTodayExGst`, `\"0.00\"` included, holds the trunk at once, and the answer reads `spendCapHeld: true`; raising it above `spendTodayExGst` resumes calls at once. `null` removes the cap. 000 always connects."
                  },
                  "calledNumberFormat": {
                    "$ref": "#/components/schemas/TrunkNumberFormat",
                    "description": "How the dialled number arrives on calls to this trunk."
                  },
                  "callerNumberFormat": {
                    "$ref": "#/components/schemas/TrunkNumberFormat",
                    "description": "How an Australian caller's number arrives on calls to this trunk. A number's own inbound format still overrides it."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "Trunk updated successfully. Returns the updated trunk details.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/SipTrunk"
                    },
                    "callingPermissionsKept": {
                      "type": "array",
                      "description": "Present only when `callingPermissions` left out a class that is always on: the trunk keeps it, since 000 and freecall are never barred.",
                      "items": {
                        "type": "string",
                        "enum": [
                          "AUEmergency",
                          "AUFreecall"
                        ]
                      }
                    },
                    "planChange": {
                      "type": "object",
                      "description": "Present only when the request changed the trunk's plan or its billed channel count. Absent for an ordinary edit.",
                      "properties": {
                        "direction": {
                          "type": "string",
                          "enum": [
                            "upgrade",
                            "downgrade"
                          ],
                          "description": "Which way the change moves your entitlement."
                        },
                        "appliedImmediately": {
                          "type": "boolean",
                          "description": "True for an upgrade (already live). False for a downgrade, which starts on `effectiveOn`."
                        },
                        "effectiveOn": {
                          "type": "string",
                          "format": "date",
                          "description": "The date the new plan applies from — today for an upgrade, the first day of your next billing cycle for a downgrade."
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "payg",
                            "ultimate"
                          ],
                          "description": "The plan the trunk moves to."
                        },
                        "channels": {
                          "type": "integer",
                          "description": "The billed channel count the trunk moves to (0 on `payg`)."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "SIP Trunks"
        ],
        "summary": "Delete SIP Trunk",
        "operationId": "delete_trunk",
        "security": [
          {
            "OAuth2": [
              "voice:delete"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:delete\n\nPermanently delete a SIP trunk from your account.\n\n**Warning:** This action cannot be undone. Re-route or cancel the trunk's\nnumbers first; until then the request answers `422`. New calls are\nrefused at once, and calls already in progress are ended within a minute.\nThe one exception is the trunk's `defaultCallerId`, which cannot be\ncancelled while the trunk is up: when it is the trunk's only number, the\ndelete releases it with the trunk. If that number can't be released just\nthen, the answer is `503` and nothing changes; try again shortly.\n\nA trunk still in contract has an early termination charge. The first\nrequest answers `422` with the code `charge_acknowledgement_required` and\nthe charge in `error.charge`; send `acknowledgeEarlyTermination=true` to\naccept it and delete the trunk. The accepted charge is billed shortly\nafter, on your next invoice. If the charge can't be recorded just then,\nthe answer is `503` and nothing changes: the trunk is not deleted and\nnothing is billed; try again shortly.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          },
          {
            "name": "acknowledgeEarlyTermination",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Accept the early termination charge on a trunk still in contract."
          }
        ],
        "responses": {
          "204": {
            "x-summary": "No Content",
            "description": "The trunk is deleted. The response has no body."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/trunks/{username}/ips": {
      "parameters": [
        {
          "name": "username",
          "in": "path",
          "required": true,
          "description": "The trunk's `id`, or its SIP digest username.",
          "schema": {
            "type": "string"
          },
          "example": "784512"
        }
      ],
      "get": {
        "tags": [
          "SIP Trunks"
        ],
        "summary": "List Trunk IP ACL Entries",
        "operationId": "list_trunk_ips",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nReturns the IP ACL entries for a SIP trunk, in address order, paged like\nevery list. `q` searches the address or host name and its description.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Order by this field, `-` in front for descending. An unknown field is `422`.",
            "schema": {
              "type": "string",
              "enum": [
                "ipAddress",
                "-ipAddress",
                "createdAt",
                "-createdAt"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Q"
          },
          {
            "$ref": "#/components/parameters/UpdatedSince"
          },
          {
            "$ref": "#/components/parameters/CreatedFrom"
          },
          {
            "$ref": "#/components/parameters/CreatedTo"
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A paginated JSON object containing an array of IP ACL entries.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "total",
                    "page",
                    "perPage",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TrunkIpEntry"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "SIP Trunks"
        ],
        "summary": "Add Trunk IP ACL Entry",
        "operationId": "add_trunk_ip",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:create"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:create\n\nAdd a new IP address, CIDR range or host name to a trunk's IP ACL. Calls\nfrom an address on the list are accepted without registration.\n\nA **host name** (such as `pbx.example.com`) is resolved now and again on\nits DNS TTL, and allows the public addresses it resolves to. It is stored\nlower-cased and listed with `type: host`. It must be a full name with a\ndot; one already on another trunk is refused.\n\nAn address must be:\n  - **An IPv4 host or a range no wider than `/24`** (256 addresses), **or\n    a single IPv6 host** (`/128`; IPv6 ranges are refused). A bare\n    address is stored, and returned, as `/32` or `/128`.\n  - **Public.** Private, CGNAT (`100.64.0.0/10`) and reserved ranges are\n    refused.\n  - **Not on any other trunk**, yours or another account's: a source\n    address identifies the trunk a call belongs to, so ranges cannot\n    overlap. If an address has moved to you, contact support.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "ipAddress"
                ],
                "properties": {
                  "ipAddress": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "The IPv4 address or CIDR range from `/24` to `/32`, the single IPv6 address, or the host name, to allow.",
                    "example": "203.0.113.10"
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "An optional label for this IP entry. Defaults to `API`."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "IP ACL entry created successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/TrunkIpEntry"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/trunks/{username}/ips/{ipId}": {
      "parameters": [
        {
          "name": "username",
          "in": "path",
          "required": true,
          "description": "The trunk's `id`, or its SIP digest username.",
          "schema": {
            "type": "string"
          },
          "example": "784512"
        },
        {
          "name": "ipId",
          "in": "path",
          "required": true,
          "description": "The IP ACL entry's `id`, as the trunk's IP list gives it.",
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "example": "0192f0c4-5b7e-7c1a-9d3e-2f6a8b4c1d20"
        }
      ],
      "delete": {
        "tags": [
          "SIP Trunks"
        ],
        "summary": "Remove Trunk IP ACL Entry",
        "operationId": "delete_trunk_ip",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:delete"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:delete\n\nRemove an IP address from a trunk's IP ACL.\n",
        "responses": {
          "204": {
            "x-summary": "No Content",
            "description": "The entry is removed. The response has no body."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/trunks/{username}/registration": {
      "parameters": [
        {
          "name": "username",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The trunk's `id`, or its SIP digest username.",
          "example": "784512"
        }
      ],
      "get": {
        "tags": [
          "SIP Trunks"
        ],
        "summary": "Get Trunk Registration Status",
        "operationId": "get_trunk_registration",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nReturns the live SIP registration status for this trunk, read from the\nplatform's real-time registration state.\n\nA registration-based trunk lists its currently active contacts (the SIP\ndevices/gateways registered against it). An IP-ACL-only trunk authenticates\nby source IP rather than registering, so it has no registrations\n(`registered` is `false`).\n\nThis data is live and reflects the current state of the trunk in real time.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The trunk's live registration status.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "username": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The trunk's SIP digest username. Null for a trunk with no SIP credential, which authenticates by IP and never registers.",
                          "example": "784512"
                        },
                        "registered": {
                          "type": "boolean",
                          "description": "Whether the trunk currently has at least one active SIP registration.",
                          "example": true
                        },
                        "registrations": {
                          "type": "array",
                          "description": "The trunk's currently active SIP registrations (empty for IP-ACL trunks).",
                          "items": {
                            "type": "object",
                            "properties": {
                              "aor": {
                                "type": "string",
                                "description": "The SIP Address of Record the registration is bound to.",
                                "example": "784512@sip.checknetworks.tel"
                              },
                              "contact": {
                                "type": "string",
                                "description": "The registered SIP contact URI.",
                                "example": "sip:784512@203.0.113.10:5060"
                              },
                              "sourceIp": {
                                "type": "string",
                                "description": "The source address the REGISTER was received from.",
                                "example": "203.0.113.10"
                              },
                              "userAgent": {
                                "type": "string",
                                "description": "The registering device's SIP User-Agent.",
                                "example": "MyPBX/2.4"
                              },
                              "expiresAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "When this registration expires."
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotInSandbox"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/transit/services/{serviceNumber}/blackholes": {
      "parameters": [
        {
          "name": "serviceNumber",
          "in": "path",
          "required": true,
          "description": "The IP transit service's number.",
          "schema": {
            "type": "string",
            "pattern": "^IPT\\d{12}$"
          },
          "example": "IPT612021859279"
        }
      ],
      "get": {
        "tags": [
          "IP Transit Blackholes"
        ],
        "summary": "List Blackholes (Not Available Yet)",
        "x-badges": [
          {
            "name": "Not Available Yet",
            "color": "#6b7280"
          }
        ],
        "operationId": "list_transit_blackholes",
        "security": [
          {
            "OAuth2": [
              "transit:read"
            ]
          }
        ],
        "description": "**Not available yet.** IP transit is not offered by API yet: this\nendpoint answers `404` and `transit:read` cannot be granted until it is.\n\n>**Required Scope(s):** transit:read\n\nReturns the blackholes in force on an IP transit service, oldest first,\npaged like every list. It includes any that Check Networks placed on the\nservice's addresses (`placedBy` is `staff`), which count toward the\nservice's limit and which only Check Networks can release.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A paginated JSON object containing an array of blackholes.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "total",
                    "page",
                    "perPage",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TransitBlackhole"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotInSandbox"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "IP Transit Blackholes"
        ],
        "summary": "Blackhole an Address (Not Available Yet)",
        "x-badges": [
          {
            "name": "Not Available Yet",
            "color": "#6b7280"
          }
        ],
        "operationId": "place_transit_blackhole",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transit:create"
            ]
          }
        ],
        "description": "**Not available yet.** IP transit is not offered by API yet: this\nendpoint answers `404` and `transit:create` cannot be granted until it is.\n\n>**Required Scope(s):** transit:create\n\nDrop all traffic to one of the service's addresses, to stop an attack on\nit reaching your service. The traffic is dropped at our border within a\nminute or two. It is not signalled to our upstream carriers.\n\nThe blackhole must be:\n  - **One address**, IPv4 or IPv6, with no prefix length.\n  - **Inside one of the service's own prefixes.** For a BGP service\n    ordered with an AS-SET, that includes any route registered under the\n    AS-SET in the routing registry (IRR), which is asked when you place\n    the blackhole. Any other address is refused, and so is every address\n    if the registry cannot be reached: try again, or signal the blackhole\n    over BGP.\n  - **On a live service.**\n  - **Given an expiry**, of at most 24 hours. It lifts by itself then;\n    place it again if the attack is still running.\n\nA service holds at most 10 blackholes at once. Release one, or wait for\none to expire, to place another.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "address",
                  "expiresInHours"
                ],
                "properties": {
                  "address": {
                    "type": "string",
                    "description": "The address to blackhole.",
                    "example": "203.0.113.5"
                  },
                  "expiresInHours": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 24,
                    "description": "How many hours until the blackhole lifts by itself.",
                    "example": 4
                  },
                  "reason": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255,
                    "description": "An optional note on why, shown with the blackhole.",
                    "example": "Volumetric attack"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The blackhole was placed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/TransitBlackhole"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotInSandbox"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/transit/services/{serviceNumber}/blackholes/{blackholeId}": {
      "parameters": [
        {
          "name": "serviceNumber",
          "in": "path",
          "required": true,
          "description": "The IP transit service's number.",
          "schema": {
            "type": "string",
            "pattern": "^IPT\\d{12}$"
          },
          "example": "IPT612021859279"
        },
        {
          "name": "blackholeId",
          "in": "path",
          "required": true,
          "description": "The blackhole's ID.",
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "example": "6f0c2d5e-3b1a-4c8e-9a47-2d1f5b7c9e10"
        }
      ],
      "delete": {
        "tags": [
          "IP Transit Blackholes"
        ],
        "summary": "Release a Blackhole (Not Available Yet)",
        "x-badges": [
          {
            "name": "Not Available Yet",
            "color": "#6b7280"
          }
        ],
        "operationId": "release_transit_blackhole",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "transit:delete"
            ]
          }
        ],
        "description": "**Not available yet.** IP transit is not offered by API yet: this\nendpoint answers `404` and `transit:delete` cannot be granted until it is.\n\n>**Required Scope(s):** transit:delete\n\nRelease a blackhole now, before it expires. Traffic to the address\nresumes within a minute or two. A blackhole that has already been\nreleased or has expired answers `404`.\n\nYou can release a blackhole you placed (`placedBy` is `customer`). One\nCheck Networks placed answers `422`; contact support to have it lifted.\n",
        "responses": {
          "204": {
            "x-summary": "No Content",
            "description": "The blackhole is released. The response has no body."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotInSandbox"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/voice/cdrs": {
      "get": {
        "tags": [
          "Voice"
        ],
        "summary": "List Call Detail Records",
        "operationId": "list_cdrs",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nReturns a paginated list of Call Detail Records (CDRs) for your account.\n\nResults can be filtered by date range using the `from` and `to` query parameters. Dates must be provided in ISO 8601 format (e.g. `2024-01-01T00:00:00Z`). Invalid `from`/`to` values return `422`.\nWhen `from` is omitted the window is the **31 days** before `to`; when `to`\nis omitted it is now. `period=unbilled` starts the window at the start of\nthis month instead (it cannot be combined with `from`), and `invoice` with\nno `from` has no lower bound: the invoice bounds the calls. Every response\nsays the window it used in `window`, and a cursor keeps the first page's\nwindow, so a walk does not drift as new calls arrive.\n\nFilter further with `trunk`, `endUser`, `direction`, `disposition`,\n`invoice` and `q`; `GET /voice/cdrs/summary` gives the totals for the same\nfilters, and `GET /voice/cdrs/{cgrid}` one call. An unknown trunk, end\nuser or invoice, or a value outside an enum, is a `422`.\n\nA maximum of 200 records can be returned per page. `q` searches the source\nand destination.\n\nA re-rated call is listed once, under its `cgrid`, at its new price, with\n`rerated: true` and the price before the most recent re-rate in\n`previousCostExGst`, `previousCostGst` and `previousCostIncGst`. The\nsummary counts it once.\n\n### Walking a large window\n\nPage numbers reach at most 10,000 records into the window (`page × perPage`);\na deeper page returns `422`. `total` is exact up to 10,000 and reported as\n10,000 with `totalIsBounded: true` beyond it. To walk every record, follow\n`nextCursor`: pass it back as `cursor` to get the next page, until it is\n`null`. A cursor page carries `perPage`, `nextCursor` and `results` only,\nand each record is returned exactly once, however many there are.\n\n### Bulk export\n\nFor bulk pulls, set `format=csv` or `format=ndjson` to stream the **entire**\nfiltered result set (the `from`/`to` window still applies) as a single\ndownload instead of paged JSON. `page`/`perPage` are ignored in this mode.\n`csv` returns `text/csv` (header row + one row per call); `ndjson` returns\n`application/x-ndjson` (one JSON object per line, each identical to a\n`results[]` item). An unrecognised `format` returns `422`. An export\ncovers at most **93 days**: a longer window answers `422` on `from`. Each\nexport is audited with the API key that made it.\n",
        "parameters": [
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "Bulk export format. Omit for paged JSON; `csv` or `ndjson` streams the full filtered result set as a download.\n",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "ndjson"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "Filter CDRs on or after this datetime (ISO 8601), or from the start of this date (`YYYY-MM-DD`). Defaults to 31 days before `to`, or before now.",
            "schema": {
              "type": "string",
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "string",
                  "format": "date"
                }
              ]
            },
            "example": "2024-01-01T00:00:00Z"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "The `nextCursor` of the previous page. Walks the window by keyset rather than page number, with no depth limit; `page` is ignored when it is given.\n",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "Filter CDRs on or before this datetime (ISO 8601), or to the end of this date (`YYYY-MM-DD`). Defaults to now.",
            "schema": {
              "type": "string",
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "string",
                  "format": "date"
                }
              ]
            },
            "example": "2024-01-31T23:59:59Z"
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "description": "`unbilled`: from the start of this month. Not with `from`.",
            "schema": {
              "type": "string",
              "enum": [
                "unbilled"
              ]
            }
          },
          {
            "name": "trunk",
            "in": "query",
            "required": false,
            "description": "Only this trunk's calls, by sipUsername. A trunk that is not yours is a 422.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "inbound",
                "outbound",
                "internal"
              ]
            }
          },
          {
            "name": "disposition",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "in_progress",
                "answered",
                "busy",
                "no_answer",
                "failed",
                "cancelled",
                "blocked"
              ]
            }
          },
          {
            "name": "invoice",
            "in": "query",
            "required": false,
            "description": "Only the calls billed on this invoice of ours to you, by its `id` in your invoice list. Not one of yours is a 422.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Search the source and destination numbers; a national number (07 …) matches too.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "endUser",
            "in": "query",
            "required": false,
            "description": "Only the calls on this end user's trunks, by its public number. A number that is not one of your end users is a 422, not an empty list.\n",
            "schema": {
              "type": "string",
              "example": "100042"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number to retrieve. Defaults to `1`. `page × perPage` may not exceed 10,000; use `cursor` beyond that. A value that is not a whole number of at least 1 is `422`.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Order by this field, `-` in front for descending, in place of newest call first. A sorted list has no cursor: `nextCursor` is `null`, and `sort` with `cursor` is `422`. An unknown field is `422`.",
            "schema": {
              "type": "string",
              "enum": [
                "setupTime",
                "-setupTime",
                "durationSeconds",
                "-durationSeconds",
                "cost",
                "-cost"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/UpdatedSince"
          },
          {
            "$ref": "#/components/parameters/CreatedFrom"
          },
          {
            "$ref": "#/components/parameters/CreatedTo"
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A paginated JSON object containing call detail records.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer",
                      "description": "Number of CDRs matching the query, counted no further than 10,000. Absent on a cursor page."
                    },
                    "totalIsBounded": {
                      "type": "boolean",
                      "description": "True when more than 10,000 records match, so `total` reads 10,000. Absent on a cursor page."
                    },
                    "page": {
                      "type": "integer",
                      "description": "The current page number. Absent on a cursor page."
                    },
                    "perPage": {
                      "type": "integer",
                      "description": "The number of records returned per page."
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as `cursor` for the next page; `null` when this is the last page, the page was not full, or the list was sorted."
                    },
                    "window": {
                      "type": "object",
                      "description": "The window the records were read over. `from` is null for an invoice with no `from`.",
                      "properties": {
                        "from": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "to": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Cdr"
                      }
                    }
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string",
                  "description": "Present only when `format=csv`. The full filtered result set as CSV — a header row followed by one row per call, with the same columns as a `results[]` item.\n"
                }
              },
              "application/x-ndjson": {
                "schema": {
                  "type": "string",
                  "description": "Present only when `format=ndjson`. The full filtered result set as newline-delimited JSON — one object per line, each identical to a `results[]` item.\n"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/voice/sessions": {
      "get": {
        "tags": [
          "Voice"
        ],
        "summary": "Get Active Call Sessions",
        "operationId": "get_voice_sessions",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nReturns the current number of active call sessions on your account. This is useful for real-time capacity monitoring and integrations that need to track concurrent call usage.\n\nThe count is the calls the platform is rating on your account right now, across every trunk. If the count cannot be read the endpoint returns `503` rather than a misleading `0`.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A JSON object containing the current active call count.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "activeCalls": {
                          "type": "integer",
                          "description": "The number of currently active call sessions across your account.",
                          "example": 3
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotInSandbox"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/sms": {
      "get": {
        "tags": [
          "SMS"
        ],
        "summary": "List SMS Messages",
        "operationId": "list_sms",
        "security": [
          {
            "OAuth2": [
              "sms:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** sms:read\n\nEvery SMS on your account, newest first — sent and received, whatever\nsender it went out from.\n\nThis is the endpoint to use when you want your account's traffic rather\nthan one number's. It also covers senders that `GET /sms/{number}` cannot\nreach on their own. To follow one message you sent, read\n`GET /sms/messages/{messageId}` (the `Location` of the send).\n\nFilter by `direction`, a `from`/`to` range on when the message was sent,\na `q` search over the numbers and the text, and `status`. For a large pull,\n`format=csv` or `format=ndjson` streams every match as one download.\n\nTo walk every message while new ones arrive, follow `nextCursor`: pass it\nback as `cursor` until it is `null`. A cursor page carries `perPage`,\n`nextCursor` and `results` only.\n\nReads of message content are audited, an export once with its filters and\ncount, never the text.\n",
        "parameters": [
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "inbound",
                  "outbound"
                ]
              }
            },
            "description": "(Optional) Limit to messages sent or received. Case does not matter; any other value is `422`."
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Order by this field, `-` in front for descending, in place of newest first. A sorted list has no cursor (`nextCursor` is `null`). An unknown field is `422`.",
            "schema": {
              "type": "string",
              "enum": [
                "sentAt",
                "-sentAt"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/SmsFrom"
          },
          {
            "$ref": "#/components/parameters/SmsTo"
          },
          {
            "$ref": "#/components/parameters/SmsSearch"
          },
          {
            "$ref": "#/components/parameters/SmsStatus"
          },
          {
            "$ref": "#/components/parameters/SmsExportFormat"
          },
          {
            "$ref": "#/components/parameters/UpdatedSince"
          },
          {
            "$ref": "#/components/parameters/CreatedFrom"
          },
          {
            "$ref": "#/components/parameters/CreatedTo"
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The account's messages.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "perPage",
                    "nextCursor",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer",
                      "description": "Messages matching the query. Absent on a cursor page."
                    },
                    "page": {
                      "type": "integer",
                      "description": "The page returned. Absent on a cursor page."
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as `cursor` for the next page; `null` on the last page, a page that was not full, or a sorted list."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique message ID."
                          },
                          "direction": {
                            "type": "string",
                            "enum": [
                              "inbound",
                              "outbound"
                            ]
                          },
                          "from": {
                            "type": "string"
                          },
                          "to": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "delivered",
                              "failed",
                              "pending"
                            ]
                          },
                          "statusReason": {
                            "type": "string",
                            "description": "Present only where the status alone is ambiguous.",
                            "example": "Held for review before sending."
                          },
                          "sentAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "createdAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the message was recorded, in UTC."
                          },
                          "updatedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the message last changed (its status), in UTC."
                          }
                        }
                      }
                    }
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string",
                  "description": "Present only when `format=csv`: a header row, then one row per message (see `format`)."
                }
              },
              "application/x-ndjson": {
                "schema": {
                  "type": "string",
                  "description": "Present only when `format=ndjson`: one JSON object per line, with the same fields as a CSV row."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "SMS"
        ],
        "summary": "Send SMS",
        "operationId": "send_sms",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyDerived"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "sms:send"
            ]
          }
        ],
        "description": ">**Required Scope(s):** sms:send\n\nSend an SMS message from a sender on your account.\n\nThe `from` sender must be either a DID on your account that has SMS enabled (check via `GET /numbers` — the `smsEnabled` field), or another sender approved for your account (a number ported for SMS, or an alphanumeric Sender ID). Request approval for any other sender with `POST /sms/senders`. An unapproved sender is rejected with a `403` whose `code` is `sender_not_approved`.\n\n**A send is always idempotent.** At a flat rate-limit tier, a stuck client-side retry loop against an un-deduplicated send can bill and deliver the same message hundreds of times over. Send an `Idempotency-Key`, the mechanism in the Idempotency guide above, and a retry with the same key returns the original send's result instead of sending again. An integration that can't send the header may leave it out: a key is then made from the request and the current minute, so the same message from the same sender to the same number within that minute is sent once.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "from",
                  "to",
                  "message"
                ],
                "properties": {
                  "from": {
                    "type": "string",
                    "maxLength": 20,
                    "description": "The sender — an E.164 number that is an SMS-enabled DID on your account, or another sender (ported number or alphanumeric Sender ID) approved for your account.",
                    "example": "61485907777"
                  },
                  "to": {
                    "type": "string",
                    "maxLength": 20,
                    "description": "The recipient number in E.164 format.",
                    "example": "61412345678"
                  },
                  "message": {
                    "type": "string",
                    "maxLength": 1600,
                    "description": "The body of the SMS message, up to 1600 characters. A longer body is rejected with `422` — that ceiling has always been enforced and was simply never published (#3102). A message over one segment is sent and billed as several: 160 characters per segment in plain GSM text, or 70 if it contains any character outside that set (emoji, most accented letters), and one fewer per segment once the message is long enough to be concatenated.",
                    "example": "Hello from Check Networks!"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "x-summary": "Accepted",
            "description": "Accepted for delivery. The message has been submitted and is awaiting a delivery receipt — it is **not** delivered yet, which is why this is `202` rather than `201`.\n\nA `statusReason` of \"Held for review before sending\" means the message was additionally screened and will be sent once it clears. Either way the message is accepted: **do not retry**, because a retry creates a second message that will also be sent and billed.\n\nThe `Location` header names where to poll: the message itself, `GET /sms/messages/{messageId}`. The message reaches `delivered`, or `failed` if it is rejected or not released.",
            "headers": {
              "Location": {
                "description": "Where to poll for this message's outcome (`/sms/messages/{messageId}`).",
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "messageId": {
                          "type": "string",
                          "description": "A unique identifier for the message."
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending"
                          ]
                        },
                        "statusReason": {
                          "type": "string",
                          "description": "Present when the message needs more than \"pending\" to explain it — most often that it is held for review.",
                          "example": "Held for review before sending."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotInSandbox"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/sms/{number}": {
      "parameters": [
        {
          "name": "number",
          "in": "path",
          "required": true,
          "description": "The E.164 DID phone number to retrieve SMS history for (must be on your account).",
          "schema": {
            "type": "string"
          },
          "example": "61299999999"
        }
      ],
      "get": {
        "tags": [
          "SMS"
        ],
        "summary": "Get SMS History for Number",
        "operationId": "get_sms_history",
        "security": [
          {
            "OAuth2": [
              "sms:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** sms:read\n\nReturns the SMS message history (inbound and outbound) for a DID phone number on your account.\n\nResults are returned in reverse chronological order (newest first). To\nwalk every message while new ones arrive, follow `nextCursor`: pass it\nback as `cursor` until it is `null`. A cursor page carries `perPage`,\n`nextCursor` and `results` only.\n\nThe filters and the `format` export are those of `GET /sms`, within this\nnumber's messages.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/SmsFrom"
          },
          {
            "$ref": "#/components/parameters/SmsTo"
          },
          {
            "$ref": "#/components/parameters/SmsSearch"
          },
          {
            "$ref": "#/components/parameters/SmsStatus"
          },
          {
            "$ref": "#/components/parameters/SmsExportFormat"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "description": "Filter by message direction. Case does not matter; any other value is `422`.",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "inbound",
                  "outbound"
                ]
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Order by this field, `-` in front for descending, in place of newest first. A sorted list has no cursor (`nextCursor` is `null`). An unknown field is `422`.",
            "schema": {
              "type": "string",
              "enum": [
                "sentAt",
                "-sentAt"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/UpdatedSince"
          },
          {
            "$ref": "#/components/parameters/CreatedFrom"
          },
          {
            "$ref": "#/components/parameters/CreatedTo"
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A paginated JSON object containing SMS messages.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "perPage",
                    "nextCursor",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer",
                      "description": "Messages matching the query. Absent on a cursor page."
                    },
                    "page": {
                      "type": "integer",
                      "description": "The page returned. Absent on a cursor page."
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as `cursor` for the next page; `null` on the last page, a page that was not full, or a sorted list."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique message ID."
                          },
                          "direction": {
                            "type": "string",
                            "enum": [
                              "inbound",
                              "outbound"
                            ]
                          },
                          "from": {
                            "type": "string",
                            "description": "Sender number in E.164 format."
                          },
                          "to": {
                            "type": "string",
                            "description": "Recipient number in E.164 format."
                          },
                          "message": {
                            "type": "string",
                            "description": "The message body."
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "delivered",
                              "failed",
                              "pending"
                            ],
                            "description": "`delivered` and `failed` are final. `pending` means the message may still move — queued, awaiting a delivery receipt, or held for review; `statusReason` says which."
                          },
                          "statusReason": {
                            "type": "string",
                            "description": "Present only where the status alone is ambiguous — most usefully to tell a message held for review before sending from one merely in flight.",
                            "example": "Held for review before sending."
                          },
                          "sentAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "createdAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the message was recorded, in UTC."
                          },
                          "updatedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the message last changed (its status), in UTC."
                          }
                        }
                      }
                    }
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string",
                  "description": "Present only when `format=csv`: a header row, then one row per message (see `format`)."
                }
              },
              "application/x-ndjson": {
                "schema": {
                  "type": "string",
                  "description": "Present only when `format=ndjson`: one JSON object per line, with the same fields as a CSV row."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/outages": {
      "get": {
        "summary": "List Outages affecting your Services",
        "description": ">**Required Scope(s):** account:read\n\nCheck Networks outages affecting services on your account, as published on\nour outage register under the Telecommunications (Customer Communications\nfor Outages) Industry Standard 2024, with the planned maintenance windows\nyou were sent notice of. Unplanned outages come first, newest first, then\nplanned windows by start time. Paged like every list: `total`, `page`,\n`perPage` and `results`.\n\nAn outage is included when it covers the service address of at least one\nlive service on your account — including services you have attributed to\nyour own end users. This is the same matching that decides who we\nnotify, so this endpoint will not disagree with the outage notifications\nwe send you. Each unplanned outage names which of your services it hit\n(`yourAffectedServices`), and the end user each belongs to, so you can\ntell them without matching addresses yourself.\n\nOnly published register entries are returned.\n\nEvery time is UTC, as everywhere in the API; `timezone` names the affected\narea's zone, for showing the times locally.\n\n`q` searches the reference, title, affected suburbs and postcodes.\n\nThis is distinct from the carrier outage endpoints (`/nbn/outage/...`,\n`/opticomm/outage/...`), which report a single carrier's view of a single\ncarrier reference. Use this endpoint for \"what is affecting my services\",\nand those for carrier-specific detail.\n\nThe full public register — including outages that do not affect your\nservices — is available without authentication at\n<https://status.checknetworks.tools>.\n",
        "operationId": "get_outages",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "open",
                  "resolved",
                  "all"
                ]
              },
              "default": [
                "open"
              ]
            },
            "description": "`open` (the default) returns only outages still in progress, `resolved` the resolved ones still within the register's retention period, and `all` both. Several, comma-separated; case does not matter. Any other value is `422`."
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "planned",
                  "unplanned"
                ]
              }
            },
            "description": "Only planned maintenance, or only unplanned outages. Both by default. Any other value is `422`."
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Order by this field, `-` in front for descending. An unknown field is `422`.",
            "schema": {
              "type": "string",
              "enum": [
                "startedAt",
                "-startedAt",
                "estimatedRestorationAt",
                "-estimatedRestorationAt",
                "firstPublishedAt",
                "-firstPublishedAt"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Q"
          },
          {
            "$ref": "#/components/parameters/UpdatedSince"
          },
          {
            "$ref": "#/components/parameters/CreatedFrom"
          },
          {
            "$ref": "#/components/parameters/CreatedTo"
          },
          {
            "name": "endUser",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "100042"
            },
            "description": "Only the outages that reach this end user's services, by its public number. Planned maintenance is noticed to you, not to an end user, so a list filtered by end user holds no planned windows. A number that is not one of your end users is a 422, not an empty list."
          }
        ],
        "security": [
          {
            "OAuth2": [
              "account:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NetworkOutages"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Network Outages"
        ]
      }
    },
    "/tickets": {
      "get": {
        "summary": "List Support Tickets",
        "description": "Lists your account's support tickets, newest first. `sort=-lastActivityAt`\ngives the portal's order, most recent activity first.\n\nTo walk every ticket while new ones are raised, follow `nextCursor`: pass\nit back as `cursor` until it is `null`. A cursor page carries `perPage`,\n`nextCursor` and `results` only. `q` searches the reference and subject.\n`createdFrom` and `createdTo` bound the list by when tickets were raised;\n`GET /tickets/summary` gives the figures over a range.\n",
        "operationId": "get_tickets",
        "security": [
          {
            "OAuth2": [
              "tickets:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "open",
                  "pending",
                  "resolved",
                  "closed"
                ]
              }
            },
            "description": "The statuses a ticket shows, one or several, comma-separated (`status=open,pending` is the portal's open group). Case does not matter. Any other value is `422`."
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": false,
            "description": "One or several categories, comma-separated. Any other value is `422`.",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/TicketCategory"
              }
            }
          },
          {
            "name": "endUser",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "100042"
            },
            "description": "Only the tickets about this end user, by its public number. A number that is not one of your end users is a 422, not an empty list."
          },
          {
            "name": "isComplaint",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "description": "`true` lists only complaints, `false` only the tickets that are not. Any other value is `422`."
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Order by this field, `-` in front for descending, in place of newest first. `status` orders as the portal does (open, pending, resolved, closed) and `priority` from low to urgent. A sorted list has no cursor (`nextCursor` is `null`). An unknown field is `422`.",
            "schema": {
              "type": "string",
              "enum": [
                "createdAt",
                "-createdAt",
                "lastActivityAt",
                "-lastActivityAt",
                "reference",
                "-reference",
                "status",
                "-status",
                "priority",
                "-priority"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Q"
          },
          {
            "$ref": "#/components/parameters/ExternalRef"
          },
          {
            "$ref": "#/components/parameters/UpdatedSince"
          },
          {
            "$ref": "#/components/parameters/CreatedFrom"
          },
          {
            "$ref": "#/components/parameters/CreatedTo"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "perPage",
                    "nextCursor",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer",
                      "description": "Tickets matching the query. Absent on a cursor page."
                    },
                    "page": {
                      "type": "integer",
                      "description": "The page returned. Absent on a cursor page."
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as `cursor` for the next page; `null` on the last page, a page that was not full, or a sorted list."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TicketSummary"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Support Tickets"
        ]
      },
      "post": {
        "summary": "Raise a Support Ticket",
        "description": "Opens a new support ticket on your account with its first message.\nThe response includes the ticket's `reference` (`INC-XXXXXX`), which\naddresses the ticket in all other endpoints.\n",
        "operationId": "post_tickets",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "tickets:create"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TicketCreateRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/TicketCreateRequest"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "attachments": {
                        "type": "array",
                        "maxItems": 10,
                        "description": "Files to attach to the opening message. Allowed types are PNG, JPEG, GIF and WebP images, PDF, plain text, CSV, ZIP, and Word (.doc, .docx) and Excel (.xls, .xlsx) files; the per-file size limit is 10 MB.",
                        "items": {
                          "type": "string",
                          "format": "binary"
                        }
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/Ticket"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Support Tickets"
        ]
      }
    },
    "/tickets/{ticketRef}": {
      "parameters": [
        {
          "name": "ticketRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The public ticket reference, e.g. `INC-7K3F9Q`."
        }
      ],
      "get": {
        "summary": "Get a Support Ticket",
        "description": "Returns the ticket with its public conversation thread, oldest\nmessage first. Internal Check Networks notes are never included.\n",
        "operationId": "get_ticket",
        "security": [
          {
            "OAuth2": [
              "tickets:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/Ticket"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Support Tickets"
        ]
      },
      "patch": {
        "summary": "Update a Support Ticket",
        "description": "Self-service status change: mark your ticket `resolved`, or set it\nback to `open` to re-open a resolved ticket. Tickets are closed by\nCheck Networks; there is no customer delete.\n\nRead `canResolve` and `canReopen` on the ticket first. A resolve the\nticket's `resolveBlockedReason` refuses answers 422 with that reason's\n`code` (`ticket_not_open`).\n\nResolving a complaint records its outcome: `complaintOutcome`, default\n`resolved`. `closed_no_further_action` is recorded by Check Networks only.\n\n`comment` is posted as a public reply before the status changes, in\nthe same step.\n",
        "operationId": "patch_ticket",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "tickets:update"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "`status`, or `externalRef` and `metadata` alone to change only your own reference on the ticket.",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "resolved",
                      "open"
                    ],
                    "description": "Required unless the request sends `externalRef` or `metadata`."
                  },
                  "externalRef": {
                    "$ref": "#/components/schemas/ExternalRef"
                  },
                  "metadata": {
                    "$ref": "#/components/schemas/MetadataInput"
                  },
                  "complaintOutcome": {
                    "type": "string",
                    "enum": [
                      "resolved",
                      "withdrawn",
                      "unresolved"
                    ],
                    "description": "The outcome recorded when resolving a complaint. Default `resolved`; ignored for other tickets."
                  },
                  "comment": {
                    "type": "string",
                    "maxLength": 20000,
                    "description": "A public reply posted with the status change."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/Ticket"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Support Tickets"
        ]
      }
    },
    "/tickets/{ticketRef}/messages": {
      "parameters": [
        {
          "name": "ticketRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The public ticket reference, e.g. `INC-7K3F9Q`."
        }
      ],
      "post": {
        "summary": "Reply to a Support Ticket",
        "description": "Appends a reply to the ticket's conversation thread. Replying to a\nresolved or closed ticket automatically re-opens it. To attach files,\nsend `multipart/form-data` with an `attachments[]` field. `body` is\nrequired unless `attachments[]` is sent: a reply may be just a file,\nsuch as a screenshot or a log.\n",
        "operationId": "post_ticket_message",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "tickets:update"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "body"
                ],
                "properties": {
                  "body": {
                    "type": "string",
                    "maxLength": 20000,
                    "description": "The reply, as Markdown."
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {
                    "type": "string",
                    "maxLength": 20000,
                    "description": "The reply, as Markdown. Required unless `attachments[]` is sent; a reply may be files alone."
                  },
                  "attachments": {
                    "type": "array",
                    "maxItems": 10,
                    "description": "Files to attach to the reply. Allowed types are common image, document and archive formats; the per-file size limit is 10 MB.",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/TicketMessage"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Support Tickets"
        ]
      }
    },
    "/tickets/{ticketRef}/attachments/{attachmentId}": {
      "parameters": [
        {
          "name": "ticketRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The public ticket reference, e.g. `INC-7K3F9Q`."
        },
        {
          "name": "attachmentId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "description": "The attachment `id` from the message's `attachments` metadata."
        }
      ],
      "get": {
        "summary": "Download a Ticket Attachment",
        "description": "Streams the attachment's content. The response's `Content-Type` is the\nfile's stored MIME type; images are served inline, other files as a\ndownload (`Content-Disposition`). Only attachments on the ticket's\npublic messages are available.\n",
        "operationId": "get_ticket_attachment",
        "security": [
          {
            "OAuth2": [
              "tickets:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Support Tickets"
        ]
      }
    },
    "/tickets/{ticketRef}/csat": {
      "parameters": [
        {
          "name": "ticketRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The public ticket reference, e.g. `INC-7K3F9Q`."
        }
      ],
      "post": {
        "summary": "Rate a Support Ticket",
        "description": "Submits a satisfaction rating for a resolved or closed ticket. A\nticket can be rated once; a `409` is returned if it is still open\nor has already been rated.\n",
        "operationId": "post_ticket_csat",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "tickets:update"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "rating"
                ],
                "properties": {
                  "rating": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 5
                  },
                  "comment": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/Ticket"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Support Tickets"
        ]
      }
    },
    "/tickets/summary": {
      "get": {
        "summary": "Summarise Support Tickets",
        "description": "The figures the portal's Support Reports page shows, over the tickets\nraised in a date range: counts by status, priority and category, volume\nby month, how often the first response and the resolution met their\ntargets, the average response and resolution times, and satisfaction.\nWithout `from` and `to` the range is the last 90 days to today. The days\nare calendar days in your account's time zone (Australia/Brisbane unless\nyou set another), and months in `volumeByMonth` are too. A\nsafety-sensitive complaint is in none of the figures, as it is in no\nticket list. `GET /tickets/export` gives the rows behind them.\n",
        "operationId": "get_tickets_summary",
        "security": [
          {
            "OAuth2": [
              "tickets:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "The first day of the range, `YYYY-MM-DD`, in your account's time zone. Defaults to 90 days ago."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "The last day of the range, included, `YYYY-MM-DD`, in your account's time zone. Defaults to today there. Before `from` is `422`."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/TicketsSummary"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Support Tickets"
        ]
      }
    },
    "/tickets/export": {
      "get": {
        "summary": "Export Support Tickets",
        "description": "The rows behind `GET /tickets/summary`, as the CSV the portal's Support\nReports page downloads: one row per ticket raised in the range, oldest\nfirst, with the columns `reference`, `subject`, `status`, `priority`,\n`category`, `is_complaint`, `created_utc`, `first_response_utc`,\n`first_response_due_utc`, `resolved_utc`, `resolution_due_utc`,\n`closed_utc` and `csat_rating`. Times are ISO 8601. A cell that would\nopen as a spreadsheet formula starts with `'`. Without `from` and `to`\nthe range is the last 90 days to today. The days are calendar days in\nyour account's time zone (Australia/Brisbane unless you set another).\n",
        "operationId": "get_tickets_export",
        "security": [
          {
            "OAuth2": [
              "tickets:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "The first day of the range, `YYYY-MM-DD`, in your account's time zone. Defaults to 90 days ago."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "The last day of the range, included, `YYYY-MM-DD`, in your account's time zone. Defaults to today there. Before `from` is `422`."
          }
        ],
        "responses": {
          "200": {
            "description": "The CSV, as a download.",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Support Tickets"
        ]
      }
    },
    "/tickets/{ticketRef}/complaint": {
      "parameters": [
        {
          "name": "ticketRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The public ticket reference, e.g. `INC-7K3F9Q`."
        }
      ],
      "post": {
        "summary": "Mark a Ticket as a Complaint",
        "description": "Marks the ticket a complaint, as the portal's ticket page does. The\ncomplaint's deadlines start from when the ticket's first message\narrived and show on the ticket's `complaint`; the acknowledgement is\nsent to the consumer. Marking a complaint again changes nothing and\nanswers the ticket as it stands. A network outage complaint, which our\nstaff handle on its own track, is `409`. A safety-sensitive complaint is\n`404`, as on every ticket call. The audit log names the API key.\n",
        "operationId": "post_ticket_complaint",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "tickets:update"
            ]
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "urgent": {
                    "type": "boolean",
                    "default": false,
                    "description": "An urgent complaint, with the shorter resolution deadline."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/TicketResult"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Support Tickets"
        ]
      },
      "patch": {
        "summary": "Change a Complaint's Urgency",
        "description": "Sets or clears the complaint's urgency, which moves its resolution\ndeadline. A ticket that is not a complaint is `409`.\n",
        "operationId": "patch_ticket_complaint",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "tickets:update"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "urgent"
                ],
                "properties": {
                  "urgent": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/TicketResult"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Support Tickets"
        ]
      },
      "delete": {
        "summary": "Unmark a Complaint",
        "description": "The ticket was not a complaint after all: removes the complaint and its\ndeadlines and any TIO case logged on it. The ticket itself stays. A\nticket that is not a complaint is `409`.\n",
        "operationId": "delete_ticket_complaint",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "tickets:update"
            ]
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/TicketResult"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Support Tickets"
        ]
      }
    },
    "/tickets/{ticketRef}/complaint/acknowledge": {
      "parameters": [
        {
          "name": "ticketRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The public ticket reference, e.g. `INC-7K3F9Q`."
        }
      ],
      "post": {
        "summary": "Acknowledge a Complaint",
        "description": "Records that the complaint was acknowledged to the consumer, for one\nacknowledged another way (by phone, say), and sends the acknowledgement\nagain. The first acknowledgement's time stays as `acknowledgedAt`. A\nticket that is not a complaint is `409`.\n",
        "operationId": "post_ticket_complaint_acknowledge",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "tickets:update"
            ]
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/TicketResult"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Support Tickets"
        ]
      }
    },
    "/tickets/{ticketRef}/complaint/tio": {
      "parameters": [
        {
          "name": "ticketRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The public ticket reference, e.g. `INC-7K3F9Q`."
        }
      ],
      "post": {
        "summary": "Log a TIO Case on a Complaint",
        "description": "The consumer took the complaint to the Telecommunications Industry\nOmbudsman. Records the TIO's case reference and starts the deadline to\nrespond to the TIO, shown as `complaint.tioDueAt`: fewer working days\nfor an urgent complaint. A ticket not yet a complaint is marked one\nfirst, as in the portal. Logging the case again updates the reference\nand leaves the deadline where it is. A network outage complaint is `409`.\n",
        "operationId": "post_ticket_complaint_tio",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "tickets:update"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "reference"
                ],
                "properties": {
                  "reference": {
                    "type": "string",
                    "maxLength": 64,
                    "description": "The TIO's case reference.",
                    "example": "TIO-2026-00123"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/TicketResult"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Support Tickets"
        ]
      }
    },
    "/tickets/{ticketRef}/escalate": {
      "parameters": [
        {
          "name": "ticketRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The public ticket reference, e.g. `INC-7K3F9Q`."
        }
      ],
      "post": {
        "summary": "Escalate a Ticket",
        "description": ">**Required Scope(s):** tickets:update\n\nAsks for more attention on one of your open tickets, with your reason.\nThe ticket's `priority` goes up one level (`low` to `normal`, `normal` to\n`high`, `high` to `urgent`; an `urgent` ticket stays `urgent`), with its\nresponse targets worked out again for the new priority. The engineer\nlooking after it, or our support team if no one is yet, is emailed; our\nstaff see it flagged on their ticket list with the reason; and it is\nadded to the thread. The ticket read shows the latest as `escalation`.\nEscalating again replaces the reason there and raises the priority\nagain; each one stays on the thread. A resolved or closed ticket is\n`409`: re-open it first.\n",
        "operationId": "post_ticket_escalate",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "tickets:update"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "reason"
                ],
                "properties": {
                  "reason": {
                    "type": "string",
                    "maxLength": 2000,
                    "description": "Why the ticket needs more attention.",
                    "example": "The end user's business has been offline for two days."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/TicketResult"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Support Tickets"
        ]
      }
    },
    "/outages/subscriptions": {
      "get": {
        "summary": "List Outage Notice Subscriptions",
        "description": ">**Required Scope(s):** account:read\n\nThe email addresses and mobiles your keys have subscribed to our outage\nnotices, newest first, pending or active. An address someone signed up on\nthe public status page, or another account subscribed, is never listed.\n",
        "operationId": "get_outage_subscriptions",
        "security": [
          {
            "OAuth2": [
              "account:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "total",
                    "page",
                    "perPage",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/OutageSubscription"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Network Outages"
        ]
      },
      "post": {
        "summary": "Subscribe an Address to Outage Notices",
        "description": ">**Required Scope(s):** account:update\n\nSubscribes a team mailbox or an on-call mobile to our outage notices, as\nthe sign-up on the public status page does. The person is sent a link to\nconfirm, by email or by text, and the subscription stays `pending` until\nthey follow it: notices start only then. Asking again for a pending\naddress sends a new link once 5 minutes have passed since the last one;\na mobile is sent at most 3 links, after which subscribe it by email.\n\nThe subscription is your account's own, with its own confirmation: an\naddress also signed up on the public status page, or by another account,\nis confirmed again for your list, and theirs is left as it is. Someone on\nmore than one list is sent each notice once. Stop yours with\n`DELETE /outages/subscriptions/{id}`, which leaves the address's other\nlists as they are. The unsubscribe link in a notice is the person's own\nchoice, and stops every status notice to the address: the public list,\nyours and every other account's. Their subscription then leaves\n`GET /outages/subscriptions`, as one you removed does.\n",
        "operationId": "post_outage_subscription",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "account:update"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "channel",
                  "address",
                  "scope"
                ],
                "properties": {
                  "channel": {
                    "type": "string",
                    "enum": [
                      "email",
                      "sms"
                    ]
                  },
                  "address": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "An email address for `email`; an Australian mobile for `sms`, in any common format.",
                    "example": "0412 345 678"
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "all",
                      "data",
                      "voice",
                      "mobile"
                    ],
                    "description": "Which outages to be told of."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted. The subscription waits for the person to confirm it.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/OutageSubscription"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotInSandbox"
          }
        },
        "tags": [
          "Network Outages"
        ]
      }
    },
    "/outages/subscriptions/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "description": "The subscription's id, as `GET /outages/subscriptions` returns it."
        }
      ],
      "delete": {
        "summary": "Remove an Outage Notice Subscription",
        "description": ">**Required Scope(s):** account:update\n\nStops our outage notices to one of your subscriptions, pending or\nactive, at once. One your keys did not subscribe is a 404, as an unknown\nid is.\n",
        "operationId": "delete_outage_subscription",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "account:update"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "Removed."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Network Outages"
        ]
      }
    },
    "/watch": {
      "get": {
        "tags": [
          "Watch"
        ],
        "summary": "List Watches",
        "operationId": "list_watches",
        "security": [
          {
            "OAuth2": [
              "watch:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** watch:read\n\nEverything your account is currently watching.\n\nRemoved watches are kept as `disabled` records rather than deleted; they\nare excluded by default. Pass `status=disabled` for them alone, or\n`status=all` for both. Newest first; `q` searches the reference and its\ntype.\n",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "The statuses a watch shows, `active` (the default) or `disabled`, one or both comma-separated, or `all`. Case does not matter. Any other value is `422`.",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "active",
                  "disabled",
                  "all"
                ]
              },
              "default": [
                "active"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Order by this field, `-` in front for descending. An unknown field is `422`.",
            "schema": {
              "type": "string",
              "enum": [
                "createdAt",
                "-createdAt",
                "lastNotifiedAt",
                "-lastNotifiedAt",
                "reference",
                "-reference"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Q"
          },
          {
            "$ref": "#/components/parameters/UpdatedSince"
          },
          {
            "$ref": "#/components/parameters/CreatedFrom"
          },
          {
            "$ref": "#/components/parameters/CreatedTo"
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The account's watches.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "total",
                    "page",
                    "perPage",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Watch"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Watch"
        ],
        "summary": "Create Watch",
        "operationId": "create_watch",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "watch:create"
            ]
          }
        ],
        "description": ">**Required Scope(s):** watch:create\n\nStart watching a reference. We email every address on the watch as updates\narrive — **one email per event**, never a batched digest, and never twice\nfor the same event.\n\n### One watch per reference\n\nPosting a reference you already watch **replaces** that watch's addresses\nrather than creating a second one, and re-enables it if it had been\nremoved. The call is therefore safe to repeat. It answers `201` when it\ncreated a watch and `200` when it replaced one. To change a watch you\nalready hold, `PATCH /watch/{watchId}` is the direct way.\n\nAn account can have at most 250 active watches.\n\n### Where the emails go\n\n`emails` is optional. Omit it and we use your account's default\nnotification address — which is what an integration usually wants, since\nan API client has no address of its own. If your account has no default\nnotification address set and you omit `emails`, the request is rejected\nrather than creating a watch that could never deliver anything.\n\n### Which updates you get\n\n`eventTypes` is optional. Omit it — or send `null` — and you are told about\neverything, which is the default. Send a list to narrow it down;\n`GET /watch/event-types` returns the values you can use, with the labels\nthat appear in the emails.\n\nLike `emails`, the list **replaces** what the watch had rather than adding\nto it, so re-posting without `eventTypes` puts a watch back to every event.\n\n### What you may watch\n\nFour kinds of thing, all through this one field — we work out which from\nthe reference, and tell you in `referenceType` on the response:\n\n* an **order**, by the carrier's reference or ours;\n* a technician **appointment**, by its carrier reference;\n* a **service**, by its carrier service id or a trunk's SIP username;\n* an **outage**, by its register reference.\n\nThe reference must belong to your account. Anything else returns `404`,\nincluding a reference that exists on another account — so a `404` here\nnever confirms whether something exists.\n\nAn outage counts as yours when it affects services you hold, decided the\nsame way `GET /outages` decides what to show you: you can watch exactly the\noutages you can already read, and no others.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "reference"
                ],
                "properties": {
                  "reference": {
                    "type": "string",
                    "maxLength": 64,
                    "description": "What to watch: an order (the carrier's reference or ours — both work), an appointment, a service, or an outage. See \"What you may watch\" above.",
                    "example": "OPO000000230683"
                  },
                  "emails": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 10,
                    "description": "Where to send notifications. Omit to use your account's default notification address.",
                    "items": {
                      "type": "string",
                      "format": "email",
                      "maxLength": 255
                    },
                    "example": [
                      "noc@example.com"
                    ]
                  },
                  "eventTypes": {
                    "anyOf": [
                      {
                        "type": "array",
                        "minItems": 1,
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Which updates to send. Omit or null for every update. See `GET /watch/event-types` for the accepted values.",
                    "example": [
                      "order_completed",
                      "appointment_required"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The watch already on this reference, replaced.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/Watch"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "x-summary": "Created",
            "description": "The new watch.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/Watch"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/watch/event-types": {
      "get": {
        "tags": [
          "Watch"
        ],
        "summary": "List Watchable Event Types",
        "operationId": "list_watch_event_types",
        "security": [
          {
            "OAuth2": [
              "watch:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** watch:read\n\nThe values `eventTypes` accepts when creating a watch, with the labels that\nappear in the notification emails.\n\nFetch this rather than hardcoding a list — it grows as we support more of\nwhat the carriers send, and a value that is not on it is rejected.\n\n### Each event names what it applies to\n\nWhich events exist depends on the kind of thing the watch is on, so each\nitem carries a `referenceType`, the same value the watch itself reports\nback to you. The items are in the shape `GET /webhooks/event-types` uses.\nAn order's events are the carrier's own, finer-grained\nlifecycle; an appointment, a service and an outage each carry the events\nthe corresponding webhook carries, spelled identically, so the emailed and\nthe pushed version of one happening never go by two different names.\n\nYou do not have to match the `referenceType` yourself: send whatever you want to hear\nabout, and anything that cannot happen to that reference simply never\nfires.\n\nNot everything we record is offered here. Telemetry and internal\nbookkeeping events are excluded because they say nothing about the progress\nof what you are watching.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The subscribable event types, each with the kind of reference it applies to; within a kind, in lifecycle order.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EventTypeItem"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/watch/{watchId}": {
      "parameters": [
        {
          "name": "watchId",
          "in": "path",
          "required": true,
          "description": "The watch's identifier, as returned when it was created.",
          "schema": {
            "type": "string"
          },
          "example": "01J9ZC8Q6H0000000000000000"
        }
      ],
      "get": {
        "tags": [
          "Watch"
        ],
        "summary": "Get Watch",
        "operationId": "get_watch",
        "security": [
          {
            "OAuth2": [
              "watch:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** watch:read\n\nA single watch on your account.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The watch.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/Watch"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "Watch"
        ],
        "summary": "Update Watch",
        "operationId": "update_watch",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "watch:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** watch:update\n\nChange where a watch's emails go, or which updates it sends. Only the\nfields you send change; the reference and whether the watch is active stay\nas they are. Each field you send **replaces** what the watch had: send\n`eventTypes: null` to go back to every update.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "emails": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 10,
                    "description": "Where to send notifications.",
                    "items": {
                      "type": "string",
                      "format": "email",
                      "maxLength": 255
                    },
                    "example": [
                      "noc@example.com"
                    ]
                  },
                  "eventTypes": {
                    "anyOf": [
                      {
                        "type": "array",
                        "minItems": 1,
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Which updates to send, or null for every update. See `GET /watch/event-types` for the accepted values.",
                    "example": [
                      "order_completed"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The updated watch.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/Watch"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Watch"
        ],
        "summary": "Remove Watch",
        "operationId": "delete_watch",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "watch:delete"
            ]
          }
        ],
        "description": ">**Required Scope(s):** watch:delete\n\nStop watching. No further emails are sent.\n\nThe watch is marked `disabled` rather than erased, so it still appears\nunder `GET /watch?status=all` and creating a watch on the same reference\nagain re-enables this one.\n",
        "responses": {
          "204": {
            "x-summary": "No Content",
            "description": "The watch is disabled. The response has no body."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/webhooks": {
      "get": {
        "summary": "List Webhook Endpoints",
        "description": "Lists your account's registered webhook endpoints, oldest first, paged like every list. `q` searches the URL.",
        "operationId": "get_webhooks",
        "security": [
          {
            "OAuth2": [
              "webhooks:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Order by this field, `-` in front for descending. An unknown field is `422`.",
            "schema": {
              "type": "string",
              "enum": [
                "url",
                "-url",
                "createdAt",
                "-createdAt"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Q"
          },
          {
            "$ref": "#/components/parameters/UpdatedSince"
          },
          {
            "$ref": "#/components/parameters/CreatedFrom"
          },
          {
            "$ref": "#/components/parameters/CreatedTo"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "total",
                    "page",
                    "perPage",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WebhookSubscription"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Webhooks"
        ]
      },
      "post": {
        "summary": "Register a Webhook Endpoint",
        "description": "Registers an HTTPS endpoint to receive event notifications. The\nresponse includes the endpoint's `secret` **once** — store it; it is\nnot readable afterwards (it can be rotated via PATCH). The secret is\nthe HMAC key for the `X-CN-Signature` body signature on every\ndelivery. It is never sent itself: check the signature, not a header.\n\nEndpoint URLs must use `https` on port 443 or 8443, carry no username\nor password, and name a host that already resolves to a public address\nwhen you register it (a private, loopback or link-local address, or a\nname that does not resolve, is refused with `422`). An account can\nregister at most 25 endpoints.\n\nA URL the account already has is a `409` whose `error.existingWebhookId`\nnames the endpoint: change its events with `PATCH /webhooks/{webhookId}`,\nor get a new secret with `rotateSecret`. This is checked before the\n25-endpoint limit.\n",
        "operationId": "post_webhooks",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "webhooks:create"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url",
                  "events"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 2048,
                    "example": "https://example.com/hooks/checknetworks"
                  },
                  "events": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "$ref": "#/components/schemas/WebhookEventType"
                    }
                  },
                  "filters": {
                    "$ref": "#/components/schemas/WebhookFilters"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result",
                    "secret"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/WebhookSubscription"
                    },
                    "secret": {
                      "type": "string",
                      "description": "The endpoint's signing secret — shown only in this response.",
                      "example": "whsec_kJ8s..."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "The account already has an endpoint at this URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "status": 409,
                    "code": "conflict",
                    "reason": "This URL is already registered as webhook endpoint 12. Change its events with PATCH /webhooks/12, or get a new secret with rotateSecret.",
                    "existingWebhookId": "12"
                  }
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/webhooks/event-types": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List Webhook Event Types",
        "operationId": "list_webhook_event_types",
        "security": [
          {
            "OAuth2": [
              "webhooks:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** webhooks:read\n\nThe values `events` accepts when you register or update a webhook. `*`\nsubscribes to every event, including ones added later.\n\nFetch this rather than hardcoding a list: it grows as we add events, and a\nvalue that is not on it is rejected. `ping` is not listed because you never\nsubscribe to it; the test call sends it to any webhook.\n\nEach item has the shape `GET /watch/event-types` uses, with a label to show\na reader. `referenceType` is always null here.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The subscribable event types.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EventTypeItem"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/webhooks/{webhookId}": {
      "parameters": [
        {
          "name": "webhookId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "description": "The webhook endpoint's `id`."
        }
      ],
      "get": {
        "summary": "Get a Webhook Endpoint",
        "operationId": "get_webhook",
        "security": [
          {
            "OAuth2": [
              "webhooks:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/WebhookSubscription"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Webhooks"
        ]
      },
      "patch": {
        "summary": "Update a Webhook Endpoint",
        "description": "Change the URL or subscribed events, re-enable a disabled endpoint\n(`isActive: true` — resets the failure streak), or rotate the secret\n(`rotateSecret: true` — the new secret is returned once in this\nresponse).\n\n**Rotating without dropping a delivery.** The previous secret stays valid\nfor `rotationOverlapHours` (default `24`, at most `168` — 7 days; `0`\nends it at once). During that window every delivery's `X-CN-Signature`\ncarries two signatures, the new secret's first:\n`t=<timestamp>,v1=<new>,v1=<old>`. Accept a delivery if **any** `v1`\nmatches a secret you hold, so you can deploy the new secret whenever\nsuits within the window. `previousSecretExpiresAt` on the endpoint says\nwhen the old one stops. Once your receiver checks the new secret, send\n`endRotationOverlap: true` to stop the old one at once.\n\n`filters` replaces the endpoint's filters; empty lists remove them.\n\n`rotateSecret: true` REQUIRES an `Idempotency-Key` header (`400`\nwithout one) — rotation is not naturally idempotent, so a client retrying\na request whose response it never saw must not silently rotate a secret\nit never read. With the header set, a retry of the exact same request\nreplays the already-rotated secret instead of minting another one. An\nupdate that does not rotate the secret runs without the header too, but\nsend one on every update so a client never has to tell them apart.\n",
        "operationId": "patch_webhook",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "webhooks:update"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 2048,
                    "description": "Same rules as when registering — `https` on port 443 or 8443, no credentials in the URL, and a host that already resolves to a public address."
                  },
                  "events": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "$ref": "#/components/schemas/WebhookEventType"
                    }
                  },
                  "isActive": {
                    "type": "boolean"
                  },
                  "rotateSecret": {
                    "type": "boolean"
                  },
                  "rotationOverlapHours": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 168,
                    "default": 24,
                    "description": "With `rotateSecret`: how many hours the previous secret keeps signing deliveries alongside the new one."
                  },
                  "endRotationOverlap": {
                    "type": "boolean",
                    "description": "`true` once your receiver checks the new secret: the previous one stops signing deliveries now. Does nothing outside a rotation window."
                  },
                  "filters": {
                    "$ref": "#/components/schemas/WebhookFilters"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/WebhookSubscription"
                    },
                    "secret": {
                      "type": "string",
                      "description": "Present only when `rotateSecret` was true — shown once."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Webhooks"
        ]
      },
      "delete": {
        "summary": "Remove a Webhook Endpoint",
        "description": "Removes the endpoint. Pending deliveries settle without being sent; delivery history is retained.",
        "operationId": "delete_webhook",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "webhooks:delete"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "Removed"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/webhooks/{webhookId}/test": {
      "parameters": [
        {
          "name": "webhookId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "description": "The webhook endpoint's `id`."
        }
      ],
      "post": {
        "summary": "Test a Webhook Endpoint",
        "description": "Limit: 10 per minute for the account (webhook send), shared by test, redeliver, replay-dead and event re-send.\n\nQueues a `ping` event delivery to the endpoint (regardless of its\nsubscribed event list) so you can verify connectivity and\nauthentication. With an `eventType`, it queues a sample of that event\ninstead, in the event's own shape, so you can test your handler for it.\nEither way the delivery has `test: true` and its `data` describes\nnothing real. A `409` is returned if the endpoint is disabled, or\nalready holds 100 queued deliveries.\n",
        "operationId": "post_webhook_test",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "webhooks:update"
            ]
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "eventType": {
                    "type": "string",
                    "description": "The event to send a sample of. Any subscribable type except `*`. Leave it out for a `ping`.",
                    "example": "service.suspended"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Queued",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "eventId",
                        "status"
                      ],
                      "properties": {
                        "eventId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "eventType": {
                          "type": "string",
                          "example": "ping"
                        },
                        "status": {
                          "type": "string",
                          "example": "queued"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/webhooks/deliveries": {
      "get": {
        "summary": "List All Webhook Deliveries",
        "description": "Every delivery to every one of your endpoints, removed ones included, most\nrecent first. Each delivery's `webhookId` says which endpoint it went to.\nFilter to one with `endpoint`, and by the same fields as an endpoint's own\nlist. Paged like it too: by `page`, or by following `nextCursor` (pass it\nback as `cursor` until it is `null`); a cursor page carries `perPage`,\n`nextCursor` and `results` only. `q` searches the event type and event id.\n",
        "operationId": "get_all_webhook_deliveries",
        "security": [
          {
            "OAuth2": [
              "webhooks:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "endpoint",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Return only deliveries to this endpoint, by its `id`. Another account's endpoint, or anything that is not an endpoint id, matches nothing."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "queued",
                  "delivered",
                  "dead"
                ]
              }
            },
            "description": "Return only deliveries in these states, one or several, comma-separated. Case does not matter. Any other value is `422`."
          },
          {
            "name": "eventId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Return only the deliveries of this event."
          },
          {
            "name": "eventType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Return only deliveries of this event type (`ping` included). An unknown type is a `422`."
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "2026-11-20",
            "description": "Return only deliveries made at or after this time: an ISO 8601 date or date-time. A date alone means the start of that day, on your `CN-Time-Zone` calendar when you send one, UTC's otherwise."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "2026-11-20",
            "description": "Return only deliveries made at or before this time: an ISO 8601 date or date-time. A date alone includes the whole of that day, on your `CN-Time-Zone` calendar when you send one, UTC's otherwise. Not before `from`."
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Order by this field, `-` in front for descending, in place of newest first. A sorted list has no cursor (`nextCursor` is `null`). An unknown field is `422`.",
            "schema": {
              "type": "string",
              "enum": [
                "createdAt",
                "-createdAt",
                "lastAttemptAt",
                "-lastAttemptAt"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Q"
          },
          {
            "$ref": "#/components/parameters/UpdatedSince"
          },
          {
            "$ref": "#/components/parameters/CreatedFrom"
          },
          {
            "$ref": "#/components/parameters/CreatedTo"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "perPage",
                    "nextCursor",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer",
                      "description": "Deliveries matching the query. Absent on a cursor page."
                    },
                    "page": {
                      "type": "integer",
                      "description": "The page returned. Absent on a cursor page."
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as `cursor` for the next page; `null` on the last page, a page that was not full, or a sorted list."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WebhookDelivery"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/webhooks/{webhookId}/deliveries": {
      "parameters": [
        {
          "name": "webhookId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "description": "The webhook endpoint's `id`."
        }
      ],
      "get": {
        "summary": "List Webhook Deliveries",
        "description": "The endpoint's delivery history, most recent first — what we sent, when,\nwhat your endpoint answered, and why an attempt failed.\n\nUse it to answer \"did that event reach us?\" without raising a support\nticket. Filter to `dead` to see only what exhausted its retries — or\nwas never attempted: a `dead` delivery with `attempts: 0` is an event\nthat occurred while the endpoint was disabled. It was recorded, not\nsent; replay-dead after re-enabling delivers it.\n\nHistory is retained even after the endpoint is removed.\n\nTo walk the whole history while new deliveries are made, follow\n`nextCursor`: pass it back as `cursor` until it is `null`. A cursor page\ncarries `perPage`, `nextCursor` and `results` only. `q` searches the event\ntype and event id.\n",
        "operationId": "get_webhook_deliveries",
        "security": [
          {
            "OAuth2": [
              "webhooks:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "queued",
                  "delivered",
                  "dead"
                ]
              }
            },
            "description": "Return only deliveries in these states, one or several, comma-separated. Case does not matter. Any other value is `422`."
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Order by this field, `-` in front for descending, in place of newest first. A sorted list has no cursor (`nextCursor` is `null`). An unknown field is `422`.",
            "schema": {
              "type": "string",
              "enum": [
                "createdAt",
                "-createdAt",
                "lastAttemptAt",
                "-lastAttemptAt"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Q"
          },
          {
            "$ref": "#/components/parameters/UpdatedSince"
          },
          {
            "$ref": "#/components/parameters/CreatedFrom"
          },
          {
            "$ref": "#/components/parameters/CreatedTo"
          },
          {
            "name": "eventId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Return only the deliveries of this event, to answer \"did you send event X?\"."
          },
          {
            "name": "eventType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Return only deliveries of this event type (`ping` included). An unknown type is a `422`.",
            "example": "service.suspended"
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "2026-11-20",
            "description": "Return only deliveries made at or after this time: an ISO 8601 date or date-time. A date alone means the start of that day, on your `CN-Time-Zone` calendar when you send one, UTC's otherwise."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "2026-11-20",
            "description": "Return only deliveries made at or before this time: an ISO 8601 date or date-time. A date alone includes the whole of that day, on your `CN-Time-Zone` calendar when you send one, UTC's otherwise. Not before `from`."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "perPage",
                    "nextCursor",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer",
                      "description": "Deliveries matching the query. Absent on a cursor page."
                    },
                    "page": {
                      "type": "integer",
                      "description": "The page returned. Absent on a cursor page."
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as `cursor` for the next page; `null` on the last page, a page that was not full, or a sorted list."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WebhookDelivery"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/webhooks/{webhookId}/deliveries/{deliveryId}": {
      "parameters": [
        {
          "name": "webhookId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The webhook endpoint id."
        },
        {
          "name": "deliveryId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "description": "The delivery id."
        }
      ],
      "get": {
        "summary": "Get Webhook Delivery",
        "description": "One delivery: what we sent, when, and what your endpoint answered. A\ndelivery of another endpoint or another account is a `404`.\n",
        "operationId": "get_webhook_delivery",
        "security": [
          {
            "OAuth2": [
              "webhooks:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/WebhookDelivery"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/webhooks/{webhookId}/deliveries/{deliveryId}/redeliver": {
      "parameters": [
        {
          "name": "webhookId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "description": "The webhook endpoint's `id`."
        },
        {
          "name": "deliveryId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "description": "The delivery's `id`, from `GET /webhooks/{webhookId}/deliveries`."
        }
      ],
      "post": {
        "summary": "Redeliver a Webhook Event",
        "description": "Limit: 10 per minute for the account (webhook send), shared by test, redeliver, replay-dead and event re-send.\n\nSends a past event to the endpoint again.\n\nThe replay carries the **same `eventId`** as the original, so a handler\nthat de-duplicates on `eventId` — as the webhooks guide recommends — sees\nthe same event rather than a new one. It also carries the **original\n`occurredAt`** (when the event actually happened, not when it was\nreplayed) but gets its own, later `sequence` number, since delivering it\nagain is a new event in your endpoint's delivery order. It is recorded as\na new delivery with its own id; the original is left untouched, so the\nhistory stays a faithful record of what happened.\n\nAny settled delivery may be replayed, including one that was delivered\nsuccessfully — useful when your side acknowledged an event and then lost\nit. A delivery still `queued` cannot: its first attempt has not resolved\nyet, and a replay would race it (`409`).\n\nRedelivery is allowed even while the endpoint is currently disabled\n(auto-disabled after 20 consecutive failures) — that is precisely the\nstate the dead letters you are trying to recover are stuck in, and making\nyou re-enable the endpoint first would reset the failure count that is\nthe evidence of what went wrong.\n\nA delivery is replayed once. Redelivering one that was already replayed\nsends the newest replay of that event again, and is refused with `409`\nwhile that replay is still `queued`. It is also refused with `409` while\nthe endpoint holds 100 queued deliveries.\n",
        "operationId": "post_webhook_delivery_redeliver",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "webhooks:update"
            ]
          }
        ],
        "responses": {
          "202": {
            "description": "Queued",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/WebhookDelivery"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/webhooks/{webhookId}/deliveries/replay-dead": {
      "parameters": [
        {
          "name": "webhookId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "description": "The webhook endpoint's `id`."
        }
      ],
      "post": {
        "summary": "Replay Dead Webhook Deliveries",
        "description": "Limit: 10 per minute for the account (webhook send), shared by test, redeliver, replay-dead and event re-send.\n\nRedelivers every currently `dead` delivery for this endpoint in one call,\nmirroring `POST /webhooks/{webhookId}/deliveries/{deliveryId}/redeliver`\nfor the whole backlog instead of one at a time.\n\nAllowed even while the endpoint is disabled — an endpoint auto-disabled\nafter 20 consecutive failures is exactly the situation with dead letters\nworth replaying, and requiring a re-enable first would reset the failure\ncount that is the evidence of what broke.\n\nEach individual redelivery follows the same rules as the single-delivery\nendpoint (new row, same `eventId`, original `occurredAt`, a fresh\n`sequence`); a delivery that stops being eligible between listing and\nreplay (e.g. it settled, or its endpoint was removed) is skipped rather\nthan failing the whole batch.\n\nEach delivery is replayed once. A dead delivery that was already\nreplayed is skipped; if that replay died too, the replay is the one\nretried. Calling this again therefore queues nothing for deliveries it\nalready replayed.\n\nAn endpoint holds at most 100 queued deliveries. The call replays up to\nthat many and is refused with `409` while the endpoint is already at it;\nwait for the queue to settle, then call again.\n",
        "operationId": "post_webhook_deliveries_replay_dead",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "webhooks:update"
            ]
          }
        ],
        "responses": {
          "202": {
            "description": "Queued",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "replayed"
                      ],
                      "properties": {
                        "replayed": {
                          "type": "integer",
                          "description": "How many dead deliveries were requeued."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/end-users": {
      "get": {
        "tags": [
          "End Users"
        ],
        "summary": "List End Users",
        "operationId": "list_end_users",
        "security": [
          {
            "OAuth2": [
              "end-users:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:read\n\nYour end users, by name. Archived end users are left out unless you ask\nfor them with `status`.\n\n`q` matches part of the name, the number, or the email. The email of an\nend user whose contacts a family violence safety record withholds is\nnever matched, so the search cannot confirm it.\n",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "suspended",
                "archived",
                "all"
              ]
            },
            "description": "Only end users with this status. Left out lists active and suspended ones."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "name": "externalRef",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 64
            },
            "description": "Only the end user with exactly this reference of yours."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A page of end users.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "total",
                    "page",
                    "perPage",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EndUser"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "End Users"
        ],
        "summary": "Create an End User",
        "operationId": "create_end_user",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "end-users:create"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:create\n\nCreates an end user with the fields and rules of the End User form in\nthe portal. They are sent a welcome email in your branding, as when you\nadd one in the portal.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EndUserDetails"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "name"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "residential",
                          "business"
                        ]
                      },
                      "serviceAddress": {
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/EndUserAddress"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "billingAddress": {
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/EndUserAddress"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "Left out or null, bills go to the service address."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The end user was created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/EndUser"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/lookup": {
      "post": {
        "tags": [
          "End Users"
        ],
        "summary": "Find an End User by Identity Details",
        "operationId": "lookup_end_user",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "end-users:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:read\n\nLimit: 20 per minute for the key.\n\nFinds the one end user a caller is, from the details they give you, such\nas a name, an email and a mobile. Built for a front desk or phone tool\nthat should find one caller without listing everyone.\n\nIt answers only when **at least three** of the details you send match\nthe same end user exactly. The name counts as one. Case and spacing are\nignored, a phone number is compared in one format (0400 000 001 and +61\n400 000 001 are the same), and an ABN by its digits.\n\nEvery miss answers the same `404`: too few details, a wrong one, no end\nuser, or more than one. The call cannot tell you which detail was wrong.\n\n- A POST, so the details never appear in a URL or a log.\n- Each call is audited with the names of the details sent, never their\n  values, and whether it matched.\n- The answer carries no contact details, so it is the same for an end\n  user whose contacts a family violence safety record withholds.\n- For such an end user, their email, phone and service address never\n  count as a match, so a lookup that needs one of them is the same `404`\n  as for no end user. Their name and ABN alone are too few.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255,
                    "example": "Jane Citizen"
                  },
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255,
                    "example": "jane@example.com"
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 32,
                    "example": "0400 000 001"
                  },
                  "abn": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 32
                  },
                  "serviceAddress": {
                    "description": "The service address, as text (\"12 Example Street, Brisbane City\nQLD 4000\"), or `{\"gnafId\": \"...\"}` for one picked from\n`GET /addresses/search`.\n",
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "object",
                        "required": [
                          "gnafId"
                        ],
                        "properties": {
                          "gnafId": {
                            "type": "string",
                            "maxLength": 32
                          }
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The one end user the details match.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "endUser",
                        "name",
                        "status",
                        "contactsMasked"
                      ],
                      "properties": {
                        "endUser": {
                          "type": "string",
                          "example": "820412"
                        },
                        "name": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "suspended",
                            "archived"
                          ]
                        },
                        "contactsMasked": {
                          "type": "boolean",
                          "description": "True while a family violence safety record withholds their contacts. Read the end user with care."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "x-summary": "Not Found",
            "description": "No single end user matches enough of the details. Every miss answers this way.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "status": 404,
                    "code": "not_found",
                    "reason": "No single end user matches those details."
                  }
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/EndUserPath"
        }
      ],
      "get": {
        "tags": [
          "End Users"
        ],
        "summary": "Get an End User",
        "operationId": "get_end_user",
        "security": [
          {
            "OAuth2": [
              "end-users:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:read\n\nOne end user, archived ones included. While a family violence safety\nrecord withholds their contacts, the contacts and addresses are null and\n`contactsMasked` is true.\n\nIt also says whether the end user's final invoice can be issued now,\nthe same check as `GET /end-users/{endUser}/invoices/final` and the\nportal's Final Invoice button: `finalInvoiceAllowed`,\n`finalInvoiceEarliestDate` and `finalInvoiceReasons`. The list does not\ncarry these fields.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The end user.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/EndUser"
                        },
                        {
                          "type": "object",
                          "required": [
                            "finalInvoiceAllowed",
                            "finalInvoiceEarliestDate",
                            "finalInvoiceReasons"
                          ],
                          "properties": {
                            "finalInvoiceAllowed": {
                              "type": "boolean",
                              "description": "Whether the final invoice can be issued now."
                            },
                            "finalInvoiceEarliestDate": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "date",
                              "description": "The earliest it can be issued, when that is known."
                            },
                            "finalInvoiceReasons": {
                              "type": "array",
                              "description": "What is still open, each with a stable `code`. Empty when allowed, except for one `already_billed_through_end` when the last invoice already billed everything, so issuing makes no new invoice.",
                              "items": {
                                "type": "object",
                                "required": [
                                  "code",
                                  "message"
                                ],
                                "properties": {
                                  "code": {
                                    "type": "string"
                                  },
                                  "message": {
                                    "type": "string"
                                  }
                                }
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "End Users"
        ],
        "summary": "Update an End User",
        "operationId": "update_end_user",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "end-users:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:update\n\nChanges any of the end user's details; a field you leave out stays as\nit is. The rules are those of the End User form in the portal.\n\n- **Addresses** are refused here (422). Change them with\n  `PATCH /end-users/{endUser}/addresses`, which also updates the\n  emergency services (IPND) record of their numbers.\n- **Masked contacts**: while a family violence safety record withholds\n  the end user's contacts, a change to `email`, `phone`, `billingEmail`,\n  `altContactName` or `altContactPhone` is refused (422).\n- **Archived** end users are not changed (409). Restore them first.\n- **Time zone**: their bills are cut on `timezone`, and their portal shows\n  times in it. A change applies from their next billing period: the\n  period already open keeps the zone it started in. Null is your zone.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EndUserDetails"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "residential",
                          "business"
                        ]
                      },
                      "timezone": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "The end user's own time zone, one of `Australia/Brisbane`, `Australia/Sydney`,\n`Australia/Melbourne`, `Australia/Adelaide`,\n`Australia/Perth`, `Australia/Darwin` or `Australia/Hobart`.\nAny other is refused (422). Null clears it, so they are in\nyour zone.\n",
                        "example": "Australia/Perth"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The end user, as changed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/EndUser"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/addresses": {
      "parameters": [
        {
          "$ref": "#/components/parameters/EndUserPath"
        }
      ],
      "patch": {
        "tags": [
          "End Users"
        ],
        "summary": "Change an End User's Addresses",
        "operationId": "update_end_user_addresses",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "end-users:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:update\n\nChanges the end user's service address, billing address, or both, as\nthe end user can on their Profile page in the end-user portal. This is\nthe only call that changes an end user's addresses.\n\nThe service address is also the address emergency services are given\nfor the end user's numbers (their IPND record). When it moves, `ipnd`\nsays what happened to that record:\n\n- `applied`: the address was picked from `GET /addresses/search` (send\n  its `gnafId`), and the record is being updated.\n- `referred`: the address was typed in, so it cannot be carried into\n  the record. Confirm the end user's emergency address yourself.\n- `unchanged`: the service address did not move. A billing-only change\n  never touches the record.\n\nWhile a family violence safety record withholds the end user's\ncontacts, the change is made but the addresses are not returned.\nAn archived end user is not changed (409).\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Send at least one of the three. A field you leave out stays as it is.",
                "properties": {
                  "serviceAddress": {
                    "oneOf": [
                      {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/EndUserAddress"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "gnafId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "maxLength": 32,
                                "description": "The address's id from `GET /addresses/search`, when picked from it."
                              }
                            }
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "billingSameAsService": {
                    "type": "boolean",
                    "description": "True to send bills to the service address."
                  },
                  "billingAddress": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/EndUserAddress"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "The billing address. Null is the service address."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The addresses were saved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "endUser",
                        "ipnd",
                        "contactsMasked"
                      ],
                      "properties": {
                        "endUser": {
                          "type": "string"
                        },
                        "ipnd": {
                          "type": "string",
                          "enum": [
                            "applied",
                            "referred",
                            "unchanged"
                          ]
                        },
                        "contactsMasked": {
                          "type": "boolean",
                          "description": "True when the addresses below are withheld by a family violence safety record."
                        },
                        "serviceAddress": {
                          "oneOf": [
                            {
                              "$ref": "#/components/schemas/EndUserAddress"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "billingSameAsService": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "billingAddress": {
                          "oneOf": [
                            {
                              "$ref": "#/components/schemas/EndUserAddress"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/settings": {
      "parameters": [
        {
          "$ref": "#/components/parameters/EndUserPath"
        }
      ],
      "get": {
        "tags": [
          "End Users"
        ],
        "summary": "Get an End User's Settings",
        "operationId": "get_end_user_settings",
        "security": [
          {
            "OAuth2": [
              "end-users:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:read\n\nThe end user's default screening of international calls to their lines,\nas they see it on their Profile page in the end-user portal, whether\nthey get billing texts, and whether you bill them through the platform.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The settings.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/EndUserSettings"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "End Users"
        ],
        "summary": "Change an End User's Settings",
        "operationId": "update_end_user_settings",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "end-users:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:update\n\nSets the end user's default for international calls to their lines,\nfor example after a scam-call complaint. It screens incoming calls only:\nit never affects an outgoing call, and never a 000 call. A field you\nleave out stays as it is. An archived end user is not changed (409).\n\n`billingSms: false` stops their billing texts when they ask you to,\nas the switch on their page in the portal does; `true` starts them again.\nTheir billing emails still go.\n\n`isBilled: false` stops billing them through the platform, for an end\nuser you bill some other way; `true` bills them again from their next\nbill, which covers its whole period, never an earlier one. While you\nbill your end users, `true` is refused (422) until every service of\ntheirs has a retail price, a call plan or a markup that covers it; the\nerror says what to set. Each change is in your Audit Log.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "blockInternationalInbound": {
                    "type": "boolean"
                  },
                  "allowNzInbound": {
                    "type": "boolean"
                  },
                  "billingSms": {
                    "type": "boolean"
                  },
                  "isBilled": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The settings, as changed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/EndUserSettings"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/notes": {
      "parameters": [
        {
          "$ref": "#/components/parameters/EndUserPath"
        }
      ],
      "get": {
        "tags": [
          "End Users"
        ],
        "summary": "List an End User's Notes",
        "operationId": "list_end_user_notes",
        "security": [
          {
            "OAuth2": [
              "end-users:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:read\n\nYour own notes on the end user, as on the Notes tab of their page in the\nportal: pinned first, then newest. The end user never sees them.\n",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A page of notes.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "total",
                    "page",
                    "perPage",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EndUserNote"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "End Users"
        ],
        "summary": "Add a Note to an End User",
        "operationId": "create_end_user_note",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "end-users:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:update\n\nAdds a note. Notes are append-only: to correct one, add another. The\nnote names this API key as its author, in the portal too. Its text is\nnever written to the audit log.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "body"
                ],
                "properties": {
                  "body": {
                    "type": "string",
                    "maxLength": 10000
                  },
                  "pinned": {
                    "type": "boolean",
                    "default": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The note.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/EndUserNote"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/notes/{noteId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/EndUserPath"
        },
        {
          "name": "noteId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The note's `id`."
        }
      ],
      "patch": {
        "tags": [
          "End Users"
        ],
        "summary": "Pin or Unpin an End User's Note",
        "operationId": "update_end_user_note",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "end-users:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:update\n\nPins or unpins a note. A note's text never changes (422 if you send\n`body`): add a new note to correct one.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "pinned"
                ],
                "properties": {
                  "pinned": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The note.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/EndUserNote"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "End Users"
        ],
        "summary": "Remove an End User's Note",
        "operationId": "delete_end_user_note",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "end-users:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:update\n\nRemoves a note written in error. The audit log records that it went,\nnot what it said.\n",
        "responses": {
          "204": {
            "x-summary": "No Content",
            "description": "The note was removed."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/safety-records": {
      "parameters": [
        {
          "$ref": "#/components/parameters/EndUserPath"
        }
      ],
      "get": {
        "tags": [
          "End Users"
        ],
        "summary": "List an End User's Safety Records",
        "operationId": "list_end_user_safety_records",
        "security": [
          {
            "OAuth2": [
              "safety:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** safety:read\n\n**Legal obligations attach to this endpoint.** These are family violence\nsafety records under the Telecommunications (Financial Hardship and\nFamily Violence) rules (F2025L00664). Read the End users safety help\npage before you use it.\n\nThe end user's records, active first, then newest, with every field the\nportal shows.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The records.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "results"
                  ],
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EndUserSafetyRecord"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "End Users"
        ],
        "summary": "Raise a Safety Record on an End User",
        "operationId": "create_end_user_safety_record",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "safety:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** safety:update\n\n**Legal obligations attach to this endpoint.** Read the End users safety\nhelp page before you use it.\n\nRaises a safety record when the end user discloses domestic or family\nviolence. With `suppressContactDisclosure` (the default), their contacts\nare masked on every end-user read from then on, here and in the portal.\nAudited, naming this key.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EndUserSafetyRecordInput"
                  },
                  {
                    "type": "object",
                    "required": [
                      "identifiedReason"
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "$ref": "#/components/responses/EndUserSafetyRecordResult"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/safety-records/{recordId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/EndUserPath"
        },
        {
          "$ref": "#/components/parameters/SafetyRecordPath"
        }
      ],
      "get": {
        "tags": [
          "End Users"
        ],
        "summary": "Get an End User's Safety Record",
        "operationId": "get_end_user_safety_record",
        "security": [
          {
            "OAuth2": [
              "safety:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** safety:read\n\n**Legal obligations attach to this endpoint.** Read the End users safety\nhelp page before you use it.\n\nOne record, with the time and the person of each step. A step taken by\nAPI names no person here; the audit log names the key.\n",
        "responses": {
          "200": {
            "$ref": "#/components/responses/EndUserSafetyRecordResult"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "End Users"
        ],
        "summary": "Change an End User's Safety Record",
        "operationId": "update_end_user_safety_record",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "safety:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** safety:update\n\n**Legal obligations attach to this endpoint.** Read the End users safety\nhelp page before you use it.\n\nChanges the record's fields. A field you leave out stays as it is. A\nclosed record is not changed (409).\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EndUserSafetyRecordInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/EndUserSafetyRecordResult"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/safety-records/{recordId}/confirm-safe": {
      "parameters": [
        {
          "$ref": "#/components/parameters/EndUserPath"
        },
        {
          "$ref": "#/components/parameters/SafetyRecordPath"
        }
      ],
      "post": {
        "tags": [
          "End Users"
        ],
        "summary": "Confirm It Is Safe to Communicate",
        "operationId": "confirm_end_user_safety_record_safe",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "safety:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** safety:update\n\n**Legal obligations attach to this endpoint.** Read the End users safety\nhelp page before you use it.\n\nRecords that the person confirmed it is safe for them to communicate\n(s8(1)). Support can be recorded only after this. A closed record is not\nchanged (409).\n",
        "responses": {
          "200": {
            "$ref": "#/components/responses/EndUserSafetyRecordResult"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/safety-records/{recordId}/support-advised": {
      "parameters": [
        {
          "$ref": "#/components/parameters/EndUserPath"
        },
        {
          "$ref": "#/components/parameters/SafetyRecordPath"
        }
      ],
      "post": {
        "tags": [
          "End Users"
        ],
        "summary": "Record That Support Was Explained",
        "operationId": "record_end_user_safety_support_advised",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "safety:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** safety:update\n\n**Legal obligations attach to this endpoint.** Read the End users safety\nhelp page before you use it.\n\nRecords that the available support was explained to the person (s8(2)).\nRefused (409) until it is confirmed safe to communicate, and on a closed\nrecord.\n",
        "responses": {
          "200": {
            "$ref": "#/components/responses/EndUserSafetyRecordResult"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/safety-records/{recordId}/further-support": {
      "parameters": [
        {
          "$ref": "#/components/parameters/EndUserPath"
        },
        {
          "$ref": "#/components/parameters/SafetyRecordPath"
        }
      ],
      "post": {
        "tags": [
          "End Users"
        ],
        "summary": "Record Whether Further Support Is Wanted",
        "operationId": "record_end_user_safety_further_support",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "safety:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** safety:update\n\n**Legal obligations attach to this endpoint.** Read the End users safety\nhelp page before you use it.\n\nRecords whether the person wants further information and support\n(s8(3)). Refused (409) until it is confirmed safe to communicate, and on\na closed record.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "wanted"
                ],
                "properties": {
                  "wanted": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/EndUserSafetyRecordResult"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/safety-records/{recordId}/close": {
      "parameters": [
        {
          "$ref": "#/components/parameters/EndUserPath"
        },
        {
          "$ref": "#/components/parameters/SafetyRecordPath"
        }
      ],
      "post": {
        "tags": [
          "End Users"
        ],
        "summary": "Close an End User's Safety Record",
        "operationId": "close_end_user_safety_record",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "safety:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** safety:update\n\n**Legal obligations attach to this endpoint.** Read the End users safety\nhelp page before you use it.\n\nCloses the record. It is never deleted: `retentionExpiresAt` is set to\nthe earliest it may be disposed of (s31). A record already closed is not\nchanged (409).\n",
        "responses": {
          "200": {
            "$ref": "#/components/responses/EndUserSafetyRecordResult"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/safety-records/{recordId}/safe-contacts/reveal": {
      "parameters": [
        {
          "$ref": "#/components/parameters/EndUserPath"
        },
        {
          "$ref": "#/components/parameters/SafetyRecordPath"
        }
      ],
      "post": {
        "tags": [
          "End Users"
        ],
        "summary": "Reveal a Safety Record's Safe Contacts",
        "operationId": "reveal_end_user_safety_record_safe_contacts",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "safety:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** safety:read\n\n**Legal obligations attach to this endpoint.** Read the End users safety\nhelp page before you use it.\n\nReturns the safe number, safe email and safe postal address that every\nread of the safety record masks. Every call is audited as a reveal of\nthe end user's contacts, naming this key, the record and the contacts\nshown, never their values, whether or not any is recorded. A closed\nrecord's safe contacts are revealed too: it is kept until its retention\ndate. Ask for them only when you need them for the call in front of you.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The record's safe contacts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "id"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "description": "The record's public id."
                        },
                        "safeContactNumber": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "safeContactEmail": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "safePostalAddress": {
                          "oneOf": [
                            {
                              "$ref": "#/components/schemas/EndUserAddress"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/contacts/reveal": {
      "parameters": [
        {
          "$ref": "#/components/parameters/EndUserPath"
        }
      ],
      "post": {
        "tags": [
          "End Users"
        ],
        "summary": "Reveal an End User's Masked Contacts",
        "operationId": "reveal_end_user_contacts",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "safety:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** safety:read\n\n**Legal obligations attach to this endpoint.** Read the End users safety\nhelp page before you use it.\n\nReturns the contacts a family violence safety record masks on every\nother end-user read. Every call is audited as a reveal, naming this key,\nwhether or not anything was masked. Without this scope, no call shows\nthem.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The end user's contacts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "endUser",
                        "contactsMasked"
                      ],
                      "properties": {
                        "endUser": {
                          "type": "string"
                        },
                        "contactsMasked": {
                          "type": "boolean",
                          "description": "Whether other reads mask these."
                        },
                        "email": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "phone": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "altContactName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "altContactPhone": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "billingEmail": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "serviceAddress": {
                          "oneOf": [
                            {
                              "$ref": "#/components/schemas/EndUserAddress"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "billingSameAsService": {
                          "type": "boolean"
                        },
                        "billingAddress": {
                          "oneOf": [
                            {
                              "$ref": "#/components/schemas/EndUserAddress"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/verification-codes": {
      "parameters": [
        {
          "$ref": "#/components/parameters/EndUserPath"
        }
      ],
      "post": {
        "tags": [
          "End Users"
        ],
        "summary": "Send an End User a Verification Code",
        "operationId": "create_end_user_verification_code",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "end-users:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:update\n\nSends a six digit code to the end user's own mobile (`sms`) or email,\nso you can check the person you are talking to controls it. You never\nsupply the address: the code goes to the contact on file. While a family\nviolence safety record is active on the end user, it goes only to the\nrecord's agreed safe contact for that channel, or not at all (422).\n\nThe SMS goes from one of your approved SMS senders. With more than one,\nname it in `smsFrom`. The email goes in your branding.\n\nThe code is advisory: a right code records `lastVerifiedAt` on the end\nuser, and no other call needs it. It expires in 10 minutes. At most five\ncodes go to one end user in an hour (429 after that). Each send is\naudited with the reason and this key's name, never the code.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "channel",
                  "reason"
                ],
                "properties": {
                  "channel": {
                    "type": "string",
                    "enum": [
                      "sms",
                      "email"
                    ]
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "Why the code is being sent, for the audit log."
                  },
                  "smsFrom": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 20,
                    "description": "The approved sender to send the SMS from, when you have more than one."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "x-summary": "Accepted",
            "description": "The code was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "verificationId",
                        "channel",
                        "destination",
                        "expiresAt"
                      ],
                      "properties": {
                        "verificationId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "channel": {
                          "type": "string",
                          "enum": [
                            "sms",
                            "email"
                          ]
                        },
                        "destination": {
                          "type": "string",
                          "description": "Where it went, masked, such as `*******001` or `j***@example.com`."
                        },
                        "expiresAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/verification-codes/{verificationId}/verify": {
      "parameters": [
        {
          "$ref": "#/components/parameters/EndUserPath"
        },
        {
          "name": "verificationId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The `verificationId` the send returned."
        }
      ],
      "post": {
        "tags": [
          "End Users"
        ],
        "summary": "Check an End User's Verification Code",
        "operationId": "verify_end_user_verification_code",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "end-users:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:update\n\nChecks the code the person read back. A right code answers `verified:\ntrue` and records `lastVerifiedAt`. A wrong code, one already used, one\nexpired, one with five wrong tries, or an unknown verification all\nanswer the same `verified: false`. Each check is audited with its\noutcome and this key's name, never the code.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "code"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "maxLength": 12
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "Whether the code was right.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "verified"
                      ],
                      "properties": {
                        "verified": {
                          "type": "boolean"
                        },
                        "lastVerifiedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/logins": {
      "parameters": [
        {
          "$ref": "#/components/parameters/EndUserPath"
        }
      ],
      "get": {
        "tags": [
          "End Users"
        ],
        "summary": "List an End User's Logins",
        "operationId": "list_end_user_logins",
        "security": [
          {
            "OAuth2": [
              "end-users:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:read\n\nThe logins to the end user's own portal, and the invites not yet\naccepted, as on the Logins card of their page in the portal.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "Their logins and open invites.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "logins",
                        "invites"
                      ],
                      "properties": {
                        "logins": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/EndUserLogin"
                          }
                        },
                        "invites": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/EndUserLoginInvite"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "End Users"
        ],
        "summary": "Invite a Login for an End User",
        "operationId": "create_end_user_login_invite",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "end-users:update",
              "end-users:sign-in"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:update, end-users:sign-in\n\nEmails an invite, in your brand, to set up a login to the end user's\nportal. A login is a way into the portal, so it needs `end-users:sign-in`\nas well as `end-users:update`, as a portal session does. Refused (422) when a login or an open invite already has that\nemail. 409 when your end-user portal is off or has no domain yet.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email",
                  "role"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 255
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "owner",
                      "admin",
                      "billing",
                      "technical"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The invite was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/EndUserLoginInvite"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/logins/{loginId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/EndUserPath"
        },
        {
          "name": "loginId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The login's `id`."
        }
      ],
      "patch": {
        "tags": [
          "End Users"
        ],
        "summary": "Change an End User Login's Role",
        "operationId": "update_end_user_login",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "end-users:update",
              "end-users:sign-in"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:update, end-users:sign-in\n\nChanges the login's role. A role can widen a way into the portal, so it\nneeds `end-users:sign-in` as well as `end-users:update`. Their portal keeps an Owner while it has\nother logins, so taking the role from their only Owner is refused (422).\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "role"
                ],
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "owner",
                      "admin",
                      "billing",
                      "technical"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The login.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/EndUserLogin"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "End Users"
        ],
        "summary": "Remove an End User Login",
        "operationId": "delete_end_user_login",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "end-users:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:update\n\nRemoves the login: it can no longer sign in. Removing their only Owner\nwhile other logins remain is refused (422); removing the last login of\nall is allowed.\n",
        "responses": {
          "204": {
            "x-summary": "No Content",
            "description": "The login was removed."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/logins/{loginId}/password-reset": {
      "parameters": [
        {
          "$ref": "#/components/parameters/EndUserPath"
        },
        {
          "name": "loginId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The login's `id`."
        }
      ],
      "post": {
        "tags": [
          "End Users"
        ],
        "summary": "Send an End User Login a Password Reset",
        "operationId": "send_end_user_login_password_reset",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "end-users:update",
              "end-users:sign-in"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:update, end-users:sign-in\n\nEmails the login a password reset link, in your brand: the answer to\n\"I'm locked out\". No call ever sets a password. When a link was sent a\nmoment ago, `sent` is false: that link is still live, and no second one\ngoes. Where the end user has a family violence safety record, the link\ngoes to the safe contact on it (`outcome` is `sent_to_safe_contact`), or\nis held when the agreed contact method allows no email (`outcome` is\n`held`, `sent` is false, and our staff are alerted to contact them the\nagreed way). 409 when your end-user portal is off or has no domain yet.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "Whether a link was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "loginId",
                        "sent",
                        "outcome"
                      ],
                      "properties": {
                        "loginId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "sent": {
                          "type": "boolean"
                        },
                        "outcome": {
                          "type": "string",
                          "enum": [
                            "sent",
                            "sent_to_safe_contact",
                            "held",
                            "throttled"
                          ],
                          "description": "What became of the reset."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/invites/{inviteId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/EndUserPath"
        },
        {
          "name": "inviteId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The open invite's `id`."
        }
      ],
      "delete": {
        "tags": [
          "End Users"
        ],
        "summary": "Revoke an End User Login Invite",
        "operationId": "delete_end_user_login_invite",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "end-users:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:update\n\nRevokes an open invite: its link stops working.\n",
        "responses": {
          "204": {
            "x-summary": "No Content",
            "description": "The invite was revoked."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/invites/{inviteId}/resend": {
      "parameters": [
        {
          "$ref": "#/components/parameters/EndUserPath"
        },
        {
          "name": "inviteId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The open invite's `id`."
        }
      ],
      "post": {
        "tags": [
          "End Users"
        ],
        "summary": "Resend an End User Login Invite",
        "operationId": "resend_end_user_login_invite",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "end-users:update",
              "end-users:sign-in"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:update, end-users:sign-in\n\nSends an open invite again, with a fresh link.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The invite.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/EndUserLoginInvite"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/representatives": {
      "parameters": [
        {
          "$ref": "#/components/parameters/EndUserPath"
        }
      ],
      "get": {
        "tags": [
          "End Users"
        ],
        "summary": "List an End User's Representatives",
        "operationId": "list_end_user_representatives",
        "security": [
          {
            "OAuth2": [
              "end-users:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:read\n\nThe people the end user has authorised to act for them, as on their\npage in the portal: active ones first, then newest. A revoked one is\nkept as history and confers no authority. Check this before acting on\nthe word of someone who says they speak for the end user.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The representatives.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "results"
                  ],
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EndUserRepresentative"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "End Users"
        ],
        "summary": "Appoint a Representative for an End User",
        "operationId": "create_end_user_representative",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "end-users:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:update\n\nRecords someone the end user has authorised to act for them, with at\nleast one area. `full` covers every area. Audited, naming this key.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "kind",
                  "authorities"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "email",
                    "maxLength": 255
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 32
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "authorised_representative",
                      "advocate",
                      "power_of_attorney"
                    ]
                  },
                  "authorities": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string",
                      "enum": [
                        "full",
                        "billing",
                        "complaints",
                        "hardship",
                        "technical",
                        "dfv"
                      ]
                    }
                  },
                  "notes": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The representative.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/EndUserRepresentative"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/representatives/{repId}/revoke": {
      "parameters": [
        {
          "$ref": "#/components/parameters/EndUserPath"
        },
        {
          "name": "repId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The representative's `id`."
        }
      ],
      "post": {
        "tags": [
          "End Users"
        ],
        "summary": "Revoke an End User's Representative",
        "operationId": "revoke_end_user_representative",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "end-users:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:update\n\nEnds the representative's authority at once. The record is kept as\nhistory. Revoking one already revoked changes nothing. A representative\nof another end user is a 404.\n",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The representative, revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/EndUserRepresentative"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/suspend": {
      "parameters": [
        {
          "$ref": "#/components/parameters/EndUserPath"
        }
      ],
      "post": {
        "tags": [
          "End Users"
        ],
        "summary": "Suspend an End User",
        "operationId": "suspend_end_user",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "end-users:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:update\n\nSuspends the end user, as **Suspend** on their page in the portal does,\nfor your own non-payment or abuse cases. Their voice services and VPN\nseats are cut off; their data services keep running (only we suspend a\ndata service, and one we suspend says how soon in `suspensionTakesEffect`\non GET /data/services/{ref}). A 000 call still\ngoes through. An end user already suspended is answered as it stands.\n\n- An end user on the Priority Assistance register is suspended too,\n  with the `reason` you give. The suspension and its reason are recorded\n  against their registration, naming your API key.\n- An archived end user cannot be suspended (409).\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "reason"
                ],
                "properties": {
                  "reason": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "Why, shown on the end user as `suspendReason`.",
                    "example": "Unpaid since March"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/EndUserResult"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/reactivate": {
      "parameters": [
        {
          "$ref": "#/components/parameters/EndUserPath"
        }
      ],
      "post": {
        "tags": [
          "End Users"
        ],
        "summary": "Reactivate an End User",
        "operationId": "reactivate_end_user",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "end-users:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:update\n\nLifts a suspension you placed, restoring only what it cut off. A\nsuspension Check Networks placed is refused (409) until we lift it. An\nend user that is not suspended is answered as it stands.\n",
        "responses": {
          "200": {
            "$ref": "#/components/responses/EndUserResult"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/archive": {
      "parameters": [
        {
          "$ref": "#/components/parameters/EndUserPath"
        }
      ],
      "post": {
        "tags": [
          "End Users"
        ],
        "summary": "Archive an End User",
        "operationId": "archive_end_user",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "end-users:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:update\n\nPuts away a former end user. Their history stays, and their sign-in to\nthe end-user portal is closed. Only once nothing is live or owed: a live\nservice, an open order, or a balance either way is refused (409), with\neach reason in `error.blockers`. A suspension Check Networks placed is\nrefused too (409).\n",
        "responses": {
          "200": {
            "$ref": "#/components/responses/EndUserResult"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "x-summary": "Conflict",
            "description": "The end user cannot be archived yet.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "blockers": {
                              "type": "array",
                              "description": "What stands in the way, one sentence each. Absent for a refusal that is not about blockers.",
                              "items": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "error": {
                    "status": 409,
                    "code": "conflict",
                    "reason": "This end user cannot be archived yet.",
                    "blockers": [
                      "They have 1 live service. Cease or move them first."
                    ]
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/restore": {
      "parameters": [
        {
          "$ref": "#/components/parameters/EndUserPath"
        }
      ],
      "post": {
        "tags": [
          "End Users"
        ],
        "summary": "Restore an End User",
        "operationId": "restore_end_user",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "end-users:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:update\n\nBrings an archived end user back as active. An end user that is not\narchived is answered as it stands.\n",
        "responses": {
          "200": {
            "$ref": "#/components/responses/EndUserResult"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/services": {
      "parameters": [
        {
          "$ref": "#/components/parameters/EndUserPath"
        }
      ],
      "get": {
        "tags": [
          "End Users"
        ],
        "summary": "List an End User's Services",
        "operationId": "list_end_user_services",
        "security": [
          {
            "OAuth2": [
              "end-users:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:read\n\nThe services the end user owns, each with the billed assignment it\ncarries, and the numbers they hold. Not paginated.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The end user's services.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EndUserService"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "End Users"
        ],
        "summary": "Give an End User a Service",
        "operationId": "assign_end_user_service",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "end-users:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:update\n\nGives the end user one of your data services, trunks or numbers. A\nservice another end user holds moves to this one. It then shows in the\nend user's portal, and its charges and usage go on their bills.\n\nThis is a link on our side only: nothing changes at the carrier, such as\nthe nbn end user of record. A cancelled data service, a terminated trunk,\nand another account's service are refused (422). An archived end user\ntakes no service (409); restore them first.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "kind",
                  "reference"
                ],
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "dataService",
                      "trunk",
                      "number"
                    ]
                  },
                  "reference": {
                    "type": "string",
                    "maxLength": 64,
                    "description": "A data service's service reference, a trunk's SIP username, or a number.",
                    "example": "AVC000123456789"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The service, now the end user's.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/EndUserService"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/services/{assignmentId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/EndUserPath"
        },
        {
          "name": "assignmentId",
          "in": "path",
          "required": true,
          "description": "The assignment's `assignmentId` (a uuid), from `GET /end-users/{endUser}/services`.",
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "example": "4b8e2d17-6c3f-4a90-9d5e-1f7a3c6b2e08"
        }
      ],
      "delete": {
        "tags": [
          "End Users"
        ],
        "summary": "End a Billed Assignment",
        "operationId": "end_end_user_assignment",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "end-users:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:update\n\nEnds the assignment today: the end user is billed for it to the end of\ntoday, on your calendar, and not after. The service itself is not\ncancelled. An assignment already ended, today or before, keeps its end\ndate, so calling this again changes nothing.\n\nOnly for an account that bills its end users; otherwise this answers\n404. An assignment of another end user answers 404 too.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The assignment was ended.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "assignmentId"
                      ],
                      "properties": {
                        "assignmentId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "endsOn": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/portal-sessions": {
      "parameters": [
        {
          "$ref": "#/components/parameters/EndUserPath"
        }
      ],
      "post": {
        "tags": [
          "End Users"
        ],
        "summary": "Sign an End User In to the End-User Portal",
        "operationId": "create_end_user_portal_session",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "end-users:sign-in"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:sign-in\n\nA link that signs one of the end user's logins in to your end-user\nportal and opens the page you choose: their dashboard, their bills, one\nbill, one service or their support tickets. Send the end user to it from\nyour own app, for example to pay by card or direct debit, which only the\nend-user portal takes.\n\nThe link works once, for 5 minutes, on your portal's own domain.\nOpening it shows a page with a **Continue to your portal** button, and\nonly pressing the button uses the link, so a mail scanner or link\npreview that fetches it leaves it working. It replaces the password\nonly: when the login has two-factor on, the portal\nasks for the code first, and no page opens until it is given\n(`twoFactor` says so). It signs in as `portalUser`, one of the end\nuser's active logins (see List End-User Logins). There is no default:\nalways name the login.\n\nWith `returnUrl`, the end user is sent there once signed in (after the\ntwo-factor code, when asked for) instead of to `landing`. It must be an\n`https` address on your own website's host or your end-user portal's\ndomain; any other is a `422`.\n\nRefused with `403` and the code `no_end_user_portal_access` when the end\nuser cannot use the portal: the portal is off or has no domain, the end\nuser is archived, or they have no active login. A `portalUser`,\n`invoiceId` or `assignmentId` that is not theirs is a `422`.\n\nEach link is recorded in the end user's activity, naming the API key\nand the login.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "portalUser"
                ],
                "properties": {
                  "landing": {
                    "type": "string",
                    "enum": [
                      "dashboard",
                      "bills",
                      "bill",
                      "service",
                      "tickets"
                    ],
                    "default": "dashboard",
                    "description": "The page the link opens."
                  },
                  "invoiceId": {
                    "type": "string",
                    "maxLength": 64,
                    "example": "01jd3z6r9k2m4n8p0q5s7t1v3w",
                    "description": "The bill to open, by its `id` (a ULID) on the end-user invoice calls. Required for `bill`, and only taken with it."
                  },
                  "assignmentId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The service to open, by its `assignmentId` (a uuid) from List an End User's Services. Required for `service`, and only taken with it."
                  },
                  "portalUser": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The login to sign in as, by its `id` (a uuid) from List End-User Logins."
                  },
                  "returnUrl": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uri",
                    "maxLength": 2048,
                    "description": "(Optional) Where to send the end user once signed in, instead of `landing`. An `https` URL on your own website's host or your end-user portal's domain.",
                    "example": "https://www.example.com.au/account/paid"
                  }
                },
                "allOf": [
                  {
                    "if": {
                      "properties": {
                        "landing": {
                          "const": "bill"
                        }
                      },
                      "required": [
                        "landing"
                      ]
                    },
                    "then": {
                      "required": [
                        "invoiceId"
                      ]
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "landing": {
                          "const": "service"
                        }
                      },
                      "required": [
                        "landing"
                      ]
                    },
                    "then": {
                      "required": [
                        "assignmentId"
                      ]
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The link.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "url",
                        "expiresAt",
                        "portalUser",
                        "landing",
                        "twoFactor"
                      ],
                      "properties": {
                        "url": {
                          "type": "string",
                          "format": "uri",
                          "description": "Send the end user here. It works once."
                        },
                        "expiresAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "portalUser": {
                          "type": "string",
                          "format": "uuid",
                          "description": "The login it signs in as."
                        },
                        "landing": {
                          "type": "string",
                          "enum": [
                            "dashboard",
                            "bills",
                            "bill",
                            "service",
                            "tickets"
                          ]
                        },
                        "twoFactor": {
                          "type": "boolean",
                          "description": "Whether the portal asks that login for its two-factor code before the page opens."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/end-users/imports": {
      "get": {
        "tags": [
          "End Users"
        ],
        "summary": "List End-User Imports",
        "operationId": "list_end_user_imports",
        "security": [
          {
            "OAuth2": [
              "end-users:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:read\n\nEvery end-user import on the account, newest first: the ones sent by API\nand the ones uploaded in the portal, partners' included.\n",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A page of imports.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "total",
                    "page",
                    "perPage",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EndUserImport"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "tags": [
          "End Users"
        ],
        "summary": "Import End Users",
        "operationId": "import_end_users",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "end-users:create"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:create\n\nMake many end users at once, as the portal's End User import does, with\nthe same checks, duplicate rules and welcome email. Send the portal's\nCSV file as `file` (multipart), or the same columns as JSON `rows`, up\nto 2,000 rows.\n\nColumns: `name` (required), `type` (`residential`, the default, or\n`business`), `business_name` (required for a business), `email`,\n`phone`, `external_ref` (your own reference) and `invite` (`yes` sends a\nlogin invite to the end-user portal to `email`). In `rows`, the API's\ncamelCase names (`businessName`, `externalRef`) are taken too.\n\nA row is passed over (`skipped`) when an end user with its email is\nalready there, or one with its name and external reference when it has\nno email, or a row earlier in the file is the same. A row that fails a\ncheck is `failed`, with the reason. The other rows are still made.\n\n`validateOnly: true` runs every check and makes nothing (the portal's\nCheck File), answering `200` with what an import would do.\n`sendWelcome: false` holds the welcome email to each new end user.\n\nUp to 200 rows run at once and answer `201` with each row's outcome.\nMore run on the queue and answer `202` with the import `processing`:\nread it with `GET /end-users/imports/{importId}` until it is `finished`,\nor `failed` if its run stopped part-way.\n\nAn `Idempotency-Key` is required: a retry with the same key answers the\nfirst import and never imports the rows twice.\n",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "The CSV file, as the portal takes it. Up to 10 MB."
                  },
                  "validateOnly": {
                    "type": "boolean"
                  },
                  "sendWelcome": {
                    "type": "boolean",
                    "default": true
                  }
                }
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "rows"
                ],
                "properties": {
                  "rows": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 2000,
                    "items": {
                      "type": "object",
                      "required": [
                        "name"
                      ],
                      "properties": {
                        "name": {
                          "type": "string",
                          "maxLength": 255
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "residential",
                            "business"
                          ],
                          "default": "residential"
                        },
                        "business_name": {
                          "type": "string",
                          "maxLength": 255,
                          "description": "Required when `type` is `business`, as this or `businessName`."
                        },
                        "businessName": {
                          "type": "string",
                          "maxLength": 255,
                          "description": "The same as `business_name`, in the API's own case."
                        },
                        "email": {
                          "type": "string",
                          "format": "email"
                        },
                        "phone": {
                          "type": "string",
                          "maxLength": 32
                        },
                        "external_ref": {
                          "type": "string",
                          "maxLength": 64,
                          "description": "Your own reference for the end user."
                        },
                        "externalRef": {
                          "type": "string",
                          "maxLength": 64,
                          "description": "The same as `external_ref`, in the API's own case."
                        },
                        "invite": {
                          "type": "boolean",
                          "description": "Send a login invite to `email`, which is then required."
                        }
                      },
                      "if": {
                        "properties": {
                          "type": {
                            "const": "business"
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      "then": {
                        "anyOf": [
                          {
                            "required": [
                              "business_name"
                            ]
                          },
                          {
                            "required": [
                              "businessName"
                            ]
                          }
                        ]
                      }
                    }
                  },
                  "validateOnly": {
                    "type": "boolean"
                  },
                  "sendWelcome": {
                    "type": "boolean",
                    "default": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "Checked",
            "description": "What an import of these rows would do (`validateOnly`). Nothing was made.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "validateOnly",
                        "total",
                        "wouldCreate",
                        "wouldSkip",
                        "problems"
                      ],
                      "properties": {
                        "validateOnly": {
                          "type": "boolean",
                          "const": true
                        },
                        "total": {
                          "type": "integer"
                        },
                        "wouldCreate": {
                          "type": "integer"
                        },
                        "wouldSkip": {
                          "type": "integer",
                          "description": "Rows an import would pass over or fail."
                        },
                        "problems": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "rowNumber",
                              "name",
                              "email",
                              "reason"
                            ],
                            "properties": {
                              "rowNumber": {
                                "type": "integer"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "email": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "reason": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "201": {
            "x-summary": "Imported",
            "description": "The import, finished, with each row's outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/EndUserImportDetail"
                    }
                  }
                }
              }
            }
          },
          "202": {
            "x-summary": "Queued",
            "description": "The import, processing on the queue.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/EndUserImport"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/end-users/imports/{importId}": {
      "parameters": [
        {
          "name": "importId",
          "in": "path",
          "required": true,
          "description": "The import's id.",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "tags": [
          "End Users"
        ],
        "summary": "Get an End-User Import",
        "operationId": "get_end_user_import",
        "security": [
          {
            "OAuth2": [
              "end-users:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** end-users:read\n\nOne import: its status, its counts, and each row's outcome, the end\nuser made from it and the reason it was skipped or failed, as the\nportal's import page shows them. An import of another account answers\n`404`.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The import.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/EndUserImportDetail"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/integrations/xero/contacts/end-users": {
      "post": {
        "tags": [
          "Xero"
        ],
        "summary": "Create End Users from Xero Contacts",
        "operationId": "create_end_users_from_xero_contacts",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "integrations:update",
              "end-users:create"
            ]
          }
        ],
        "description": ">**Required Scope(s):** integrations:update, end-users:create\n\nCreate an end user from each contact you name in your Xero organisation\n(see Search Xero Contacts), linked to that contact, as the portal's\nCreate End Users from Xero does. Each is a business, named after the\ncontact, with its email and, when it is a valid ABN, its tax number. Each\ngets the welcome email, as any new end user does, and its invoices,\ncredit notes and payments go to the contact from then on.\n\nA contact already linked to one of your end users, archived in Xero, or\nnot found is passed over and listed in `skipped`, so sending the same\nlist again makes no second end user.\n\nUp to 50 contacts a call. Answers `409` while the account has no working\nXero connection.\n\nThe contacts are read from Xero one at a time, in the order sent. If\nXero fails part way, the end users already made stand (each has had its\nwelcome email): the answer is still `201`, with them in `created`, the\nfailure in `error`, and the contact it failed on and every one after it\nin `notTried`. Send the list again to finish: the ones made are passed\nover. If Xero fails before any end user is made, the answer is the error\nalone, as for any other Xero call.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "contactIds"
                ],
                "properties": {
                  "contactIds": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 50,
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "description": "The Xero contacts' IDs."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The end users made, the contacts passed over, and any contacts not tried because Xero failed part way.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "created",
                        "skipped",
                        "notTried",
                        "error"
                      ],
                      "properties": {
                        "created": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "contactId",
                              "endUser",
                              "name"
                            ],
                            "properties": {
                              "contactId": {
                                "type": "string",
                                "description": "The Xero contact it was made from, and is linked to."
                              },
                              "endUser": {
                                "type": "string",
                                "description": "The new end user's number."
                              },
                              "name": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "skipped": {
                          "type": "array",
                          "description": "Contacts already linked, archived or not found.",
                          "items": {
                            "type": "string"
                          }
                        },
                        "notTried": {
                          "type": "array",
                          "description": "When Xero failed part way, the contact it failed on and every one after it; empty otherwise.",
                          "items": {
                            "type": "string"
                          }
                        },
                        "error": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Why Xero stopped part way; `null` when every contact was tried.",
                          "required": [
                            "message"
                          ],
                          "properties": {
                            "message": {
                              "type": "string",
                              "example": "Xero could not answer just now: Service Unavailable"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotInSandbox"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/search": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Search Your Records",
        "operationId": "search",
        "security": [
          {
            "OAuth2": []
          }
        ],
        "description": ">**Required Scope(s):** none; each type needs its own read scope\n\nFind the number, trunk, data service, order, end user, port, emergency\naddress, ticket or invoice for a phone number, email, name or\nreference in one call, as the portal's header search does, with the\nsame matches. Up to 5 hits of each type, in this order of types.\n\n| Type | Matches | Needs |\n|---|---|---|\n| `number` | the number in any format, or its alias | voice:read |\n| `trunk` | its handle, alias or SIP username | voice:read |\n| `dataService` | its service id, address, username or your reference | data:read |\n| `order` | its PND, the carrier's ORD, or your reference | data:read |\n| `endUser` | name, number, email or phone | end-users:read |\n| `port` | its reference, the carrier's, or a number in it | voice:read |\n| `emergencyAddress` | its label, customer name or street | voice:read |\n| `ticket` | its reference or subject | tickets:read |\n| `invoice` | its number (issued, paid or void) | billing:read |\n\nWithout `types`, every type the key holds the scope for is searched, and\nthe rest are left out. A type named in `types` without its scope is\nrefused with `403`, as is a key that holds none of these scopes.\n\nAn end user whose contact details a family violence safety record\nwithholds is found by name or number only, never by email or phone, and\na hit never shows a contact.\n\n`href` is the API call that reads the hit, or null where there is none:\na port, a residential line, and an order not yet placed with the\ncarrier.\n",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "What to look for. At least 2 characters.",
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 255
            },
            "example": "0412 345 678"
          },
          {
            "name": "types",
            "in": "query",
            "required": false,
            "description": "The types to search, comma separated. Every type the key may read when left out.",
            "schema": {
              "type": "string"
            },
            "example": "endUser,dataService"
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The hits, grouped by type in the order above.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "type",
                          "id",
                          "label",
                          "sublabel",
                          "href"
                        ],
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "number",
                              "trunk",
                              "dataService",
                              "order",
                              "endUser",
                              "port",
                              "emergencyAddress",
                              "ticket",
                              "invoice"
                            ]
                          },
                          "id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "How the API names it: the number, the trunk's SIP username,\nthe service id, the order id, the end user's number, the\nport's reference, the emergency address id, the ticket\nreference or the invoice id."
                          },
                          "label": {
                            "type": "string"
                          },
                          "sublabel": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "href": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uri"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/outages/{reference}": {
      "parameters": [
        {
          "name": "reference",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "example": "OUT-4K7P2M"
          },
          "description": "The outage's or maintenance window's reference, as `GET /outages` returns it."
        }
      ],
      "get": {
        "summary": "Get an Outage affecting your Services",
        "description": ">**Required Scope(s):** account:read\n\nOne outage or planned maintenance window that touches your account,\nopen or resolved (within the register's retention period), in the same\nshape as each item of `GET /outages`. One that does not touch your\naccount is a 404, as an unknown reference is; the public status site\nshows every outage on the register.\n",
        "operationId": "get_outage",
        "security": [
          {
            "OAuth2": [
              "account:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/NetworkOutage"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Network Outages"
        ]
      }
    },
    "/data/services/assign": {
      "post": {
        "summary": "Assign Services to an End User",
        "description": "Link up to 100 of your data services to one end user in one call, or\nunlink them all with `endUser: null`. This is the portal's bulk\n**Assign to End User** on the Data Services list, with the same rule and\nthe same audit entry for each service changed. The link is local: it\nshows the service in the end user's portal and puts its charges and\nusage on their bill; nothing changes at the carrier.\n\nEach service is answered on its own, in the order sent:\n\n- `assigned`: now linked as asked (to the end user, or to none).\n- `unchanged`: it already was.\n- `notFound`: no service of yours has that reference. Another account's\n  service is `notFound` too.\n\nOne unknown reference does not stop the rest. An end user that is not\nyours, or is archived, refuses the whole call with a 422 and changes\nnothing.\n\nThe `Idempotency-Key` is required, as on the other bulk writes: a retry\nwith the same key answers as the first call did.\n",
        "operationId": "post_data_services_assign",
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "endUser",
                  "services"
                ],
                "properties": {
                  "endUser": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 64,
                    "description": "The end user to link the services to, by its public number; null to unlink them. Required, so an omitted field is never read as \"unlink\".",
                    "example": "100042"
                  },
                  "services": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 100,
                    "uniqueItems": true,
                    "description": "The services, each by its product reference (an NBN PRI or an Opticomm product) or its service reference (an AVC), as `GET /data/services` returns them.",
                    "items": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "example": [
                      "PRI000012345678",
                      "AVC000087654321"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "endUser",
                        "items"
                      ],
                      "properties": {
                        "endUser": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The end user the services were linked to; null when they were unlinked."
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "service",
                              "result"
                            ],
                            "properties": {
                              "service": {
                                "type": "string",
                                "description": "The reference as you sent it."
                              },
                              "result": {
                                "type": "string",
                                "enum": [
                                  "assigned",
                                  "unchanged",
                                  "notFound"
                                ]
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data Services"
        ]
      }
    },
    "/account/notification-settings": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get Notification Settings",
        "operationId": "get_account_notification_settings",
        "description": ">**Required Scope(s):** account:read\n\nWhere automated mail goes, and whether your residential end users are\nsent data usage notices, as Company Settings shows them in the portal.\n",
        "security": [
          {
            "OAuth2": [
              "account:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/NotificationSettings"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "patch": {
        "tags": [
          "Account"
        ],
        "summary": "Update Notification Settings",
        "operationId": "patch_account_notification_settings",
        "description": ">**Required Scope(s):** account:update\n\nChange the notification address, the usage notices, or both: only the\nfields you send change. A sender must be one of `availableSenders`.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "account:update"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "notificationEmail": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "email",
                    "maxLength": 255
                  },
                  "usageNotifications": {
                    "type": "object",
                    "required": [
                      "enabled"
                    ],
                    "properties": {
                      "enabled": {
                        "type": "boolean"
                      },
                      "smsSender": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 32,
                        "description": "Left out, the current sender is kept."
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The settings as they now stand.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/NotificationSettings"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/end-user-portal/branding": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get End-User Portal Branding",
        "operationId": "get_end_user_portal_branding",
        "description": ">**Required Scope(s):** account:read\n\nThe end-user portal's name, colour, support details, ticket switch,\nemail logo position and logos, as Portal Branding shows them in the\nportal.\n",
        "security": [
          {
            "OAuth2": [
              "account:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/PortalBranding"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "patch": {
        "tags": [
          "Account"
        ],
        "summary": "Update End-User Portal Branding",
        "operationId": "patch_end_user_portal_branding",
        "description": ">**Required Scope(s):** account:update\n\nChange any of the branding fields: only the fields you send change, and\nthe portal's rules apply to the result. The display name is required,\nso set it with your first change. A brand colour that does not reach\n4.5:1 contrast against white is refused with its ratio. Logos are set\nwith `PUT /end-user-portal/logos/{variant}`. Each change is in your\naudit log under this key's name.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "account:update"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "minProperties": 1,
                "properties": {
                  "displayName": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "brandColor": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^#[0-9A-Fa-f]{6}$"
                  },
                  "supportEmail": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "email",
                    "maxLength": 255
                  },
                  "supportPhone": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 40
                  },
                  "supportUrl": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uri",
                    "maxLength": 255
                  },
                  "supportHours": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 120
                  },
                  "afterHoursPhone": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 40
                  },
                  "ticketsEnabled": {
                    "type": "boolean"
                  },
                  "emailLogoPosition": {
                    "type": "string",
                    "enum": [
                      "top",
                      "signature"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The branding as it now stands.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/PortalBranding"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/end-user-portal/logos/{variant}": {
      "parameters": [
        {
          "name": "variant",
          "in": "path",
          "required": true,
          "description": "`light`, the main logo (also on your end users' invoices), or `dark`, the dark-mode logo.",
          "schema": {
            "type": "string",
            "enum": [
              "light",
              "dark"
            ]
          }
        }
      ],
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Download End-User Portal Logo",
        "operationId": "get_end_user_portal_logo",
        "description": ">**Required Scope(s):** account:read\n\nThe stored logo image. 404 when none is set.\n",
        "security": [
          {
            "OAuth2": [
              "account:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The image.",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "put": {
        "tags": [
          "Account"
        ],
        "summary": "Upload End-User Portal Logo",
        "operationId": "put_end_user_portal_logo",
        "description": ">**Required Scope(s):** account:update\n\nReplace a logo. Send the image as the multipart field `logo`. The light\nlogo is PNG or JPEG, as it is also your invoice logo; the dark logo is\nPNG, JPEG or WebP. SVG is never accepted. The format is read from the\nfile's content, not its name, and the size cap is the portal's (1 MB\nunless we have told you otherwise).\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "account:update"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "logo"
                ],
                "properties": {
                  "logo": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The branding, with the new logo.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/PortalBranding"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "delete": {
        "tags": [
          "Account"
        ],
        "summary": "Remove End-User Portal Logo",
        "operationId": "delete_end_user_portal_logo",
        "description": ">**Required Scope(s):** account:update\n\nRemove a logo. Removing one that is not set does nothing. A variant\nother than `light` or `dark` answers `404`.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "account:update"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "Removed."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/end-user-portal/domain": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get End-User Portal Domain",
        "operationId": "get_end_user_portal_domain",
        "description": ">**Required Scope(s):** account:read\n\nThe custom domain claimed for your end-user portal, the DNS records to\npublish and each record's last check. 404 when no domain is claimed.\n",
        "security": [
          {
            "OAuth2": [
              "account:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/PortalDomain"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Claim End-User Portal Domain",
        "operationId": "post_end_user_portal_domain",
        "description": ">**Required Scope(s):** account:update\n\nClaim a hostname for your end-user portal, replacing any earlier claim.\nPublish the records in the response, then call\n`POST /end-user-portal/domain/verify`. A hostname already in use on the\nplatform, or our own edge hostname, is refused with a 422. An unverified\nclaim holds the hostname for seven days.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "account:update"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "domain"
                ],
                "properties": {
                  "domain": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "A hostname, with no scheme or path.",
                    "example": "portal.yourbrand.com.au"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Claimed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/PortalDomain"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "delete": {
        "tags": [
          "Account"
        ],
        "summary": "Release End-User Portal Domain",
        "operationId": "delete_end_user_portal_domain",
        "description": ">**Required Scope(s):** account:update\n\nRelease the domain and any claim on it. The end-user portal stops\nanswering on it, and open end-user invites, whose links are built on\nit, are revoked. 404 when no domain is claimed.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "account:update"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "Released."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/end-user-portal/domain/verify": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Verify End-User Portal Domain",
        "operationId": "post_end_user_portal_domain_verify",
        "description": ">**Required Scope(s):** account:update\n\nLimit: 5 per minute for the account (domain verify), as each call makes DNS lookups.\n\nCheck the claimed domain's DNS records now. When both pass, the domain\nis verified and the end-user portal answers on it; otherwise the\nresponse says which record is missing. 404 when no claim is waiting\nto be verified.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "account:update"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The claim after the check, passed or not.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/PortalDomain"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/compliance/dfv-statement": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get Family Violence Statement",
        "operationId": "get_compliance_dfv_statement",
        "description": ">**Required Scope(s):** account:read\n\nYour own family violence statement, its support channels, its approval\nand whether it is ready to publish, as the portal's Retail Settings\nshows it. Approve and publish it in the portal, at `portalUrl`. 404 while\nthe end-user portal is off on your account.\n",
        "security": [
          {
            "OAuth2": [
              "account:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/DfvStatement"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "put": {
        "tags": [
          "Account"
        ],
        "summary": "Update Family Violence Statement",
        "operationId": "put_compliance_dfv_statement",
        "description": ">**Required Scope(s):** account:update\n\nSave the statement's text. A field you leave out keeps its value; send\nnull or an empty string to clear one. Approval belongs to the wording\nthat was approved, so changing any of the six wording fields revokes it\nand takes the statement off your portal until it is approved and\npublished again; `approvalRevoked` says when that happened.\n`interimNotice` and `supportAvailableFrom` do not touch approval.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "account:update"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "safetyCommitment": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 4000
                  },
                  "continuityCommitment": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 4000
                  },
                  "nonPaymentCommitment": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 4000
                  },
                  "contactInstructions": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 4000
                  },
                  "supportOrganisations": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 4000
                  },
                  "accessibilityNote": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 4000
                  },
                  "interimNotice": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 4000
                  },
                  "supportAvailableFrom": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The statement as it now stands.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/DfvStatement"
                        },
                        {
                          "type": "object",
                          "required": [
                            "approvalRevoked"
                          ],
                          "properties": {
                            "approvalRevoked": {
                              "type": "boolean",
                              "description": "This change revoked an approval and unpublished the statement."
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/compliance/dfv-statement/channels": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Add Family Violence Support Channel",
        "operationId": "post_compliance_dfv_statement_channel",
        "description": ">**Required Scope(s):** account:update\n\nAdd a way for an affected person to reach you, last in order. A web form\nnever counts as reaching a person, so `connectsToIndividual` is stored\nfalse for one. 404 while the end-user portal is off on your account.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "account:update"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type",
                  "label",
                  "value"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "phone_line",
                      "webform",
                      "online_chat",
                      "in_person",
                      "email"
                    ]
                  },
                  "label": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "value": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "hours": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 120
                  },
                  "connectsToIndividual": {
                    "type": "boolean",
                    "default": false
                  },
                  "supportsCallback": {
                    "type": "boolean",
                    "default": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Added.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/DfvSupportChannel"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/compliance/dfv-statement/channels/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "description": "The channel's `id` (a uuid), as `GET /compliance/dfv-statement` lists it.",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "delete": {
        "tags": [
          "Account"
        ],
        "summary": "Remove Family Violence Support Channel",
        "operationId": "delete_compliance_dfv_statement_channel",
        "description": ">**Required Scope(s):** account:update\n\nRemove a support channel. 404 when your statement has no such channel,\nor while the end-user portal is off on your account.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "account:update"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "Removed."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/compliance/complaints-process": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get Complaints Process",
        "operationId": "get_compliance_complaints_process",
        "description": ">**Required Scope(s):** account:read\n\nYour own complaints process, its contact details, its approval and\nwhether it is ready to publish, as the portal's Retail Settings shows\nit. Approve and publish it in the portal, at `portalUrl`. 404 while the\nend-user portal is off on your account.\n",
        "security": [
          {
            "OAuth2": [
              "account:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ComplaintsProcess"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "put": {
        "tags": [
          "Account"
        ],
        "summary": "Update Complaints Process",
        "operationId": "put_compliance_complaints_process",
        "description": ">**Required Scope(s):** account:update\n\nSave the process. A field you leave out keeps its value; send null or an\nempty string to clear one. Approval belongs to the summaries that were\napproved, so changing either summary revokes it and takes the process\noff your portal until it is approved and published again;\n`approvalRevoked` says when that happened. The contact details do not\ntouch approval. `contactUrl` must be an `http` or `https` address, as it\nis published as a link.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "account:update"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "processSummary": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 4000
                  },
                  "outageProcessSummary": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 4000
                  },
                  "contactPhone": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 60
                  },
                  "contactEmail": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "email",
                    "maxLength": 255
                  },
                  "contactUrl": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uri",
                    "maxLength": 255
                  },
                  "contactPostalAddress": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "hours": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 120
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The process as it now stands.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/ComplaintsProcess"
                        },
                        {
                          "type": "object",
                          "required": [
                            "approvalRevoked"
                          ],
                          "properties": {
                            "approvalRevoked": {
                              "type": "boolean",
                              "description": "This change revoked an approval and unpublished the process."
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/account/payment-charges": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "List Payment Charges",
        "operationId": "list_payment_charges",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nThe card and direct debit charges we started on your account, newest\nfirst, so your system can see a payment under way before it reaches your\nbalance. A direct debit stays in flight for a few business days. Settled\ncharges appear on List Payments as well.\n",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "`open` for the charges still in flight, or one settled status. Any other value answers `400`.",
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "succeeded",
                "failed",
                "errored",
                "reversed"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A page of charges.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PaymentCharge"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/account/statement": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get Account Statement",
        "operationId": "get_account_statement",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nYour statement for a period, the same one the portal's Statement page\nshows: the opening balance, every invoice, credit note, payment and\nreversal in date order with the running balance, and the closing\nbalance. Amounts include GST. A debit is what you owed us more; a credit\nis a payment or credit note.\n\nDates are in your account's own timezone. Leave both out for the\nportal's default period. A date that is not a real date, or a `from`\nafter `to`, answers `422`. Set `format=csv` for the portal's CSV export.\n",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The statement, in `result`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "from": {
                          "type": "string",
                          "format": "date"
                        },
                        "to": {
                          "type": "string",
                          "format": "date"
                        },
                        "openingBalance": {
                          "type": "string",
                          "example": "250.00"
                        },
                        "totalDebits": {
                          "type": "string"
                        },
                        "totalCredits": {
                          "type": "string"
                        },
                        "closingBalance": {
                          "type": "string"
                        },
                        "currency": {
                          "type": "string",
                          "example": "AUD"
                        },
                        "lines": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "date": {
                                "type": "string",
                                "format": "date"
                              },
                              "type": {
                                "type": "string",
                                "example": "invoice"
                              },
                              "reference": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "description": {
                                "type": "string"
                              },
                              "debit": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "credit": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "balance": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/account/credit-alerts": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get Credit Alerts",
        "operationId": "get_credit_alerts",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nYour credit warning settings, as the portal's Credit Alerts page holds\nthem: whether warnings are on, the percentages of your credit limit they\nare sent at, the channels, and who receives them. With no recipients,\nwarnings go to `fallbackEmail`, your billing contact.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The settings.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/CreditAlertSettings"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      },
      "patch": {
        "tags": [
          "Account"
        ],
        "summary": "Update Credit Alerts",
        "operationId": "update_credit_alerts",
        "security": [
          {
            "OAuth2": [
              "billing:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:update\n\nChange any of `enabled`, `thresholds` and `channels`; what you leave out\nstays as it is. Thresholds come from `availableThresholds`. A setting the\nportal would refuse answers `422`.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "thresholds": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "example": 80
                    }
                  },
                  "channels": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "email",
                        "sms"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The settings after the change.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/CreditAlertSettings"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/account/credit-alerts/recipients": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Add Credit Alert Recipient",
        "operationId": "add_credit_alert_recipient",
        "security": [
          {
            "OAuth2": [
              "billing:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:update\n\nAdd one person to receive credit warnings: send `email` or `mobile`, not\nboth. A mobile that is not an Australian mobile answers `422`.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "mobile": {
                    "type": "string",
                    "example": "0412345678"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The recipient.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/CreditAlertRecipient"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/account/credit-alerts/recipients/{recipientId}": {
      "parameters": [
        {
          "name": "recipientId",
          "in": "path",
          "required": true,
          "description": "The recipient's `id` (a uuid).",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "delete": {
        "tags": [
          "Account"
        ],
        "summary": "Remove Credit Alert Recipient",
        "operationId": "remove_credit_alert_recipient",
        "security": [
          {
            "OAuth2": [
              "billing:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:update\n\nStop sending credit warnings to one recipient. One that is not on your\naccount answers `404`.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "responses": {
          "204": {
            "x-summary": "No Content",
            "description": "Removed."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/account/payment-methods": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "List Payment Methods",
        "operationId": "list_payment_methods",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nThe cards and direct debit authorities stored on your account, as the\nportal's Payment Methods page lists them. Revoked ones are left out.\nAdding a method stays in the portal, because it takes your card or bank\ndetails on the payment provider's own page.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The stored methods.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "The method's public id."
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "card",
                              "direct_debit"
                            ]
                          },
                          "label": {
                            "type": "string",
                            "example": "Visa ending 4242"
                          },
                          "status": {
                            "type": "string"
                          },
                          "isDefault": {
                            "type": "boolean"
                          }
                        }
                      }
                    },
                    "autopayMethodId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid",
                      "description": "The `id` of the method autopay charges, or null when autopay is off."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/account/payment-methods/{methodId}": {
      "parameters": [
        {
          "name": "methodId",
          "in": "path",
          "required": true,
          "description": "The method's `id` (a uuid) from List Payment Methods.",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "delete": {
        "tags": [
          "Account"
        ],
        "summary": "Remove Payment Method",
        "operationId": "remove_payment_method",
        "security": [
          {
            "OAuth2": [
              "billing:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:update\n\nRemove a stored method, as the portal does. When it was the default,\nanother stored method becomes the default. A method not on your account\nanswers `404`. This never takes a payment.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "responses": {
          "204": {
            "x-summary": "No Content",
            "description": "Removed."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/account/payment-methods/{methodId}/default": {
      "parameters": [
        {
          "name": "methodId",
          "in": "path",
          "required": true,
          "description": "The method's `id` (a uuid) from List Payment Methods.",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Make Payment Method Default",
        "operationId": "make_payment_method_default",
        "security": [
          {
            "OAuth2": [
              "billing:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:update\n\nMake a stored method the default. A method not on your account answers\n`404`. This never takes a payment.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The method, now the default, with the same fields as a List Payment Methods row, inside `result`."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/account/invoice-disputes": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "List Invoice Disputes",
        "operationId": "list_invoice_disputes",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nEvery dispute you have raised on our invoices, newest first. While\ninvoice disputes are switched off, this answers `404`.\n",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A page of disputes.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InvoiceDispute"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/account/invoices/{invoiceId}/disputes": {
      "parameters": [
        {
          "name": "invoiceId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "List Disputes On An Invoice",
        "operationId": "list_invoice_disputes_for_invoice",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nThe disputes on one invoice, and whether you can raise another: how much\nis still disputable and when the window closes. `refusal` says why not\nwhen `canDispute` is false. While invoice disputes are switched off, this\nanswers `404`.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The disputes and what can still be disputed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InvoiceDispute"
                      }
                    },
                    "canDispute": {
                      "type": "boolean"
                    },
                    "refusal": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "disputable": {
                      "type": "string",
                      "description": "The most a new dispute may be for, with GST."
                    },
                    "windowClosesAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "currency": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Raise Invoice Dispute",
        "operationId": "raise_invoice_dispute",
        "security": [
          {
            "OAuth2": [
              "billing:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:update\n\nDispute all or part of an invoice, or one line of it, as the portal does.\nThe disputed amount is held off collection and reminders while the\ndispute is open, and a support ticket is opened. Past the dispute window,\nor for more than is disputable, this answers `422` naming `amount` or\n`reason`. This never takes or refunds a payment.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "reason",
                  "amount"
                ],
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 10,
                    "maxLength": 2000
                  },
                  "amount": {
                    "type": "string",
                    "description": "The amount disputed, with GST, up to two decimals.",
                    "example": "45.00"
                  },
                  "lineId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The line disputed, by its `id` (a uuid) from the invoice's `lineItems`. Leave it out for the invoice as a whole."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The dispute.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/InvoiceDispute"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/account/invoice-groups": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "List Invoice Groups",
        "operationId": "list_invoice_groups",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nThe groups that section our invoice to you, by name. Each group prints\nas its own section with its PO number and subtotal; lines in no group\nprint under Other.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The groups.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InvoiceGroup"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      },
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Create Invoice Group",
        "operationId": "create_invoice_group",
        "security": [
          {
            "OAuth2": [
              "billing:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:update\n\nAdd a group to our invoice. A name already used (ignoring case) answers\n`422`. It applies from the next invoice.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceGroupInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The group.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/InvoiceGroup"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/account/invoice-groups/{groupId}": {
      "parameters": [
        {
          "name": "groupId",
          "in": "path",
          "required": true,
          "description": "The group's `id` (a uuid).",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get Invoice Group",
        "operationId": "get_invoice_group",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nOne group on our invoice, with the services in it.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The group.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/InvoiceGroup"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "services": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/InvoiceService"
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "patch": {
        "tags": [
          "Account"
        ],
        "summary": "Update Invoice Group",
        "operationId": "update_invoice_group",
        "security": [
          {
            "OAuth2": [
              "billing:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:update\n\nRename a group or change its description, PO number or cost centre.\nOnly the fields sent change. It applies from the next invoice; issued\ninvoices keep the values they were issued with.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceGroupInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The group.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/InvoiceGroup"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      },
      "delete": {
        "tags": [
          "Account"
        ],
        "summary": "Remove Invoice Group",
        "operationId": "remove_invoice_group",
        "security": [
          {
            "OAuth2": [
              "billing:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:update\n\nRemove a group with no services in it. A group that still has services\nanswers `422`: move them to another group, or out of groups, first.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "responses": {
          "204": {
            "x-summary": "No Content",
            "description": "Removed."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/account/invoice-groups/{groupId}/services": {
      "parameters": [
        {
          "name": "groupId",
          "in": "path",
          "required": true,
          "description": "The group's `id` (a uuid).",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "put": {
        "tags": [
          "Account"
        ],
        "summary": "Set Invoice Group Services",
        "operationId": "set_invoice_group_services",
        "security": [
          {
            "OAuth2": [
              "billing:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:update\n\nMake the group's services exactly this list. A listed service moves in\nfrom any other group (a service is in at most one); a service left off\nthe list leaves groups and prints under Other. An empty list empties the\ngroup. A service not on your account answers `422`. It applies from the\nnext invoice.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "services"
                ],
                "properties": {
                  "services": {
                    "type": "array",
                    "maxItems": 1000,
                    "items": {
                      "type": "object",
                      "required": [
                        "serviceType",
                        "serviceRef"
                      ],
                      "properties": {
                        "serviceType": {
                          "type": "string",
                          "enum": [
                            "data_service",
                            "trunk",
                            "fax_plan",
                            "transit_service",
                            "vpn_user"
                          ]
                        },
                        "serviceRef": {
                          "type": "string",
                          "example": "AVC000123456789"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The group.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/InvoiceGroup"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/account/invoice-services": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "List Invoice Services",
        "operationId": "list_invoice_services",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nEvery live service on our invoice to you, with its invoice group and its\nown billing label, PO number and cost centre.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The services.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InvoiceService"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/account/invoice-services/{serviceType}/{serviceRef}": {
      "parameters": [
        {
          "name": "serviceType",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "enum": [
              "data_service",
              "trunk",
              "fax_plan",
              "transit_service",
              "vpn_user"
            ]
          }
        },
        {
          "name": "serviceRef",
          "in": "path",
          "required": true,
          "description": "The service's reference, as invoice lines' `serviceRef`.",
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get Invoice Service",
        "operationId": "get_invoice_service",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nOne service's place on our invoice. A service not on your account\nanswers `404`.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The service.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/InvoiceService"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "put": {
        "tags": [
          "Account"
        ],
        "summary": "Set Invoice Service Details",
        "operationId": "set_invoice_service",
        "security": [
          {
            "OAuth2": [
              "billing:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:update\n\nSet the service's own billing label, PO number and cost centre on our\ninvoice. Only the fields sent change; null or blank clears one, and a\ncleared PO or cost centre falls back to the group's. Place the service\nin a group with `PUT /account/invoice-groups/{groupId}/services`. It\napplies from the next invoice.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "invoiceLabel": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "poNumber": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 64
                  },
                  "costCentre": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 64
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The service.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/InvoiceService"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/partners/commission-runs": {
      "get": {
        "tags": [
          "Partners"
        ],
        "summary": "List Commission Runs",
        "operationId": "list_partner_commission_runs",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nYour partners' monthly commission runs, newest first, as the portal's\nPartners page lists them. Read only: rates, finalising and recording a\npayout stay in the portal. While partner commissions are switched off,\nthis answers `404`.\n",
        "parameters": [
          {
            "name": "partner",
            "in": "query",
            "required": false,
            "description": "One partner's user id. One that is not your partner answers `422`.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "finalised",
                "paid"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A page of runs.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "gstShown": {
                      "type": "boolean",
                      "description": "Whether the portal shows these figures with GST."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PartnerCommissionRun"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/partners/commission-runs/{runId}": {
      "parameters": [
        {
          "name": "runId",
          "in": "path",
          "required": true,
          "description": "The run's `id` (a uuid).",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "tags": [
          "Partners"
        ],
        "summary": "Get Commission Run",
        "operationId": "get_partner_commission_run",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nOne run with its breakdown by client and product, and the clawbacks it\ntook. Another account's run answers `404`.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The run.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/PartnerCommissionRun"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "gstShown": {
                              "type": "boolean"
                            },
                            "breakdown": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "client": {
                                    "type": "string"
                                  },
                                  "product": {
                                    "type": "string"
                                  },
                                  "repayment": {
                                    "type": "boolean",
                                    "description": "An invoice paid again after a clawback, earning its commission back."
                                  },
                                  "revenueExGst": {
                                    "type": "string"
                                  },
                                  "revenueGst": {
                                    "type": "string"
                                  },
                                  "revenueIncGst": {
                                    "type": "string"
                                  },
                                  "ratePercent": {
                                    "type": "string"
                                  },
                                  "commissionExGst": {
                                    "type": "string"
                                  },
                                  "commissionGst": {
                                    "type": "string"
                                  },
                                  "commissionIncGst": {
                                    "type": "string"
                                  }
                                }
                              }
                            },
                            "clawbacksTaken": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/PartnerCommissionClawback"
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/partners/commission-clawbacks": {
      "get": {
        "tags": [
          "Partners"
        ],
        "summary": "List Outstanding Clawbacks",
        "operationId": "list_partner_commission_clawbacks",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nClawbacks still to come off your partners' commission.\n",
        "parameters": [
          {
            "name": "partner",
            "in": "query",
            "required": false,
            "description": "One partner's user id. One that is not your partner answers `422`.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The outstanding clawbacks.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "gstShown": {
                      "type": "boolean"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PartnerCommissionClawback"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/partners/{partnerId}/commission-rates": {
      "parameters": [
        {
          "name": "partnerId",
          "in": "path",
          "required": true,
          "description": "The partner's user id.",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "tags": [
          "Partners"
        ],
        "summary": "Get Partner Commission Rates",
        "operationId": "get_partner_commission_rates",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nOne partner's commission rates: the default, any rate for a product type,\nand any rate for one product. The most specific applies. A user who is\nnot your partner answers `404`.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The rates.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "partnerId": {
                          "type": "string"
                        },
                        "partnerName": {
                          "type": "string"
                        },
                        "basis": {
                          "type": "string"
                        },
                        "defaultRatePercent": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "example": "12.5"
                        },
                        "productTypeRates": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "productType": {
                                "type": "string"
                              },
                              "ratePercent": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "productRates": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "productSku": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "productName": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "ratePercent": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/end-users/invoices": {
      "get": {
        "tags": [
          "End User Billing"
        ],
        "summary": "List End-User Invoices",
        "operationId": "list_end_user_invoices",
        "security": [
          {
            "OAuth2": [
              "retail:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:read\n\nThe invoices you issued to your end users, newest first: issued, paid\nand void ones. An invoice held for approval is on\n[/end-users/invoice-approvals](#tag/End-User-Billing/operation/list_end_user_invoice_approvals)\nuntil it is released. The invoices Check Networks issues to you are on\n/account/invoices, and never here.\n\nAnswers 404 unless your account bills its end users.\n\n`?format=csv` or `?format=ndjson` streams every matching invoice instead\nof a page.\n",
        "parameters": [
          {
            "name": "endUser",
            "in": "query",
            "description": "Only this end user's invoices, by their number. An unknown number is a 422.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "unpaid",
                "overdue",
                "paid",
                "void"
              ]
            }
          },
          {
            "name": "issuedFrom",
            "in": "query",
            "description": "Issued on or after this date, YYYY-MM-DD. The day is the one the invoice shows: on the time zone it was cut in (its `timezone`). Send `CN-Time-Zone` to read the date on your own zone instead. Leave either end open. A date that is not a real date, or a start after the end, answers `422`.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "issuedTo",
            "in": "query",
            "description": "Issued on or before this date, the whole day included.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "number",
            "in": "query",
            "description": "Invoice number contains this.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "perPage",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "ndjson"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A page of invoices.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RetailInvoice"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/end-users/invoices/{invoiceId}": {
      "parameters": [
        {
          "name": "invoiceId",
          "in": "path",
          "required": true,
          "description": "The end-user invoice's id.",
          "schema": {
            "type": "string"
          },
          "example": "01jd3z6r9k2m4n8p0q5s7t1v3w"
        }
      ],
      "get": {
        "tags": [
          "End User Billing"
        ],
        "summary": "Get End-User Invoice",
        "operationId": "get_end_user_invoice",
        "security": [
          {
            "OAuth2": [
              "retail:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:read\n\nOne invoice you issued to an end user, with its lines. An invoice of\nCheck Networks', a draft, one held for approval or another account's\nanswers 404.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The invoice and its lines.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/RetailInvoice"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/end-users/invoices/{invoiceId}/pdf": {
      "parameters": [
        {
          "name": "invoiceId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "End User Billing"
        ],
        "summary": "Download End-User Invoice PDF",
        "operationId": "get_end_user_invoice_pdf",
        "security": [
          {
            "OAuth2": [
              "retail:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:read\n\nThe PDF the end user was sent, under your brand.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The PDF.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/end-users/invoices/{invoiceId}/resend": {
      "parameters": [
        {
          "name": "invoiceId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "End User Billing"
        ],
        "summary": "Resend End-User Invoice",
        "operationId": "resend_end_user_invoice",
        "security": [
          {
            "OAuth2": [
              "retail:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:update\n\nSends an issued or paid invoice again, the same email the bill run sent,\nto the end user's billing email address (or their email address if they\nhave no billing one). The call takes no address: a body naming one (`to`,\n`email`, `cc`, `bcc` or `recipient`) is a 422, so an invoice never goes\nanywhere else. An invoice can be resent three times an hour; a fourth is\na 422 that says when to try again.\n\nFor an end user with a family violence safety record it goes to the\nsafe email on that record. Where the method agreed with them does not\nallow email, nothing is sent and the call is a 422 saying so; our team\nis told to deliver it the agreed way.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "Sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "sent"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/end-users/invoices/{invoiceId}/payments": {
      "parameters": [
        {
          "name": "invoiceId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "End User Billing"
        ],
        "summary": "List Payments on an End-User Invoice",
        "operationId": "list_end_user_invoice_payments",
        "security": [
          {
            "OAuth2": [
              "retail:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:read\n\nThe payments applied to this invoice, oldest first. Payments settle an\nend user's invoices oldest first, so one payment can be part-applied\nhere and part to another invoice: `appliedToInvoice` is this invoice's\npart. A payment later reversed is left off.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The payments.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RetailPayment"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "tags": [
          "End User Billing"
        ],
        "summary": "Record a Payment on an End-User Invoice",
        "operationId": "record_end_user_invoice_payment",
        "security": [
          {
            "OAuth2": [
              "retail:create"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:create\n\nRecords money the end user paid you outside the portal against an\nissued invoice, as **Record Payment** does in the portal. It comes off\nwhat they owe; more than the invoice's balance stays on their account\nas credit. Send an `Idempotency-Key`: it names the payment, so a retry\nwith the same key records it once and answers 200 with `duplicate: true`.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "amount",
                  "paidOn"
                ],
                "properties": {
                  "amount": {
                    "type": "string",
                    "description": "Inc. GST, as a dollar string.",
                    "example": "49.95"
                  },
                  "paidOn": {
                    "type": "string",
                    "format": "date",
                    "description": "The day the money was received: today or earlier, on\nBrisbane's calendar. A later day is refused with a 422 on\n`paidOn`.\n"
                  },
                  "reference": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "Already recorded with this Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "payment": {
                          "$ref": "#/components/schemas/RetailPayment"
                        },
                        "amountDue": {
                          "type": "string",
                          "description": "What is still owed on the invoice."
                        },
                        "invoiceStatus": {
                          "type": "string",
                          "enum": [
                            "unpaid",
                            "overdue",
                            "paid"
                          ]
                        },
                        "duplicate": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "201": {
            "x-summary": "Created",
            "description": "Recorded.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "payment": {
                          "$ref": "#/components/schemas/RetailPayment"
                        },
                        "amountDue": {
                          "type": "string",
                          "description": "What is still owed on the invoice."
                        },
                        "invoiceStatus": {
                          "type": "string",
                          "enum": [
                            "unpaid",
                            "overdue",
                            "paid"
                          ]
                        },
                        "duplicate": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/end-users/invoices/{invoiceId}/credit": {
      "parameters": [
        {
          "name": "invoiceId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "End User Billing"
        ],
        "summary": "Get What Can Be Credited",
        "operationId": "get_end_user_invoice_creditable",
        "security": [
          {
            "OAuth2": [
              "retail:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:read\n\nHow much of this invoice is left to credit: its total less the credit\nnotes already issued against it. Zero on a void invoice.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The amount left to credit.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "invoiceId": {
                          "type": "string"
                        },
                        "creditable": {
                          "type": "string",
                          "description": "Inc. GST.",
                          "example": "49.95"
                        },
                        "currency": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/end-users/invoices/{invoiceId}/credit-notes": {
      "parameters": [
        {
          "name": "invoiceId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "End User Billing"
        ],
        "summary": "Credit an End-User Invoice",
        "operationId": "credit_end_user_invoice",
        "security": [
          {
            "OAuth2": [
              "retail:create"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:create\n\nIssues a credit note against an issued or paid invoice, the one way to\ncorrect it, as **Credit** does in the portal. The credit note is raised\non our side and answers 202; it is listed on\n[/end-users/credit-notes](#tag/End-User-Billing/operation/list_end_user_credit_notes)\nonce issued, and emailed to the end user. More than is left to credit\nis a 422 naming the amount left. 503 means billing could not be reached:\nretry with the same `Idempotency-Key`.\n\nThe decision is the API key's own: the key's scopes are its authority,\nand the audit log names the key, not a user.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "amount",
                  "reason"
                ],
                "properties": {
                  "amount": {
                    "type": "string",
                    "description": "Inc. GST, as a dollar string. At least 0.01.",
                    "example": "10.00"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 5,
                    "maxLength": 500,
                    "description": "Printed on the credit note."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "x-summary": "Accepted",
            "description": "The credit note is being issued.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "invoiceId": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "queued"
                          ]
                        },
                        "amount": {
                          "type": "string"
                        },
                        "currency": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/invoices/{invoiceId}/reminders/pause": {
      "parameters": [
        {
          "name": "invoiceId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "End User Billing"
        ],
        "summary": "Pause Payment Reminders on an End-User Invoice",
        "operationId": "pause_end_user_invoice_reminders",
        "security": [
          {
            "OAuth2": [
              "retail:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:update\n\nNo payment reminder about this issued invoice goes out until `until`,\nwhen reminders start again. The due date does not change, and the\ninvoice still shows as overdue. Pausing again replaces the date.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "until",
                  "reason"
                ],
                "properties": {
                  "until": {
                    "type": "string",
                    "format": "date",
                    "description": "The day reminders start again. After today, on your calendar."
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 500
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The invoice, paused.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/RetailInvoice"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/end-users/invoices/{invoiceId}/reminders/resume": {
      "parameters": [
        {
          "name": "invoiceId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "End User Billing"
        ],
        "summary": "Resume Payment Reminders on an End-User Invoice",
        "operationId": "resume_end_user_invoice_reminders",
        "security": [
          {
            "OAuth2": [
              "retail:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:update\n\nLifts a pause at once. An invoice that is not paused answers as it is.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The invoice.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/RetailInvoice"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/end-users/invoice-approvals": {
      "get": {
        "tags": [
          "End User Billing"
        ],
        "summary": "List Held End-User Invoices",
        "operationId": "list_end_user_invoice_approvals",
        "security": [
          {
            "OAuth2": [
              "retail:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:read\n\nInvoices the bill run held instead of sending, because something on\nthem had no price, oldest first. Nothing is posted to the end user's\naccount or emailed while one is held. Release it as it stands, or price\nwhat is listed in `unpriced` and rerun it.\n",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "perPage",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A page of held invoices.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "retail_invoice"
                            ]
                          },
                          "invoiceNumber": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "endUser": {
                            "type": "string"
                          },
                          "endUserName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "held"
                            ]
                          },
                          "final": {
                            "type": "boolean"
                          },
                          "periodStart": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date"
                          },
                          "periodEnd": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date"
                          },
                          "heldAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "unpriced": {
                            "type": "array",
                            "description": "What had no price.",
                            "items": {
                              "type": "string"
                            }
                          },
                          "totalExGst": {
                            "type": "string"
                          },
                          "totalGst": {
                            "type": "string"
                          },
                          "totalIncGst": {
                            "type": "string"
                          },
                          "currency": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/end-users/invoice-approvals/{invoiceId}/release": {
      "parameters": [
        {
          "name": "invoiceId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "End User Billing"
        ],
        "summary": "Release a Held End-User Invoice",
        "operationId": "release_end_user_invoice",
        "security": [
          {
            "OAuth2": [
              "retail:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:update\n\nIssues and sends a held invoice as it stands: what had no price is not\non it. Runs on our side and answers 202; the invoice then appears on\n/end-users/invoices. An invoice no longer held, or already being\nreleased or rerun, is a 409. 503 means billing could not be reached:\nretry. The API key's own decision; the audit log names the key.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "responses": {
          "202": {
            "x-summary": "Accepted",
            "description": "Being released.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "action": {
                          "type": "string",
                          "enum": [
                            "release",
                            "rerun"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "queued"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/invoice-approvals/{invoiceId}/rerun": {
      "parameters": [
        {
          "name": "invoiceId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "End User Billing"
        ],
        "summary": "Rerun a Held End-User Invoice",
        "operationId": "rerun_end_user_invoice",
        "security": [
          {
            "OAuth2": [
              "retail:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:update\n\nRebuilds a held invoice with your current prices and sends it. If\nsomething is still unpriced it is held again. Runs on our side and\nanswers 202. An invoice no longer held, or already being released or\nrerun, is a 409. 503 means billing could not be reached: retry. The API\nkey's own decision; the audit log names the key.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "responses": {
          "202": {
            "x-summary": "Accepted",
            "description": "Being rerun.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "action": {
                          "type": "string",
                          "enum": [
                            "release",
                            "rerun"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "queued"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/credit-notes": {
      "get": {
        "tags": [
          "End User Billing"
        ],
        "summary": "List End-User Credit Notes",
        "operationId": "list_end_user_credit_notes",
        "security": [
          {
            "OAuth2": [
              "retail:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:read\n\nThe credit notes you issued to your end users, newest first. The\ncredit notes Check Networks issues to you are on /account/credit-notes.\n",
        "parameters": [
          {
            "name": "endUser",
            "in": "query",
            "description": "Only this end user's, by their number. An unknown number is a 422.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "issuedFrom",
            "in": "query",
            "description": "Issued on or after this date, YYYY-MM-DD. The day is the one the credit note shows: on the time zone it was cut in (its `timezone`). Send `CN-Time-Zone` to read the date on your own zone instead. Leave either end open. A date that is not a real date, or a start after the end, answers `422`.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "issuedTo",
            "in": "query",
            "description": "Issued on or before this date, the whole day included.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "perPage",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A page of credit notes.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RetailCreditNote"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/end-users/credit-notes/{creditNoteId}": {
      "parameters": [
        {
          "name": "creditNoteId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "End User Billing"
        ],
        "summary": "Get End-User Credit Note",
        "operationId": "get_end_user_credit_note",
        "security": [
          {
            "OAuth2": [
              "retail:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:read\n\nOne credit note you issued to an end user, with its lines.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The credit note.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/RetailCreditNote"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/end-users/credit-notes/{creditNoteId}/pdf": {
      "parameters": [
        {
          "name": "creditNoteId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "End User Billing"
        ],
        "summary": "Download End-User Credit Note PDF",
        "operationId": "get_end_user_credit_note_pdf",
        "security": [
          {
            "OAuth2": [
              "retail:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:read\n\nThe PDF the end user was sent.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The PDF.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/end-users/{endUser}/invoices/preview": {
      "parameters": [
        {
          "name": "endUser",
          "in": "path",
          "required": true,
          "description": "The end user's number.",
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "End User Billing"
        ],
        "summary": "Preview an End User's Next Invoice",
        "operationId": "preview_end_user_invoice",
        "security": [
          {
            "OAuth2": [
              "retail:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:read\n\nWhat the bill run would put on this month's invoice if it ran now,\nbuilt from the bill run's own lines and saving nothing. Usage is to\n`usageTo`, so the figures can change before the invoice issues. `held`\nsays the bill run would hold it for approval, with what is `unpriced`.\n`status` other than `preview` says why there is nothing to show: the\nmonth is already invoiced, there is nothing to bill, the end user is\nsuspended, or their final invoice has issued.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The preview.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "endUser": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "preview",
                            "already_invoiced",
                            "nothing_to_bill",
                            "suspended",
                            "finally_invoiced"
                          ]
                        },
                        "periodStart": {
                          "type": "string",
                          "format": "date"
                        },
                        "periodEnd": {
                          "type": "string",
                          "format": "date"
                        },
                        "usageTo": {
                          "type": "string",
                          "format": "date"
                        },
                        "note": {
                          "type": "string"
                        },
                        "held": {
                          "type": "boolean"
                        },
                        "unpriced": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "warnings": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "totalExGst": {
                          "type": "string"
                        },
                        "totalGst": {
                          "type": "string"
                        },
                        "totalIncGst": {
                          "type": "string"
                        },
                        "currency": {
                          "type": "string"
                        },
                        "lines": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "description": {
                                "type": "string"
                              },
                              "serviceType": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "quantity": {
                                "type": [
                                  "number",
                                  "string"
                                ]
                              },
                              "unitPriceExGst": {
                                "type": "string"
                              },
                              "amountExGst": {
                                "type": "string"
                              },
                              "amountGst": {
                                "type": "string"
                              },
                              "amountIncGst": {
                                "type": "string"
                              },
                              "servicePeriodStart": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date"
                              },
                              "servicePeriodEnd": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/end-users/{endUser}/invoices/final": {
      "parameters": [
        {
          "name": "endUser",
          "in": "path",
          "required": true,
          "description": "The end user's number.",
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "End User Billing"
        ],
        "summary": "Check an End User's Final Invoice",
        "operationId": "check_end_user_final_invoice",
        "security": [
          {
            "OAuth2": [
              "retail:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:read\n\nWhether the end user's final invoice can be issued now. It can once\nevery service assigned to them and every recurring charge of your own\nhas an end date, and the usage window after the last of them has\npassed (three days by default, as usage takes that long to arrive).\nOtherwise `finalInvoiceReasons` says what is still open, each with a\nstable `code`, and `finalInvoiceEarliestDate` the earliest it can be\nissued when that is known.\n\nCodes: `final_invoice_already_issued`, `service_without_end_date`,\n`charge_without_end_date`, `nothing_to_bill`, `usage_window_open`. New\ncodes may be added.\n\nWhen your last invoice to the end user already billed everything through\nthe last end date (the monthly bill run got there first),\n`finalInvoiceAllowed` is true and `finalInvoiceReasons` holds one\nreason, `already_billed_through_end`: issuing makes no new invoice, and\nmarks the end user finally invoiced.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The check.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "endUser": {
                          "type": "string"
                        },
                        "finalInvoiceAllowed": {
                          "type": "boolean"
                        },
                        "finalInvoiceEarliestDate": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date"
                        },
                        "finalInvoiceReasons": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "tags": [
          "End User Billing"
        ],
        "summary": "Issue an End User's Final Invoice",
        "operationId": "issue_end_user_final_invoice",
        "security": [
          {
            "OAuth2": [
              "retail:create"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:create\n\nBills the end user for everything since their last invoice up to the\nend of their last service or charge, issues the invoice and emails it\nnow; the monthly bill run skips them from then on. It cannot be undone:\ncorrect it with a credit note. Answers 201 with the invoice, whose\n`status` is `held` when part of it had no price (release or rerun it\nunder /end-users/invoice-approvals). Refused with a 422 whose error\ncarries `reasons` (as the check above) and `earliestIssueDate`. 503\nmeans billing could not be reached: retry. The API key's own decision;\nthe audit log names the key.\n\nWhen the last invoice already billed everything through the last end\ndate, no invoice is made: the end user is marked finally invoiced\nthrough that date, usage after it is refused from then on, and the\nanswer is a 200 with `code` `already_billed_through_end` and a\n`message` saying so.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "Nothing was left to bill. The end user is marked finally invoiced, with no new invoice.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "endUser": {
                          "type": "string"
                        },
                        "finallyInvoicedThrough": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date",
                          "description": "The last service's end date, the day they are finally invoiced through."
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "already_billed_through_end"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "201": {
            "x-summary": "Created",
            "description": "The final invoice.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/RetailInvoice"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/ledger": {
      "parameters": [
        {
          "name": "endUser",
          "in": "path",
          "required": true,
          "description": "The end user's number.",
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "End User Billing"
        ],
        "summary": "Get an End User's Transactions",
        "operationId": "get_end_user_ledger",
        "security": [
          {
            "OAuth2": [
              "retail:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:read\n\nEvery invoice, payment, credit note and adjustment on the end user's\naccount between `from` and `to` (dates on your calendar), oldest first,\nwith the opening, running and closing balance. Defaults to the first of\nthe month two months back up to today. Pages by cursor: pass\n`nextCursor` back as `cursor` until it is `null`.\n\nOne request covers at most 12 months: `to` may be up to 12 months after\n`from` (1 January to the next 1 January is the longest). A longer range\nanswers 400; ask for it a year at a time.\n",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The transactions.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "endUser": {
                      "type": "string"
                    },
                    "from": {
                      "type": "string",
                      "format": "date"
                    },
                    "to": {
                      "type": "string",
                      "format": "date"
                    },
                    "openingBalance": {
                      "type": "string"
                    },
                    "closingBalance": {
                      "type": "string"
                    },
                    "currency": {
                      "type": "string"
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EndUserLedgerEntry"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/end-users/{endUser}/ledger/adjustments": {
      "parameters": [
        {
          "name": "endUser",
          "in": "path",
          "required": true,
          "description": "The end user's number.",
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "End User Billing"
        ],
        "summary": "Post an Adjustment to an End User's Account",
        "operationId": "post_end_user_ledger_adjustment",
        "security": [
          {
            "OAuth2": [
              "retail:create"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:create\n\nChanges what the end user owes without an invoice or credit note, for\nexample to write off a small balance. A positive `amount` adds to what\nthey owe; a negative one takes off it and pays their oldest unpaid\ninvoice first. The amount includes GST. It shows on their statement\nwith your `reason`. Send an `Idempotency-Key`: it names the adjustment,\nso a retry with the same key posts it once and answers 200.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "amount",
                  "reason"
                ],
                "properties": {
                  "amount": {
                    "type": "string",
                    "description": "Signed, inc. GST, as a dollar string. Not zero.",
                    "example": "-12.50"
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 500
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "Already posted with this Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "adjustment"
                          ]
                        },
                        "direction": {
                          "type": "string",
                          "enum": [
                            "debit",
                            "credit"
                          ]
                        },
                        "amountExGst": {
                          "type": "string"
                        },
                        "amountGst": {
                          "type": "string"
                        },
                        "amountIncGst": {
                          "type": "string"
                        },
                        "currency": {
                          "type": "string"
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "date": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date",
                          "description": "The day it was posted, on your account's time zone."
                        },
                        "balance": {
                          "type": "string",
                          "description": "What the end user owes now."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "201": {
            "x-summary": "Created",
            "description": "Posted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "adjustment"
                          ]
                        },
                        "direction": {
                          "type": "string",
                          "enum": [
                            "debit",
                            "credit"
                          ]
                        },
                        "amountExGst": {
                          "type": "string"
                        },
                        "amountGst": {
                          "type": "string"
                        },
                        "amountIncGst": {
                          "type": "string"
                        },
                        "currency": {
                          "type": "string"
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "date": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date",
                          "description": "The day it was posted, on your account's time zone."
                        },
                        "balance": {
                          "type": "string",
                          "description": "What the end user owes now."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/end-users/hardship": {
      "get": {
        "tags": [
          "End User Cases"
        ],
        "summary": "List Hardship Cases",
        "operationId": "list_end_user_hardship_cases",
        "security": [
          {
            "OAuth2": [
              "retail-cases:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail-cases:read\n\nYour end users' financial hardship cases, newest first.\n`assessmentDueBefore` lists the applications still to assess whose\ndeadline falls on or before that day.\n\n**Your obligations.** A hardship case read or decided through the API\ncarries the same obligations under the Telecommunications (Financial\nHardship) Industry Standard 2024 as one in the portal. You are the end\nuser's supplier and responsible for meeting them: the deadlines, the\noptions you offer, and the notices.\n",
        "parameters": [
          {
            "name": "endUser",
            "in": "query",
            "description": "Only this end user's, by their number. An unknown number is a 422.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "proposed",
                "active",
                "completed",
                "cancelled",
                "declined"
              ]
            }
          },
          {
            "name": "assessmentDueBefore",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "perPage",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A page of cases.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/HardshipCase"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/end-users/{endUser}/hardship": {
      "parameters": [
        {
          "name": "endUser",
          "in": "path",
          "required": true,
          "description": "The end user's number.",
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "End User Cases"
        ],
        "summary": "List an End User's Hardship Cases",
        "operationId": "list_end_user_hardship",
        "security": [
          {
            "OAuth2": [
              "retail-cases:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail-cases:read\n\nOne end user's hardship cases, newest first.\n\n**Your obligations.** A hardship case read or decided through the API\ncarries the same obligations under the Telecommunications (Financial\nHardship) Industry Standard 2024 as one in the portal, and you are\nresponsible for meeting them.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The cases.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/HardshipCase"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "tags": [
          "End User Cases"
        ],
        "summary": "Open a Hardship Case",
        "operationId": "open_end_user_hardship",
        "security": [
          {
            "OAuth2": [
              "retail-cases:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail-cases:update\n\nRecords an arrangement agreed with the end user (`status: active`), or\nan application to assess (`status: proposed`), which then has an\nassessment deadline in business days on your calendar. The end user is\nsent the acknowledgement or the written confirmation under your brand,\nas from the portal. `options` must be ones you offer\n(/retail/hardship-options); a payment plan needs `instalmentAmount` and\n`instalmentCount`, and fee or debt relief `reliefAmount`.\n\nAn end user has one case at a time: while one is under assessment\n(`proposed`) or `active`, opening another answers `409` and sends\nnothing. Assess or close that case first. Send an `Idempotency-Key`: it\nis required, so a retry after a timeout replays the first answer and\nnever opens a second case or sends a second notice.\n\n**Your obligations.** Opening a case through the API carries the same\nobligations under the Telecommunications (Financial Hardship) Industry\nStandard 2024 as opening it in the portal. You are responsible for\nmeeting them, and the case is recorded as made by the user who created\nthe API key.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "options",
                  "status"
                ],
                "properties": {
                  "options": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string"
                    }
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "active",
                      "proposed"
                    ]
                  },
                  "pauseAutopay": {
                    "type": "boolean",
                    "default": true
                  },
                  "reviewOn": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "endsOn": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "reason": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "notes": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000
                  },
                  "instalmentAmount": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Dollar string."
                  },
                  "instalmentCount": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 120
                  },
                  "reliefAmount": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Dollar string."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The case.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/HardshipCase"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/end-users/{endUser}/hardship/{caseId}/assess": {
      "parameters": [
        {
          "name": "endUser",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "caseId",
          "in": "path",
          "required": true,
          "description": "The case's `id` (a uuid).",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "post": {
        "tags": [
          "End User Cases"
        ],
        "summary": "Assess a Hardship Application",
        "operationId": "assess_end_user_hardship",
        "security": [
          {
            "OAuth2": [
              "retail-cases:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail-cases:update\n\nThe outcome of an application under assessment: `approve` makes it an\nactive arrangement and sends the end user the written confirmation;\n`decline` closes it and tells them the outcome. A case not under\nassessment is a 409.\n\n**Your obligations.** An assessment made through the API carries the\nsame obligations under the Telecommunications (Financial Hardship)\nIndustry Standard 2024 as one made in the portal, and you are\nresponsible for meeting them. It is recorded as the API key's own\ndecision, with no user.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "decision"
                ],
                "properties": {
                  "decision": {
                    "type": "string",
                    "enum": [
                      "approve",
                      "decline"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The case.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/HardshipCase"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/end-users/{endUser}/hardship/{caseId}/close": {
      "parameters": [
        {
          "name": "endUser",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "caseId",
          "in": "path",
          "required": true,
          "description": "The case's `id` (a uuid).",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "post": {
        "tags": [
          "End User Cases"
        ],
        "summary": "Close a Hardship Case",
        "operationId": "close_end_user_hardship",
        "security": [
          {
            "OAuth2": [
              "retail-cases:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail-cases:update\n\nCloses a case as `completed`, `cancelled` or `declined`. A closed case\nis a 409.\n\n**Your obligations.** Closing a case through the API carries the same\nobligations under the Telecommunications (Financial Hardship) Industry\nStandard 2024 as closing it in the portal, and you are responsible for\nmeeting them. It is recorded as made by the user who created the API\nkey.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "status"
                ],
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "completed",
                      "cancelled",
                      "declined"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The case.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/HardshipCase"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/retail/hardship-options": {
      "get": {
        "tags": [
          "End User Cases"
        ],
        "summary": "Get Hardship Options",
        "operationId": "get_retail_hardship_options",
        "security": [
          {
            "OAuth2": [
              "retail-cases:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail-cases:read\n\nThe financial hardship assistance you offer your end users.\n\n**Your obligations.** The Telecommunications (Financial Hardship)\nIndustry Standard 2024 applies to these options set through the API as\nin the portal, and you are responsible for meeting it.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The options.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "options": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "minimum": {
                          "type": "integer",
                          "description": "How many must be offered.",
                          "example": 6
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "put": {
        "tags": [
          "End User Cases"
        ],
        "summary": "Set Hardship Options",
        "operationId": "set_retail_hardship_options",
        "security": [
          {
            "OAuth2": [
              "retail-cases:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail-cases:update\n\nReplaces the assistance you offer. At least six options (s18(1) of the\nStandard); fewer is a 422. Stored in the catalogue's order.\n\n**Your obligations.** Setting these through the API carries the same\nobligations under the Telecommunications (Financial Hardship) Industry\nStandard 2024 as setting them in the portal, and you are responsible\nfor meeting them.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "options"
                ],
                "properties": {
                  "options": {
                    "type": "array",
                    "minItems": 6,
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "What was stored.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "options": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "minimum": {
                          "type": "integer",
                          "description": "How many must be offered.",
                          "example": 6
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/end-users/disputes": {
      "get": {
        "tags": [
          "End User Cases"
        ],
        "summary": "List End-User Disputes",
        "operationId": "list_end_user_disputes",
        "security": [
          {
            "OAuth2": [
              "retail-cases:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail-cases:read\n\nDisputes your end users raised about charges on their invoices, newest\nfirst. While one is open, the disputed amount is not taken by\nautomatic payment and is left out of payment reminders.\n\n**Your obligations.** A dispute handled through the API carries the\nsame obligations as one handled in the portal (the complaints-handling\nand financial hardship rules you are bound by as the end user's\nsupplier), and you are responsible for meeting them.\n",
        "parameters": [
          {
            "name": "endUser",
            "in": "query",
            "description": "Only this end user's, by their number. An unknown number is a 422.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "resolved",
                "all"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "perPage",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A page of disputes.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EndUserDispute"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/end-users/disputes/{disputeId}": {
      "parameters": [
        {
          "name": "disputeId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "End User Cases"
        ],
        "summary": "Get End-User Dispute",
        "operationId": "get_end_user_dispute",
        "security": [
          {
            "OAuth2": [
              "retail-cases:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail-cases:read\n\nOne dispute, with what the end user said and where your decision is.\n\n**Your obligations.** A dispute handled through the API carries the\nsame obligations as one handled in the portal, and you are responsible\nfor meeting them.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The dispute.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/EndUserDispute"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/end-users/disputes/{disputeId}/review": {
      "parameters": [
        {
          "name": "disputeId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "End User Cases"
        ],
        "summary": "Start Reviewing an End-User Dispute",
        "operationId": "review_end_user_dispute",
        "security": [
          {
            "OAuth2": [
              "retail-cases:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail-cases:update\n\nShows the end user you are looking at an open dispute. It stays open,\nso the disputed amount is still held. Runs on our side and answers 202.\nA dispute not open is a 409; 503 means billing could not be reached.\n\n**Your obligations.** A decision made through the API carries the same\nobligations as one made in the portal (the complaints-handling and\nfinancial hardship rules you are bound by as the end user's supplier),\nand you are responsible for meeting them. It is the API key's own\ndecision, and the audit log names the key.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "responses": {
          "202": {
            "x-summary": "Accepted",
            "description": "The dispute, with the decision in progress.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/EndUserDispute"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/disputes/{disputeId}/credit": {
      "parameters": [
        {
          "name": "disputeId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "End User Cases"
        ],
        "summary": "Credit and Resolve an End-User Dispute",
        "operationId": "credit_end_user_dispute",
        "security": [
          {
            "OAuth2": [
              "retail-cases:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail-cases:update\n\nThe end user was right: a credit note for `amount`, up to the amount\ndisputed, is issued against their invoice and the dispute is resolved.\nRuns on our side and answers 202; `resolution` shows the outcome and\nthe credit note. A resolved dispute, or one with a decision already in\nprogress, is a 409. 503 means billing could not be reached.\n\n**Your obligations.** A decision made through the API carries the same\nobligations as one made in the portal, and you are responsible for\nmeeting them. The end user is emailed the decision. It is the API\nkey's own decision, and the audit log names the key.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "amount"
                ],
                "properties": {
                  "amount": {
                    "type": "string",
                    "description": "Inc. GST, as a dollar string.",
                    "example": "12.50"
                  },
                  "notes": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000,
                    "description": "Shown to the end user with the decision."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "x-summary": "Accepted",
            "description": "The dispute, with the decision in progress.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/EndUserDispute"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/disputes/{disputeId}/close": {
      "parameters": [
        {
          "name": "disputeId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "End User Cases"
        ],
        "summary": "Close an End-User Dispute",
        "operationId": "close_end_user_dispute",
        "security": [
          {
            "OAuth2": [
              "retail-cases:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail-cases:update\n\nResolves a dispute without a credit: `reject` (the charge stands) or\n`no_change` (nothing owed either way, for example they withdrew it).\nCollection of the amount resumes. Runs on our side and answers 202. A\nresolved dispute, or one with a decision already in progress, is a 409.\n503 means billing could not be reached.\n\n**Your obligations.** A decision made through the API carries the same\nobligations as one made in the portal, and you are responsible for\nmeeting them. The end user is emailed the decision. It is the API\nkey's own decision, and the audit log names the key.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "outcome"
                ],
                "properties": {
                  "outcome": {
                    "type": "string",
                    "enum": [
                      "reject",
                      "no_change"
                    ]
                  },
                  "notes": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "x-summary": "Accepted",
            "description": "The dispute, with the decision in progress.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/EndUserDispute"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/disputes/{disputeId}/retry": {
      "parameters": [
        {
          "name": "disputeId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "End User Cases"
        ],
        "summary": "Retry a Failed Dispute Decision",
        "operationId": "retry_end_user_dispute",
        "security": [
          {
            "OAuth2": [
              "retail-cases:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail-cases:update\n\nSends the last decision again, exactly as it was asked, after\n`resolution.error` says it could not be completed. With no failed\ndecision to send, or one still in progress, it is a 409.\n\n**Your obligations.** A decision made through the API carries the same\nobligations as one made in the portal, and you are responsible for\nmeeting them.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "responses": {
          "202": {
            "x-summary": "Accepted",
            "description": "The dispute, with the decision in progress.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/EndUserDispute"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/invoice-groups": {
      "parameters": [
        {
          "name": "endUser",
          "in": "path",
          "required": true,
          "description": "The end user's number.",
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "End-User Billing Settings"
        ],
        "summary": "List End User Invoice Groups",
        "operationId": "list_end_user_invoice_groups",
        "security": [
          {
            "OAuth2": [
              "retail:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:read\n\nThe groups that section the invoices you send this end user, by name.\nEach group prints as its own section with its PO number and subtotal;\nlines in no group print under Other. `404` unless you bill your end\nusers.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The groups.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InvoiceGroup"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "post": {
        "tags": [
          "End-User Billing Settings"
        ],
        "summary": "Create End User Invoice Group",
        "operationId": "create_end_user_invoice_group",
        "security": [
          {
            "OAuth2": [
              "retail:create"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:create\n\nAdd a group to this end user's invoices. A name already used by this\nend user (ignoring case) answers `422`. It applies from the next invoice.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceGroupInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The group.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/InvoiceGroup"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/end-users/{endUser}/invoice-groups/{groupId}": {
      "parameters": [
        {
          "name": "endUser",
          "in": "path",
          "required": true,
          "description": "The end user's number.",
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "groupId",
          "in": "path",
          "required": true,
          "description": "The group's `id` (a uuid).",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "tags": [
          "End-User Billing Settings"
        ],
        "summary": "Get End User Invoice Group",
        "operationId": "get_end_user_invoice_group",
        "security": [
          {
            "OAuth2": [
              "retail:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:read\n\nOne of this end user's groups, with the services in it.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The group.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/InvoiceGroup"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "services": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/InvoiceService"
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "patch": {
        "tags": [
          "End-User Billing Settings"
        ],
        "summary": "Update End User Invoice Group",
        "operationId": "update_end_user_invoice_group",
        "security": [
          {
            "OAuth2": [
              "retail:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:update\n\nRename one of this end user's groups or change its description, PO\nnumber or cost centre. Only the fields sent change. It applies from the\nnext invoice; issued invoices keep their values.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceGroupInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The group.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/InvoiceGroup"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      },
      "delete": {
        "tags": [
          "End-User Billing Settings"
        ],
        "summary": "Remove End User Invoice Group",
        "operationId": "remove_end_user_invoice_group",
        "security": [
          {
            "OAuth2": [
              "retail:delete"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:delete\n\nRemove one of this end user's groups with no services in it. A group\nthat still has services answers `422`: move them first.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "responses": {
          "204": {
            "x-summary": "No Content",
            "description": "Removed."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/end-users/{endUser}/invoice-groups/{groupId}/services": {
      "parameters": [
        {
          "name": "endUser",
          "in": "path",
          "required": true,
          "description": "The end user's number.",
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "groupId",
          "in": "path",
          "required": true,
          "description": "The group's `id` (a uuid).",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "put": {
        "tags": [
          "End-User Billing Settings"
        ],
        "summary": "Set End User Invoice Group Services",
        "operationId": "set_end_user_invoice_group_services",
        "security": [
          {
            "OAuth2": [
              "retail:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:update\n\nMake the group's services exactly this list, as\n`PUT /account/invoice-groups/{groupId}/services` does. Only this end\nuser's own services can be listed; any other answers `422`.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "services"
                ],
                "properties": {
                  "services": {
                    "type": "array",
                    "maxItems": 1000,
                    "items": {
                      "type": "object",
                      "required": [
                        "serviceType",
                        "serviceRef"
                      ],
                      "properties": {
                        "serviceType": {
                          "type": "string",
                          "enum": [
                            "data_service",
                            "trunk",
                            "fax_plan",
                            "transit_service",
                            "vpn_user"
                          ]
                        },
                        "serviceRef": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The group.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/InvoiceGroup"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/end-users/{endUser}/invoice-services": {
      "parameters": [
        {
          "name": "endUser",
          "in": "path",
          "required": true,
          "description": "The end user's number.",
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "End-User Billing Settings"
        ],
        "summary": "List End User Invoice Services",
        "operationId": "list_end_user_invoice_services",
        "security": [
          {
            "OAuth2": [
              "retail:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:read\n\nThis end user's live services, each with its group and its own billing\nlabel, PO number and cost centre on the invoices you send it.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The services.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InvoiceService"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/end-users/{endUser}/invoice-services/{serviceType}/{serviceRef}": {
      "parameters": [
        {
          "name": "endUser",
          "in": "path",
          "required": true,
          "description": "The end user's number.",
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "serviceType",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "enum": [
              "data_service",
              "trunk",
              "fax_plan",
              "transit_service",
              "vpn_user"
            ]
          }
        },
        {
          "name": "serviceRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "End-User Billing Settings"
        ],
        "summary": "Get End User Invoice Service",
        "operationId": "get_end_user_invoice_service",
        "security": [
          {
            "OAuth2": [
              "retail:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:read\n\nOne of this end user's services and its place on their invoices. A\nservice that is not this end user's answers `404`.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The service.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/InvoiceService"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "put": {
        "tags": [
          "End-User Billing Settings"
        ],
        "summary": "Set End User Invoice Service Details",
        "operationId": "set_end_user_invoice_service",
        "security": [
          {
            "OAuth2": [
              "retail:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:update\n\nSet the service's own billing label, PO number and cost centre on this\nend user's invoices. Only the fields sent change; null or blank clears\none. It applies from the next invoice.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "invoiceLabel": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "poNumber": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 64
                  },
                  "costCentre": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 64
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The service.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/InvoiceService"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/retail/price-book": {
      "get": {
        "tags": [
          "End-User Price Book"
        ],
        "summary": "Get the Retail Price Book",
        "operationId": "get_retail_price_book",
        "security": [
          {
            "OAuth2": [
              "retail:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:read\n\nYour markups and every product you have priced for your end users. A\nproduct given to an end user bills, in order, at the service's own\nprice, else its price here, else its type's markup on what we charge\nyou, else your default markup, else nothing (and the end user's invoice\nis held for you to approve). Calls are priced by a call plan only.\n\nAnswers 404 unless your account bills its end users.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The price book.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "defaultMarkupPct",
                        "currency",
                        "items"
                      ],
                      "properties": {
                        "defaultMarkupPct": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Your default markup, a percentage of what we charge you.\nNull when none is set.",
                          "example": "30.00"
                        },
                        "markupsByType": {
                          "type": "object",
                          "description": "Your markups by product type (service category), each a\npercentage of what we charge you. A type not listed uses\nthe default markup. Empty when none is set.",
                          "additionalProperties": {
                            "type": "string"
                          },
                          "example": {
                            "hosted_pbx": "40.00"
                          }
                        },
                        "currency": {
                          "type": "string",
                          "example": "AUD"
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/RetailPriceBookItem"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/retail/price-book/markup": {
      "put": {
        "tags": [
          "End-User Price Book"
        ],
        "summary": "Set the Default Markup",
        "operationId": "set_retail_default_markup",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "retail:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:update\n\nSet or clear your default markup, your markups by product type, or\nboth. A product you have not priced bills at what we charge you plus\nits type's markup, else the default markup. With neither, a product you\nhave not priced bills nothing, and its end user's invoice is held for\nyou to approve. A price you set for a product or a service always wins\nover a markup.\n\nA call with no call plan bills at what we charged you for it plus its\ncall category's markup (such as `au_mobile_calls`), else the default\nmarkup; a call plan always wins. Send at least one of the two fields; one you leave out stays as it is.\n\nWhile you bill your end users, clearing the default or a type's markup\nis `422` on `defaultMarkupPct` when it would leave a live service of an\nend user you bill with nothing to price it. The error counts them and\nnames up to five; nothing is changed. Both fields are checked together,\nso a type's markup set in the same request counts.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "defaultMarkupPct": {
                    "type": [
                      "number",
                      "string",
                      "null"
                    ],
                    "description": "The markup, a percentage of what we charge you, as a number or\na numeric string (\"30.00\"), from 0 to 9999. Null clears it.",
                    "minimum": 0,
                    "maximum": 9999,
                    "example": 30
                  },
                  "markupsByType": {
                    "type": "object",
                    "description": "Your markups by product type, the whole set: a type left out,\nor sent as null, uses the default markup. Keyed by the\nproduct's service category (for example `hosted_pbx`,\n`data_and_internet`, `payg_sip_channels`,\n`au_geographic_numbers`, `sms`, `au_mobile_calls`).",
                    "additionalProperties": {
                      "type": [
                        "number",
                        "string",
                        "null"
                      ],
                      "minimum": 0,
                      "maximum": 9999
                    },
                    "example": {
                      "hosted_pbx": 40,
                      "data_and_internet": "25.00"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The markup now in force.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "defaultMarkupPct": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "example": "30.00"
                        },
                        "markupsByType": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string"
                          },
                          "example": {
                            "hosted_pbx": "40.00"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/retail/price-book/items": {
      "post": {
        "tags": [
          "End-User Price Book"
        ],
        "summary": "Price a Product",
        "operationId": "add_retail_price",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "retail:create"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:create\n\nPrice a product for your end users. The product must be one of ours on\nsale, and not already in your book: change its price instead.\n\n`price` and `setupFee` are **ex-GST** dollar amounts, as the portal takes\nthem. GST is added on the end user's invoice under your tax settings.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "productId",
                  "price"
                ],
                "properties": {
                  "productId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The product's public id, as the unpriced queue and the price book return it.",
                    "example": "6f1c2a9e-4b7d-4e2a-9c1f-2d8b5e7a3c10"
                  },
                  "price": {
                    "type": [
                      "string",
                      "number"
                    ],
                    "description": "The price each period, ex-GST, in dollars, up to two decimals.",
                    "example": "79.00"
                  },
                  "setupFee": {
                    "type": [
                      "string",
                      "number",
                      "null"
                    ],
                    "description": "The setup fee, ex-GST, in dollars. Leave it out or null for\nnone set; 0 is a free connection.",
                    "example": "99.00"
                  },
                  "effectiveFrom": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date",
                    "description": "The day the price applies from. Today when left out or null.",
                    "example": "2026-12-01"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The product is priced.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/RetailPriceBookItem"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/retail/price-book/items/{itemId}": {
      "parameters": [
        {
          "name": "itemId",
          "in": "path",
          "required": true,
          "description": "The price's `id` (a uuid), from the price book.",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "patch": {
        "tags": [
          "End-User Price Book"
        ],
        "summary": "Change a Price",
        "operationId": "change_retail_price",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "retail:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:update\n\nChange a product's price. `price` is **ex-GST**. Every end user on the\nproduct moves to the new price: there are no grandfathered prices. A\nmonth already invoiced keeps what it was charged.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "price"
                ],
                "properties": {
                  "price": {
                    "type": [
                      "string",
                      "number"
                    ],
                    "description": "The price each period, ex-GST, in dollars.",
                    "example": "84.00"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The changed price.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/RetailPriceBookItem"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "End-User Price Book"
        ],
        "summary": "Remove a Price",
        "operationId": "remove_retail_price",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "retail:delete"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:delete\n\nTake a product out of your price book. Its end users then bill at your\nmarkup for its type, else your default markup. While you bill your end\nusers, removing it is `422` on `itemId` when nothing else would price a\nlive service of an end user you bill: the error counts them and names up\nto five. Price them another way first, or mark the service or the end\nuser not billed.\n",
        "responses": {
          "204": {
            "description": "Removed"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/retail/price-book/items/{itemId}/plan": {
      "parameters": [
        {
          "name": "itemId",
          "in": "path",
          "required": true,
          "description": "The price's `id` (a uuid), from the price book.",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "put": {
        "tags": [
          "End-User Price Book"
        ],
        "summary": "Set a Product's Default Call Plan",
        "operationId": "set_retail_price_plan",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "retail:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:update\n\nThe call plan that prices a voice product's calls for end users whose\nservice has no plan of its own. Only one of your own published call\nplans; null clears it. While you bill your end users, clearing it is\n`422` on `planId` when no markup would price those calls on a live\nservice of an end user you bill; the error counts them and names up to\nfive.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "planId"
                ],
                "properties": {
                  "planId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "The plan's `id` (a uuid) from List Retail Plans.",
                    "example": "1d6f3b84-7e2a-4c91-a5d0-6b9e2f4c8a17"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The price with its plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/RetailPriceBookItem"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/retail/price-book/unpriced": {
      "get": {
        "tags": [
          "End-User Price Book"
        ],
        "summary": "List Products Not Yet Priced",
        "operationId": "list_retail_unpriced",
        "security": [
          {
            "OAuth2": [
              "retail:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:read\n\nProducts you have given your end users that your price book does not\nprice. One billing at your default markup carries that price as\n`proposedPrice`, to accept in one call. One nothing prices\n(`bills: false`) holds its end users' invoices until you price it.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The queue, in one response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "productId",
                          "product",
                          "sku",
                          "endUsers",
                          "bills",
                          "proposedPrice",
                          "currency"
                        ],
                        "properties": {
                          "productId": {
                            "type": "string",
                            "format": "uuid",
                            "description": "The product's public id.",
                            "example": "6f1c2a9e-4b7d-4e2a-9c1f-2d8b5e7a3c10"
                          },
                          "product": {
                            "type": "string",
                            "example": "nbn 100/20 Home"
                          },
                          "sku": {
                            "type": "string",
                            "example": "NBN-100-20"
                          },
                          "endUsers": {
                            "type": "integer",
                            "description": "How many live services of your end users are on it.",
                            "example": 3
                          },
                          "bills": {
                            "type": "boolean",
                            "description": "True when it bills at your default markup; false when it holds invoices."
                          },
                          "proposedPrice": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "The default markup's price, ex-GST with its GST under the product's GST treatment (none on a GST-free product), as the price it becomes when accepted. Null when nothing prices it.",
                            "properties": {
                              "priceExGst": {
                                "type": "string",
                                "example": "63.70"
                              },
                              "priceGst": {
                                "type": "string",
                                "example": "6.37"
                              },
                              "priceIncGst": {
                                "type": "string",
                                "example": "70.07"
                              }
                            }
                          },
                          "currency": {
                            "type": "string",
                            "example": "AUD"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/retail/price-book/unpriced/{productId}/accept": {
      "parameters": [
        {
          "name": "productId",
          "in": "path",
          "required": true,
          "description": "The product's `productId` (a uuid), from the queue.",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "post": {
        "tags": [
          "End-User Price Book"
        ],
        "summary": "Accept a Proposed Price",
        "operationId": "accept_retail_proposed_price",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "retail:create"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:create\n\nWrite a queued product's proposed price (your default markup's) into your\nprice book from today, as a price of your own. It leaves the queue.\nA product nothing prices has no proposal, and is refused (422): price it\nwith `POST /retail/price-book/items`.\n",
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The product is priced.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/RetailPriceBookItem"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/retail/plans": {
      "get": {
        "tags": [
          "End-User Call Plans"
        ],
        "summary": "List Call Plans",
        "operationId": "list_retail_plans",
        "security": [
          {
            "OAuth2": [
              "retail:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:read\n\nReturns a paginated list of your own call plans for your end users, by\nname, each with its versions and their state. The destinations of a\nversion are at\n[List Plan Destinations](#tag/End-User-Call-Plans/operation/list_retail_plan_destinations).\n\nOnly for an account that bills its end users: the route answers `404`\notherwise.\n",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number to retrieve. Defaults to `1`.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "description": "Number of plans per page. Defaults to `50`, maximum `200`.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A paginated JSON object containing call plans.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RetailPlan"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "End-User Call Plans"
        ],
        "summary": "Create a Call Plan",
        "operationId": "create_retail_plan",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "retail:create"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:create\n\nCreates a call plan as a draft, one of three ways, as the portal's New\nPlan page does:\n\n  - **`blank`**: an empty plan. Add destinations, or import a CSV.\n  - **`clone`**: a copy of a base card's version in effect (else its\n    latest).\n  - **`margin`**: your sell rates worked out from a base card you are\n    billed on (your buy rates), with the `margin` you give. The connection\n    fee is marked up too with a `percent` margin; a `fixed` margin adds to\n    the per-minute rate only.\n\nThe base card is one from\n[List Base Cards](#tag/End-User-Call-Plans/operation/list_retail_plan_base_cards):\none of your own plans, or a card you are billed on. Any other is refused\nwith `422`.\n\nNothing prices calls until you publish the draft with\n[Publish a Call Plan](#tag/End-User-Call-Plans/operation/publish_retail_plan).\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "mode"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255,
                    "example": "Mobile Benefits"
                  },
                  "code": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 64,
                    "pattern": "^[A-Za-z0-9_\\-]+$",
                    "description": "A code unique across all plans: letters, digits, underscore and hyphen. Leave it out or null for one made from your account number.",
                    "example": "RETAIL-830100-MOB"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "blank",
                      "clone",
                      "margin"
                    ]
                  },
                  "baseCardId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "The card to start from, by its `id` from List Base Cards. Required for `clone` and `margin`.",
                    "example": "7a2c9e41-5b3d-4f86-8e1a-2d6b9f0c4e73"
                  },
                  "margin": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "description": "The margin over the base card. Used with `margin` only, and then `value` is required.",
                    "properties": {
                      "type": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "percent",
                          "fixed",
                          null
                        ],
                        "default": "percent",
                        "description": "`percent` marks the per-minute rate and the connection fee up by `value` per cent. `fixed` adds `value` dollars to the per-minute rate."
                      },
                      "value": {
                        "type": [
                          "string",
                          "number",
                          "null"
                        ],
                        "description": "Per cent for `percent`; dollars per minute, ex-GST, for `fixed`. Up to 6 decimal places.",
                        "example": "25"
                      },
                      "roundingStep": {
                        "type": [
                          "string",
                          "number",
                          "null"
                        ],
                        "description": "Sell rates round up to this step, in dollars, at most 5 decimal places. Defaults to `0.00001`.",
                        "example": "0.001"
                      },
                      "minMargin": {
                        "type": [
                          "string",
                          "number",
                          "null"
                        ],
                        "description": "The least the per-minute sell rate is above the buy rate, in dollars ex-GST, applied after the markup.",
                        "example": "0.001"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The plan was created as a draft.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/RetailPlan"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/retail/plans/base-cards": {
      "get": {
        "tags": [
          "End-User Call Plans"
        ],
        "summary": "List Base Cards",
        "operationId": "list_retail_plan_base_cards",
        "security": [
          {
            "OAuth2": [
              "retail:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:read\n\nReturns the cards a new plan may start from, by name, in one response:\nyour own plans, and the cards you are billed on. Pass one's `id` as\n`baseCardId` to\n[Create a Call Plan](#tag/End-User-Call-Plans/operation/create_retail_plan).\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A JSON object containing the cards.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "The card's public id.",
                            "example": "7a2c9e41-5b3d-4f86-8e1a-2d6b9f0c4e73"
                          },
                          "code": {
                            "type": "string",
                            "example": "WS_BASE"
                          },
                          "name": {
                            "type": "string",
                            "example": "Wholesale Voice"
                          },
                          "ownPlan": {
                            "type": "boolean",
                            "description": "True for one of your own plans; false for a card you are billed on."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/retail/plans/{planId}": {
      "parameters": [
        {
          "name": "planId",
          "in": "path",
          "required": true,
          "description": "The plan's `id` (a uuid).",
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "example": "1d6f3b84-7e2a-4c91-a5d0-6b9e2f4c8a17"
        }
      ],
      "get": {
        "tags": [
          "End-User Call Plans"
        ],
        "summary": "Get a Call Plan",
        "operationId": "get_retail_plan",
        "security": [
          {
            "OAuth2": [
              "retail:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:read\n\nReturns one of your own plans with its versions. `draftDrift` compares a\ndraft made from a supplier deck with the deck's current buy rates, as the\nportal's publish step does; it is null for any other plan, and when\nnothing is below cost.\n\nAnother account's plan, or a card that is not yours, answers `404`.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/RetailPlan"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "draftDrift": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "properties": {
                                "belowCost": {
                                  "type": "integer",
                                  "description": "Prefixes that sell below their buy rate."
                                },
                                "belowFloor": {
                                  "type": "integer",
                                  "description": "Prefixes that sell above cost but below the margin floor."
                                },
                                "orphaned": {
                                  "type": "integer",
                                  "description": "Prefixes with no buy rate in the deck."
                                },
                                "acknowledgementNeeded": {
                                  "type": "boolean",
                                  "description": "True when publishing needs `acknowledgeDrift: true`: some prefix is below cost or below the floor."
                                },
                                "examples": {
                                  "type": "array",
                                  "description": "Up to 10 of the prefixes.",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "prefix": {
                                        "type": "string"
                                      },
                                      "name": {
                                        "type": "string"
                                      },
                                      "severity": {
                                        "type": "string"
                                      },
                                      "perMinuteExGst": {
                                        "type": "string",
                                        "description": "The draft's per-minute rate, ex-GST."
                                      },
                                      "buyPerMinuteExGst": {
                                        "type": [
                                          "string",
                                          "null"
                                        ],
                                        "description": "The deck's buy rate per minute, ex-GST."
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "End-User Call Plans"
        ],
        "summary": "Change a Call Plan's Details",
        "operationId": "update_retail_plan",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "retail:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:update\n\nChanges the plan's name, code, description or currency. Send only the\nfields to change. These belong to the plan, not a version, so the change\nis live at once and opens no draft.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "code": {
                    "type": "string",
                    "maxLength": 64,
                    "pattern": "^[A-Za-z0-9_\\-]+$",
                    "description": "Unique across all plans."
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000
                  },
                  "currency": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 3,
                    "example": "AUD"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The plan as changed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/RetailPlan"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/retail/plans/{planId}/destinations": {
      "parameters": [
        {
          "name": "planId",
          "in": "path",
          "required": true,
          "description": "The plan's `id` (a uuid).",
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "example": "1d6f3b84-7e2a-4c91-a5d0-6b9e2f4c8a17"
        }
      ],
      "get": {
        "tags": [
          "End-User Call Plans"
        ],
        "summary": "List Plan Destinations",
        "operationId": "list_retail_plan_destinations",
        "security": [
          {
            "OAuth2": [
              "retail:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:read\n\nReturns a paginated list of one version's destinations, by name then\nprefix. Without `version`, the working version: the draft, else the\nversion in effect, else the latest.\n",
        "parameters": [
          {
            "name": "version",
            "in": "query",
            "required": false,
            "description": "The version number. An unknown one is refused with `422`.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Only destinations whose name or prefix matches.",
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number to retrieve. Defaults to `1`.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "description": "Number of destinations per page. Defaults to `50`, maximum `200`.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A paginated JSON object containing destinations.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "version": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "The version listed; null for a plan with no version yet."
                    },
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RetailPlanDestination"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "End-User Call Plans"
        ],
        "summary": "Add a Plan Destination",
        "operationId": "add_retail_plan_destination",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "retail:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:update\n\nAdds a destination to the plan's draft. When the plan has no draft, one\nis opened first as a copy of its latest version: a published version\nnever changes. A prefix already on the draft is refused with `422`.\n\nRates are dollar amounts, **ex-GST**, to at most 5 decimal places.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "prefix",
                  "perMinute"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255,
                    "example": "Australia Mobile"
                  },
                  "prefix": {
                    "type": "string",
                    "maxLength": 32,
                    "pattern": "^[0-9]+$",
                    "description": "E.164 digits without the `+`.",
                    "example": "614"
                  },
                  "perMinute": {
                    "type": [
                      "string",
                      "number"
                    ],
                    "description": "The rate per minute, ex-GST.",
                    "example": "0.03"
                  },
                  "connectionFee": {
                    "type": [
                      "string",
                      "number"
                    ],
                    "description": "The charge for each answered call, ex-GST. Defaults to `0`.",
                    "example": "0.05"
                  },
                  "minimumCharge": {
                    "type": [
                      "string",
                      "number"
                    ],
                    "description": "The least an answered call costs, ex-GST. Defaults to `0`.",
                    "example": "0"
                  },
                  "firstIncrementSeconds": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 3600,
                    "default": 60
                  },
                  "subsequentIncrementSeconds": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 3600,
                    "default": 60
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The destination, on the draft.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "version": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "description": "The draft's version number."
                            }
                          }
                        },
                        {
                          "$ref": "#/components/schemas/RetailPlanDestination"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/retail/plans/{planId}/destinations/import": {
      "parameters": [
        {
          "name": "planId",
          "in": "path",
          "required": true,
          "description": "The plan's `id` (a uuid).",
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "example": "1d6f3b84-7e2a-4c91-a5d0-6b9e2f4c8a17"
        }
      ],
      "post": {
        "tags": [
          "End-User Call Plans"
        ],
        "summary": "Import Plan Destinations",
        "operationId": "import_retail_plan_destinations",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "retail:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:update\n\nLoads a CSV into the plan's draft, opening the draft first when there is\nnone. The file has the portal's columns, with a header row, in any order:\n\n```\nname,prefix,per_minute_rate,connection_fee_rate,minimum_charge_rate,first_increment_seconds,subsequent_increment_seconds\nAustralia Mobile,614,0.03,0.05,0,60,60\n```\n\n`name`, `prefix` and `per_minute_rate` are required on each row; the fee\nand minimum default to `0` and the increments to `60`. Rates are dollars,\n**ex-GST**, to at most 5 decimal places. At most 20,000 rows.\n\nThe import is all or nothing: a file with any bad row is refused with\n`422`, naming the first ten bad lines, and the draft is left as it was.\n\n`mode` is `replace` (the draft becomes exactly the file) or `merge` (the\nfile's rows are added or replace those with the same prefix; the rest\nstay).\n",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file",
                  "mode"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "The CSV, at most 10 MB."
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "replace",
                      "merge"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The file was loaded into the draft.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/RetailPlan"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "importedVersion": {
                              "type": "integer",
                              "description": "The draft the file was loaded into."
                            },
                            "destinationCount": {
                              "type": "integer",
                              "description": "The draft's destinations after the import."
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/retail/plans/{planId}/destinations/{prefix}": {
      "parameters": [
        {
          "name": "planId",
          "in": "path",
          "required": true,
          "description": "The plan's `id` (a uuid).",
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "example": "1d6f3b84-7e2a-4c91-a5d0-6b9e2f4c8a17"
        },
        {
          "name": "prefix",
          "in": "path",
          "required": true,
          "description": "The destination's prefix, which names it on every version.",
          "schema": {
            "type": "string",
            "pattern": "^[0-9]+$"
          },
          "example": "614"
        }
      ],
      "patch": {
        "tags": [
          "End-User Call Plans"
        ],
        "summary": "Change a Plan Destination",
        "operationId": "update_retail_plan_destination",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "retail:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:update\n\nChanges a destination on the plan's draft, opening the draft first when\nthere is none. Send only the fields to change. The prefix cannot change:\nremove the destination and add the new prefix. A prefix not on the\nworking version answers `404`.\n\nRates are dollar amounts, **ex-GST**, to at most 5 decimal places.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "perMinute": {
                    "type": [
                      "string",
                      "number"
                    ],
                    "description": "The rate per minute, ex-GST.",
                    "example": "0.035"
                  },
                  "connectionFee": {
                    "type": [
                      "string",
                      "number"
                    ],
                    "description": "The charge for each answered call, ex-GST."
                  },
                  "minimumCharge": {
                    "type": [
                      "string",
                      "number"
                    ],
                    "description": "The least an answered call costs, ex-GST."
                  },
                  "firstIncrementSeconds": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 3600
                  },
                  "subsequentIncrementSeconds": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 3600
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The destination as changed, on the draft.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "version": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "description": "The draft's version number."
                            }
                          }
                        },
                        {
                          "$ref": "#/components/schemas/RetailPlanDestination"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "End-User Call Plans"
        ],
        "summary": "Remove a Plan Destination",
        "operationId": "remove_retail_plan_destination",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "retail:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:update\n\nRemoves a destination from the plan's draft, opening the draft first\nwhen there is none. The published versions keep it until the draft is\npublished. A prefix not on the working version answers `404`.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The plan, with its draft.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/RetailPlan"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/retail/plans/{planId}/publish": {
      "parameters": [
        {
          "name": "planId",
          "in": "path",
          "required": true,
          "description": "The plan's `id` (a uuid).",
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "example": "1d6f3b84-7e2a-4c91-a5d0-6b9e2f4c8a17"
        }
      ],
      "post": {
        "tags": [
          "End-User Call Plans"
        ],
        "summary": "Publish a Call Plan",
        "operationId": "publish_retail_plan",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "retail:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:update\n\nPublishes the plan's draft as a version that never changes, pricing\ncalls from `effectiveFrom` (today when left out) for every service on the\nplan. A published version it replaces from that date is marked\n`superseded`, and still prices the calls made before it.\n\nRefused with `422` when:\n  - the plan has no draft, or the draft has no destinations;\n  - the draft, made from a supplier deck, prices some prefix below the\n    deck's buy rate or below its margin floor, and `acknowledgeDrift` is\n    not `true`. See `draftDrift` on\n    [Get a Call Plan](#tag/End-User-Call-Plans/operation/get_retail_plan).\n",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "effectiveFrom": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date",
                    "description": "The date the version prices calls from. Defaults to today when left out or null.",
                    "example": "2026-12-01"
                  },
                  "acknowledgeDrift": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "default": false,
                    "description": "Publish although the draft prices below cost or below its floor."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The draft was published.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/RetailPlan"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "publishedVersion": {
                              "type": "integer",
                              "description": "The version number published."
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/services/{assignmentId}/billing": {
      "parameters": [
        {
          "name": "endUser",
          "in": "path",
          "required": true,
          "description": "The end user's number.",
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "assignmentId",
          "in": "path",
          "required": true,
          "description": "The service's `assignmentId` (a uuid), from List an End User's Services.",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "tags": [
          "End-User Service Billing"
        ],
        "summary": "Get a Service's Billing",
        "operationId": "get_end_user_service_billing",
        "security": [
          {
            "OAuth2": [
              "retail:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:read\n\nThe call plan pinned to the service, its own price and setup fee, whether\nit is billed, and the price that will bill with where it comes from.\nAnswers 404 unless your account bills its end users.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The service's billing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/EndUserServiceBilling"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "put": {
        "tags": [
          "End-User Service Billing"
        ],
        "summary": "Set a Service's Billing",
        "operationId": "set_end_user_service_billing",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "retail:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:update\n\nSet all four at once, as the portal's Service Billing dialog does:\n\n- `planId`: one of your own published call plans, or null for the\n  product's default plan. Any other plan is refused (422) and nothing is\n  changed.\n- `price` and `setupFee`: this service's own price each period and setup\n  fee, **ex-GST** dollar amounts. Null goes back to your price book; 0 is\n  free. At most 999,999.99. A month already charged keeps its price.\n- `notBilled`: true leaves the whole service, its fees and its usage, off\n  the end user's invoices from the next one built.\n\nWhile you bill this end user, clearing `price` or `planId` is `422` on\n`price` when nothing else (your price book, a markup or a call plan)\nwould price the service; nothing is changed. The four are checked\ntogether, so clearing the price with `notBilled` true is allowed.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "planId",
                  "price",
                  "setupFee",
                  "notBilled"
                ],
                "properties": {
                  "planId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "The plan's `id` (a uuid) from List Retail Plans.",
                    "example": "1d6f3b84-7e2a-4c91-a5d0-6b9e2f4c8a17"
                  },
                  "price": {
                    "type": [
                      "string",
                      "number",
                      "null"
                    ],
                    "example": "45.00"
                  },
                  "setupFee": {
                    "type": [
                      "string",
                      "number",
                      "null"
                    ],
                    "example": null
                  },
                  "notBilled": {
                    "type": "boolean",
                    "example": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The service's billing now.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/EndUserServiceBilling"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/services/{assignmentId}/end": {
      "parameters": [
        {
          "name": "endUser",
          "in": "path",
          "required": true,
          "description": "The end user's number.",
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "assignmentId",
          "in": "path",
          "required": true,
          "description": "The service's `assignmentId` (a uuid), from List an End User's Services.",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "post": {
        "tags": [
          "End-User Service Billing"
        ],
        "summary": "End a Service's Billing",
        "operationId": "end_end_user_service",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "retail:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:update\n\nEnd the end user's billing for the service today, on your account's\ncalendar: it is billed to the end of today and not after. The service\nitself is not cancelled with us.\n\nA service whose billing has already ended, today or before, keeps its\nend date, so calling this again changes nothing.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The service's billing, with its end date.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/EndUserServiceBilling"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/charges": {
      "parameters": [
        {
          "name": "endUser",
          "in": "path",
          "required": true,
          "description": "The end user's number.",
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "End-User Charges"
        ],
        "summary": "List an End User's Own Charges",
        "operationId": "list_end_user_charges",
        "security": [
          {
            "OAuth2": [
              "retail:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:read\n\nYour own charges on the end user's bill, newest first, in one response.\nAnswers 404 unless your account bills its end users.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The charges.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EndUserCharge"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "End-User Charges"
        ],
        "summary": "Add a Charge",
        "operationId": "add_end_user_charge",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "retail:create"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:create\n\nAdd a recurring or once-off charge to the end user's next bill. Send an\n`Idempotency-Key` so a retry does not add it twice.\n\n`amount` is an **ex-GST** dollar amount, as the portal's form takes it,\nfrom 0.01 to 999,999.99. GST is added on the invoice.\n\nA recurring charge that starts in an earlier month must say what to do\nwith the months since then, so nothing back-bills by default: `billing`\n`start` bills every month since `startsOn`; `later` bills from\n`billFrom` (months you billed elsewhere are not billed again). Leaving\n`billing` out for such a charge is refused (422). A charge that starts\nthis month or later bills from its start.\n\nAn archived end user is refused (422).\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "kind",
                  "description",
                  "amount",
                  "startsOn"
                ],
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "recurring",
                      "once_off"
                    ]
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 255,
                    "example": "Managed Wi-Fi support"
                  },
                  "amount": {
                    "type": [
                      "string",
                      "number"
                    ],
                    "description": "Ex-GST, in dollars, up to two decimals.",
                    "example": "25.00"
                  },
                  "startsOn": {
                    "type": "string",
                    "format": "date",
                    "description": "The start date (recurring) or the date of the charge (once-off)."
                  },
                  "endsOn": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date",
                    "description": "Recurring only. The last day it bills."
                  },
                  "billing": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "start",
                      "later",
                      null
                    ],
                    "description": "Recurring only. Required when `startsOn` is in an earlier month."
                  },
                  "billFrom": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date",
                    "description": "With `billing` `later`, the first day to bill from. Not before `startsOn`."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The charge is added.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/EndUserCharge"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/charges/{chargeId}": {
      "parameters": [
        {
          "name": "endUser",
          "in": "path",
          "required": true,
          "description": "The end user's number.",
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "chargeId",
          "in": "path",
          "required": true,
          "description": "The charge's `id` (a uuid).",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "patch": {
        "tags": [
          "End-User Charges"
        ],
        "summary": "Change a Charge",
        "operationId": "change_end_user_charge",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "retail:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:update\n\nChange any of the fields sent; the rest stay. `amount` is **ex-GST**.\n\nOnce an invoice carries the charge:\n  - a **once-off** charge can no longer change (422);\n  - a **recurring** charge can change only its `description`, `amount`\n    (for months not yet charged) and `endsOn`. Sending `startsOn`,\n    `billing` or `billFrom` is refused (422).\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "amount": {
                    "type": [
                      "string",
                      "number"
                    ],
                    "example": "30.00"
                  },
                  "startsOn": {
                    "type": "string",
                    "format": "date"
                  },
                  "endsOn": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "billing": {
                    "type": "string",
                    "enum": [
                      "start",
                      "later"
                    ]
                  },
                  "billFrom": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The changed charge.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/EndUserCharge"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "End-User Charges"
        ],
        "summary": "Remove a Charge",
        "operationId": "remove_end_user_charge",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "retail:delete"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:delete\n\nRemove a charge no invoice carries. An invoiced charge is refused (422):\nend a recurring one with `PATCH` and `endsOn` instead.\n",
        "responses": {
          "204": {
            "description": "Removed"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/retail/settings": {
      "get": {
        "tags": [
          "End-User Billing Settings"
        ],
        "summary": "Get Invoice Settings",
        "operationId": "get_retail_invoice_settings",
        "security": [
          {
            "OAuth2": [
              "retail:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:read\n\nThe settings printed on every invoice to your end users: the name and\nABN you bill as, default payment terms and delivery, the copy address,\nsummary or detailed format, the number prefix and next number, and how\nend users pay you outside a gateway.\n\nOnly for an account that bills its end users: otherwise this answers 404.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "Your end-user invoice settings.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/RetailInvoiceSettings"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "patch": {
        "tags": [
          "End-User Billing Settings"
        ],
        "summary": "Change Invoice Settings",
        "operationId": "update_retail_invoice_settings",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "retail:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:update\n\nChange any of your end-user invoice settings. Send only the fields to\nchange; null clears a field that can be blank. The next end-user\ninvoice uses the new values.\n\nThe running invoice number changes only when you send\n`invoiceNextNumber`. Each bill run moves it on, so a PATCH of any other\nfield never winds it back.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "displayName": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255,
                    "example": "Brandy Telecom"
                  },
                  "abn": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "11 digits that pass the ATO check digit. Spaces are allowed.",
                    "example": "51 824 753 556"
                  },
                  "defaultTermsDays": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 90,
                    "example": 30
                  },
                  "defaultInvoiceDelivery": {
                    "type": "string",
                    "enum": [
                      "email",
                      "post",
                      "none"
                    ],
                    "example": "email"
                  },
                  "invoiceCopyEmail": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "email",
                    "example": "accounts@brandy.example"
                  },
                  "defaultInvoiceFormat": {
                    "type": "string",
                    "enum": [
                      "summary",
                      "detailed"
                    ],
                    "example": "detailed"
                  },
                  "invoiceNumberPrefix": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 12,
                    "pattern": "^[A-Za-z0-9][A-Za-z0-9\\-]*$",
                    "example": "BT-"
                  },
                  "invoiceNextNumber": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 999999999999,
                    "example": 1042
                  },
                  "remittanceText": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000,
                    "example": "BSB 062-000, account 1234 5678."
                  },
                  "bpayBillerCode": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^\\s*(\\d\\s*){3,10}$",
                    "description": "Your own BPAY biller code, 3 to 10 digits. Spaces are allowed and removed, so `12 3456` is stored as `123456`.",
                    "example": "123456"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The settings saved, all of them.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/RetailInvoiceSettings"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/retail/reminders": {
      "get": {
        "tags": [
          "End-User Billing Settings"
        ],
        "summary": "Get Reminder Schedule",
        "operationId": "get_retail_reminder_schedule",
        "security": [
          {
            "OAuth2": [
              "retail:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:read\n\nWhen your end users are reminded of an overdue invoice, as Company\nSettings → Payment Reminders sets it in the portal.\n\nOnly for an account that bills its end users: otherwise this answers 404.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The reminder schedule.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/RetailReminderSchedule"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "put": {
        "tags": [
          "End-User Billing Settings"
        ],
        "summary": "Set Reminder Schedule",
        "operationId": "set_retail_reminder_schedule",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "retail:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:update\n\nSet the whole schedule. Days are from 1 to 365, and the final notice\nmust come after the first reminder. The change applies from the next\nnightly reminder run and is recorded in your audit log as a change in\nthe portal is.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RetailReminderSchedule"
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The schedule saved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/RetailReminderSchedule"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/retail/notices": {
      "get": {
        "tags": [
          "End-User Billing Settings"
        ],
        "summary": "List Notices",
        "operationId": "list_retail_notices",
        "security": [
          {
            "OAuth2": [
              "retail:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:read\n\nThe notices your end users receive that you may reword: the compliance\nnotices (complaints and the like) and the end-user billing emails, as\nCompany Settings → Notice Wording lists them. In one response: the list\nis not paginated.\n\nOnly for an account that bills its end users: otherwise this answers 404.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The notices.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RetailNotice"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/retail/notices/{key}": {
      "parameters": [
        {
          "name": "key",
          "in": "path",
          "required": true,
          "description": "The notice's key, from List Notices.",
          "schema": {
            "type": "string"
          },
          "example": "retail.invoice"
        }
      ],
      "get": {
        "tags": [
          "End-User Billing Settings"
        ],
        "summary": "Get Notice",
        "operationId": "get_retail_notice",
        "security": [
          {
            "OAuth2": [
              "retail:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:read\n\nOne notice's subject and body in effect (Markdown), and the Check\nNetworks default wording.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The notice.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/RetailNoticeDetail"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "put": {
        "tags": [
          "End-User Billing Settings"
        ],
        "summary": "Reword Notice",
        "operationId": "reword_retail_notice",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "retail:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:update\n\nSave your own subject and body (Markdown) for a notice. The wording is\nchecked as in the portal, and refused with a 422 listing each problem\nwhen it:\n  - drops a placeholder in `requiredContent`;\n  - uses a placeholder the notice does not offer;\n  - types a working-days timeframe as text where the notice has a\n    placeholder for it.\n\nA notice's statutory footer is added on every send and cannot be\nchanged. To test a notice, send it to yourself from the portal.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "subject",
                  "body"
                ],
                "properties": {
                  "subject": {
                    "type": "string",
                    "maxLength": 255,
                    "example": "Your invoice {{ invoice_number }}"
                  },
                  "body": {
                    "type": "string",
                    "maxLength": 20000,
                    "description": "Markdown.",
                    "example": "Hi {{ customer_name }},\n\nInvoice **{{ invoice_number }}** is attached."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The notice with your wording.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/RetailNoticeDetail"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "delete": {
        "tags": [
          "End-User Billing Settings"
        ],
        "summary": "Reset Notice",
        "operationId": "reset_retail_notice",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "retail:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:update\n\nRemove your own wording, so the notice is sent with the Check Networks\ndefault. A notice you have not reworded is unchanged.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The notice, back on the default wording.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/RetailNoticeDetail"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/retail/payment-gateways": {
      "get": {
        "tags": [
          "End-User Billing Settings"
        ],
        "summary": "List Payment Gateways",
        "operationId": "list_retail_payment_gateways",
        "security": [
          {
            "OAuth2": [
              "retail:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:read\n\nWhether each payment gateway you take your end users' payments through\n(Stripe, Square, GoCardless) is connected and working, and which payment\nmethods it is on for: one row per gateway, connected or not. Use it to\nspot a broken gateway before your end users fail to pay.\n\nKeys are checked when they are saved in the portal or a gateway is\nswitched back on; this read does not call the gateway. No key, webhook\nsecret or callback address is returned. Connecting, changing and\nremoving a gateway stay in the portal.\n\nOnly for an account that bills its end users: otherwise this answers 404.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "Each gateway's state.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RetailPaymentGateway"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/end-users/{endUser}/spend": {
      "parameters": [
        {
          "name": "endUser",
          "in": "path",
          "required": true,
          "description": "The end user's number.",
          "schema": {
            "type": "string"
          },
          "example": "SA123456"
        }
      ],
      "get": {
        "tags": [
          "End-User Spend"
        ],
        "summary": "Get End User Spend",
        "operationId": "get_end_user_spend",
        "security": [
          {
            "OAuth2": [
              "retail:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:read\n\nHow much of the monthly spend limit you set on an end user is used this\nmonth: the limit, spent so far with and without GST, the per cent, and the\nalert tiers already reached. Spent is the end user's Next Bill Estimate,\nthe figure their spend alert emails and your portal show. Once the month's\ninvoice is issued, the estimate starts again from nothing.\n\nAn end user with no limit answers `result: null`. Set the limit on the\nend user. `endUser.spendThreshold` tells you as each tier is reached.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The end user's spend this month.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/EndUserSpend"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/end-users/{endUser}/usage": {
      "parameters": [
        {
          "name": "endUser",
          "in": "path",
          "required": true,
          "description": "The end user's number.",
          "schema": {
            "type": "string"
          },
          "example": "5012345678"
        }
      ],
      "get": {
        "tags": [
          "End-User Usage"
        ],
        "summary": "List an End User's Own Usage",
        "operationId": "list_end_user_usage",
        "security": [
          {
            "OAuth2": [
              "retail:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:read\n\nThe usage you rated yourself for one end user, newest usage first, and\nwhether each record is billed yet. Only for an account that bills its\nend users.\n",
        "parameters": [
          {
            "name": "billed",
            "in": "query",
            "required": false,
            "description": "`true` for billed records only, `false` for those still to bill.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "The first usage date to list.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "The last usage date to list.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A page of the end user's usage records.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EndUserUsageRecord"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "tags": [
          "End-User Usage"
        ],
        "summary": "Add Own Usage for an End User",
        "operationId": "add_end_user_usage",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "retail:create"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:create\n\nAdd one record of usage you rated yourself (managed-service hours, seats,\na third-party feed). It is billed on the end user's next invoice, at\nyour unit price ex GST, and locked once a held or issued invoice carries\nit. Refused for a usage date in the future, or in a bill period the end\nuser already has a held or issued invoice for, and for a `reference`\nalready added on your account. Once the end user is finally invoiced,\na usage date after their last end date is refused too (\"This end user\nhas had their final invoice, so usage after ... can't be added.\"), as no\ninvoice would bill it.\n\nAn `Idempotency-Key` is required: a retry with the same key returns the\nfirst answer and never adds the record twice.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EndUserUsageInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The record was added.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/EndUserUsageRecord"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/usage/batch": {
      "post": {
        "tags": [
          "End-User Usage"
        ],
        "summary": "Add Own Usage in a Batch",
        "operationId": "add_end_user_usage_batch",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "retail:create"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:create\n\nAdd up to 500 records of usage you rated yourself, across your end\nusers, each naming its end user. All or none: if any row is refused,\nnothing is added, and the `422` names every bad row by its index from 0\n(`rows.3.reference`). The rules for each row are those of\n`POST /end-users/{endUser}/usage`; a reference repeated within the batch\nis refused too.\n\nAn `Idempotency-Key` is required: a retry with the same key returns the\nfirst answer and never adds the batch twice.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "rows"
                ],
                "properties": {
                  "rows": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 500,
                    "items": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/EndUserUsageInput"
                        },
                        {
                          "type": "object",
                          "required": [
                            "endUser"
                          ],
                          "properties": {
                            "endUser": {
                              "type": "string",
                              "description": "The end user's number.",
                              "example": "5012345678"
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "Every record was added, in the order sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EndUserUsageRecord"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/usage/{usageId}": {
      "parameters": [
        {
          "name": "usageId",
          "in": "path",
          "required": true,
          "description": "The usage record's `id` (a uuid).",
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "example": "3e9a1c57-2b4d-4f80-a6c3-9d1e7b5f2a64"
        }
      ],
      "delete": {
        "tags": [
          "End-User Usage"
        ],
        "summary": "Remove Own Usage",
        "operationId": "remove_end_user_usage",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "retail:delete"
            ]
          }
        ],
        "description": ">**Required Scope(s):** retail:delete\n\nRemove a record no held or issued invoice carries yet. A billed record is\nrefused with `422`: correct the invoice with a credit note instead.\n",
        "responses": {
          "204": {
            "description": "Removed"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/integrations/xero": {
      "get": {
        "tags": [
          "Xero"
        ],
        "summary": "Get Xero Status",
        "operationId": "get_xero_status",
        "security": [
          {
            "OAuth2": [
              "integrations:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** integrations:read\n\nWhether your own Xero connection works, and why an end-user invoice,\ncredit note or payment has not reached Xero: the mapping problems still to\nfix, how many entries are waiting, waiting on a contact or failed, and the\nlast push and error. It answers whether or not Xero is connected.\n\nOnly for an account that bills its end users: it answers `404` otherwise.\nConnect and disconnect Xero from Integrations in the portal: they need a\nbrowser sign-in to Xero.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The connection's state.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/XeroStatus"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotInSandbox"
          }
        }
      }
    },
    "/integrations/xero/queue": {
      "get": {
        "tags": [
          "Xero"
        ],
        "summary": "List Entries Not in Xero",
        "operationId": "list_xero_queue",
        "security": [
          {
            "OAuth2": [
              "integrations:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** integrations:read\n\nThe end-user ledger entries behind one of the counts in Get Xero Status,\nnewest first, each with the end user, the invoice, credit note or payment\nit is for, and why it is not in Xero:\n\n  - `waiting`: not tried yet. The nightly push, or Send to Xero, sends them.\n  - `unmatched`: the end user has no Xero contact yet. Link one with Link\n    Xero Contact, or create one.\n  - `partial`: sent in part. The next push finishes them.\n  - `failed`: Xero refused them; `reason` says why. Fix it in Xero or here,\n    and the next push tries again.\n\nAnswers `409` while the account has no working Xero connection.\n",
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "required": true,
            "description": "Which list.",
            "schema": {
              "type": "string",
              "enum": [
                "waiting",
                "unmatched",
                "partial",
                "failed"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number to retrieve. Defaults to `1`.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "description": "Number of entries per page. Defaults to `50`, maximum `200`.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A paginated list of entries.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/XeroQueueEntry"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotInSandbox"
          }
        }
      }
    },
    "/integrations/xero/mapping": {
      "get": {
        "tags": [
          "Xero"
        ],
        "summary": "Get Xero Mapping",
        "operationId": "get_xero_mapping",
        "security": [
          {
            "OAuth2": [
              "integrations:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** integrations:read\n\nThe accounts and tax rates your end-user documents go to in Xero, the\nchoices your chart of accounts offers for each, and what still stops a\npush. Answers `409` while the account has no working Xero connection, and\n`502` when Xero cannot be read just now.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The mapping.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/XeroMapping"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotInSandbox"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "put": {
        "tags": [
          "Xero"
        ],
        "summary": "Set Xero Mapping",
        "operationId": "set_xero_mapping",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "integrations:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** integrations:update\n\nChoose the accounts and tax rates your end-user documents go to, as Save\ndoes on Integrations → Xero in the portal. Only the mappings you send\nchange; send `null` or `\"\"` to clear one. Each value must be one your\nchart of accounts offers for that kind of mapping today (see `choices` in\nGet Xero Mapping): any other is refused with `422` and nothing is saved.\nYour chart is read from Xero again first.\n\nThe answer is the mapping as saved, with `problems` listing what still\nstops a push. Answers `409` while the account has no working Xero\nconnection.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revenueDefault": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "example": "200"
                  },
                  "products": {
                    "type": "object",
                    "description": "A sales account by product ID.",
                    "additionalProperties": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "charges": {
                    "type": "object",
                    "description": "A sales account by your own charge's ID.",
                    "additionalProperties": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "paymentDefault": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "example": "090"
                  },
                  "payments": {
                    "type": "object",
                    "description": "A clearing account by gateway (`manual`, `stripe`, `square`, `gocardless`).",
                    "additionalProperties": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "tax": {
                    "type": "object",
                    "properties": {
                      "taxed": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "free": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "none": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  },
                  "pushPayments": {
                    "type": "boolean",
                    "description": "Send payments you record to Xero too."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The mapping as saved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/XeroMapping"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotInSandbox"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/integrations/xero/push": {
      "post": {
        "tags": [
          "Xero"
        ],
        "summary": "Send to Xero Now",
        "operationId": "push_xero_now",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "integrations:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** integrations:update\n\nSend what is waiting to Xero now, rather than at the nightly push: the\nsame push as Send Now in the portal, which also retries anything failed,\nsent in part or waiting on a contact. It is queued, and the answer is\n`202` at once; Get Xero Status shows the counts and any error once it has\nrun, usually within a minute. A second ask while one is queued is the same\npush. Each ask is in the account's Audit Log against the API key that\nmade it.\n\nAnswers `409` while the account has no working Xero connection, and `503`\nwhen the push could not be queued just now: nothing was sent, so ask\nagain shortly.\n",
        "responses": {
          "202": {
            "x-summary": "Accepted",
            "description": "The push is queued.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "queued": {
                          "type": "boolean",
                          "example": true
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotInSandbox"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/integrations/xero/contacts": {
      "get": {
        "tags": [
          "Xero"
        ],
        "summary": "Search Xero Contacts",
        "operationId": "search_xero_contacts",
        "security": [
          {
            "OAuth2": [
              "integrations:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** integrations:read\n\nContacts in your Xero organisation, to link an end user to. With\n`search`, the contacts whose name matches; without it, a page of 100 in\nname order. `endUser` names the end user already linked to a contact.\n\nAnswers `409` while the account has no working Xero connection, and `502`\nwhen Xero cannot be read just now.\n",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "A name, or part of one.",
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Without `search`, which page of 100. Defaults to `1`.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The contacts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "page": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The contact's Xero ID. Link it with Link Xero Contact.",
                            "example": "6d1a9f1e-0c2b-4a3e-9b8f-2a4c6e8d0f12"
                          },
                          "name": {
                            "type": "string",
                            "example": "Acme Retail Pty Ltd"
                          },
                          "email": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "description": "Xero's status for the contact, `ACTIVE` or `ARCHIVED`.",
                            "example": "ACTIVE"
                          },
                          "endUser": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The number of your end user already linked to this contact."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotInSandbox"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/end-users/{endUser}/xero-contact": {
      "parameters": [
        {
          "name": "endUser",
          "in": "path",
          "required": true,
          "description": "The end user's number.",
          "schema": {
            "type": "string"
          },
          "example": "SA123456"
        }
      ],
      "put": {
        "tags": [
          "Xero"
        ],
        "summary": "Link Xero Contact",
        "operationId": "link_xero_contact",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "integrations:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** integrations:update\n\nLink an end user to a contact in your Xero organisation, so their\ninvoices, credit notes and payments go to it. Entries waiting on a contact\nfor them are sent on the next push.\n\n  - Send `contactId` to link a contact you chose (see Search Xero\n    Contacts). One Xero does not have is refused with `422`.\n  - Send `create: true` to create them in Xero instead. As the portal\n    does, a contact with their number, or exactly their name, is linked\n    rather than a second one made, and an archived one is refused with\n    `422`.\n\nAnswers `409` while the account has no working Xero connection.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contactId": {
                    "type": "string",
                    "maxLength": 64,
                    "description": "The Xero contact's ID. Needed unless `create` is `true`."
                  },
                  "create": {
                    "type": "boolean",
                    "description": "Create the end user as a new Xero contact."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The end user's contact.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/EndUserXeroContact"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotInSandbox"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          }
        }
      },
      "delete": {
        "tags": [
          "Xero"
        ],
        "summary": "Unlink Xero Contact",
        "operationId": "unlink_xero_contact",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "integrations:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** integrations:update\n\nRemove an end user's link to their Xero contact, so the next push matches\nthem again (by their number, then exactly by name) or waits for you to\nchoose one. Nothing already in Xero changes.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The end user, now with no contact.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/EndUserXeroContact"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotInSandbox"
          }
        }
      }
    },
    "/trunks/{username}/suspend": {
      "parameters": [
        {
          "name": "username",
          "in": "path",
          "required": true,
          "description": "The trunk's `id`, or its SIP digest username.",
          "schema": {
            "type": "string"
          },
          "example": "784512"
        }
      ],
      "post": {
        "tags": [
          "SIP Trunks"
        ],
        "summary": "Suspend SIP Trunk",
        "operationId": "suspend_trunk",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:update\n\nPause a trunk at once, as the portal's Suspend Trunk does: for example to\nstop a compromised PBX. A suspended trunk makes and receives no calls:\nnew outbound calls are refused, and calls to its numbers are refused\nbefore they reach your PBX. It **still places 000 (and 112 and 106)\ncalls**, and for an hour after one, calls to its numbers are delivered so\nthe emergency service can call back. Its PBX stays registered, calls\nalready up carry on, and billing is unchanged. `POST /trunks/{username}/resume` reverses it.\n\nSuspending a trunk that is already suspended answers `200` with the trunk\nas it stands. The trunk then reads `status: suspended` and, when you\nsuspended it, `suspendedBy: account`.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The trunk, suspended.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/SipTrunk"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/trunks/{username}/resume": {
      "parameters": [
        {
          "name": "username",
          "in": "path",
          "required": true,
          "description": "The trunk's `id`, or its SIP digest username.",
          "schema": {
            "type": "string"
          },
          "example": "784512"
        }
      ],
      "post": {
        "tags": [
          "SIP Trunks"
        ],
        "summary": "Resume SIP Trunk",
        "operationId": "resume_trunk",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:update\n\nResume a trunk you suspended, as the portal's Resume Trunk does. Only your\nown pause can be resumed: a trunk Check Networks suspended\n(`suspendedBy: checkNetworks`, for example for non-payment) answers `409`\nwith the reason, and stays suspended until we lift the hold.\n\nResuming a trunk that is already active answers `200` with the trunk as it\nstands.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The trunk, active.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/SipTrunk"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/trunks/{username}/plan-change": {
      "parameters": [
        {
          "name": "username",
          "in": "path",
          "required": true,
          "description": "The trunk's `id`, or its SIP digest username.",
          "schema": {
            "type": "string"
          },
          "example": "784512"
        }
      ],
      "delete": {
        "tags": [
          "SIP Trunks"
        ],
        "summary": "Cancel Scheduled Plan Change",
        "operationId": "cancel_trunk_plan_change",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:update\n\nCancel the plan or channel change booked for the trunk's next billing\ncycle (its `pendingPlanChange`), as the portal's Cancel does. The next\ncycle keeps the trunk's current plan. Answers `404` when nothing is\nbooked. Sends a `trunk.planChangeCancelled` event.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The trunk, with `pendingPlanChange` now null.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/SipTrunk"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/trunks/{username}/credential": {
      "get": {
        "tags": [
          "SIP Trunks"
        ],
        "summary": "Reveal Trunk SIP Password",
        "operationId": "reveal_trunk_credential",
        "parameters": [
          {
            "name": "username",
            "in": "path",
            "required": true,
            "description": "The trunk's SIP digest username.",
            "schema": {
              "type": "string"
            },
            "example": "784512"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "secrets:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** secrets:read\n\nReturns a trunk's current SIP username and password, for setting up a PBX\non an existing trunk without rotating its password.\n\nReading a secret has its own scope: `voice:read` does not reveal it. Each\nreveal is recorded in the trunk's history with the API key that read it\n(never the password itself), as a reveal in the portal is.\n\nA cancelled trunk answers 404, as does a trunk whose password cannot be\nread back: rotate it to get a new one.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The trunk's SIP credential.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/TrunkCredential"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "SIP Trunks"
        ],
        "summary": "Add Trunk SIP Credential",
        "operationId": "issue_trunk_credential",
        "parameters": [
          {
            "name": "username",
            "in": "path",
            "required": true,
            "description": "The trunk's handle, as the portal shows it: a trunk with no credential has no SIP username yet. A SIP username is accepted too, and answers 409, since that trunk already has a credential.",
            "schema": {
              "type": "string"
            },
            "example": "t100042-a1b2c3"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:create"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:create\n\nGives a trunk that was set up without a SIP credential (IP-only) its\nfirst one, so it can register. The platform sets the username and\npassword, and the password is returned **only once**, in the `201`\nanswer, as on a new trunk.\n\nA trunk that already has a credential answers 409: rotate its password\ninstead. A cancelled trunk answers 422. Send an `Idempotency-Key` so a\nretry replays the first answer.\n",
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The new SIP credential.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/TrunkCredential"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/trunks/{username}/credential/rotate": {
      "parameters": [
        {
          "name": "username",
          "in": "path",
          "required": true,
          "description": "The trunk's SIP digest username.",
          "schema": {
            "type": "string"
          },
          "example": "784512"
        }
      ],
      "post": {
        "tags": [
          "SIP Trunks"
        ],
        "summary": "Rotate Trunk SIP Password",
        "operationId": "rotate_trunk_credential",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:update\n\nRolls a new, platform-generated SIP password onto the trunk's credential\nand returns it **once**. The username does not change.\n\n**The old password stops working at once**: a PBX still using it fails\nits next registration or call until it has the new one.\n\nSend an `Idempotency-Key`: a retry with the same key replays the first\nanswer, with the same password, rather than rotating twice. A cancelled\ntrunk answers 422.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The trunk's SIP credential with its new password.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/TrunkCredential"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/trunks/{username}/source-restrictions": {
      "parameters": [
        {
          "name": "username",
          "in": "path",
          "required": true,
          "description": "The trunk's SIP digest username.",
          "schema": {
            "type": "string"
          },
          "example": "784512"
        }
      ],
      "get": {
        "tags": [
          "SIP Trunks"
        ],
        "summary": "Get Trunk Source Restrictions",
        "operationId": "get_trunk_source_restrictions",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nReturns where the trunk's SIP credentials may be used from: source\naddresses and countries. Both lists empty means no restriction.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The trunk's source restrictions.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/TrunkSourceRestrictions"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "put": {
        "tags": [
          "SIP Trunks"
        ],
        "summary": "Set Trunk Source Restrictions",
        "operationId": "set_trunk_source_restrictions",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:update\n\nReplaces both lists. Send both every time; empty lists lift every\nrestriction you set. The change reaches the SBC on its next policy reload\nand is recorded in the trunk's history, with the entries it removed.\n\nEntries Check Networks added (for example to stop fraud) are returned in\nthe lists but are not yours to remove: a replace keeps them, so they are\nstill in the lists it returns. Contact support about one.\n\nAddresses must be public: private, CGNAT and reserved ranges are refused.\nA refused entry answers 422 naming the entry and its place in the list\n(for example `cidrs.1` or `countries.0`); nothing is changed.\n\nSo a typo cannot lock you out, a `cidrs` list that is not empty and does\nnot hold the address this request came from answers 422 on `cidrs`,\nnaming the address, and nothing is changed. A source in an allowed\ncountry is still accepted, but the check does not look the country up.\nSend `confirmLockout: true` to save the list anyway. Empty lists always go\nthrough.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "cidrs",
                  "countries"
                ],
                "properties": {
                  "cidrs": {
                    "type": "array",
                    "maxItems": 100,
                    "items": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "description": "Source addresses or CIDR ranges: IPv4 no wider than `/24`, IPv6 single hosts only.",
                    "example": [
                      "203.0.113.10"
                    ]
                  },
                  "countries": {
                    "type": "array",
                    "maxItems": 250,
                    "items": {
                      "type": "string",
                      "maxLength": 8
                    },
                    "description": "ISO 3166-1 alpha-2 country codes, in any case.",
                    "example": [
                      "AU"
                    ]
                  },
                  "confirmLockout": {
                    "type": "boolean",
                    "default": false,
                    "description": "Save a `cidrs` list that leaves out the address this request came from. Without it, that list answers 422."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The source restrictions now in force.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/TrunkSourceRestrictions"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/numbers/bulk": {
      "post": {
        "tags": [
          "Numbers"
        ],
        "summary": "Change Many Numbers",
        "operationId": "bulk_numbers",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:update, and voice:delete for `release`\n\nRelease, route or re-address up to 100 numbers in one call. Each number\ngoes through the same checks as the single call, and gets its own\nresult: one number refused never stops the rest.\n\n- `release`: as `DELETE /numbers/{number}`, which says what a release\n  does: billing stops, the number cools off for 30 days before anyone\n  can order it, and the API has no undo. A number Check Networks has\n  suspended, one a trunk presents as its default caller ID, or one whose\n  release is already asked for, is skipped with the reason. Each release\n  then runs shortly after, as a single one does.\n- `route`: every number straight to `trunk` (a `sipUsername`), each on its\n  own routing, so the rest of its block is untouched. This replaces any\n  failover, time-of-day or geographic routing the number had.\n- `emergencyAddress`: every number listed at `emergencyAddressId`. A spare\n  number takes it at once; a number in use has its IPND record changed\n  shortly after, as with `PATCH /numbers/{number}`.\n\nA number that is not yours is skipped. **`Idempotency-Key` is required**\n(`400` without one): a retry with the same key returns the first call's\njob instead of releasing or routing again.\n\nThe call does the work before it answers, and answers `202` with the\njob, `done`, and every number's result; read it again with\n`GET /numbers/bulk/{jobId}`. The job is saved as each number is done: a\ncall that stops part way leaves a job that reads `running`, with the\nresults of the numbers it reached.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "action",
                  "numbers"
                ],
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "release",
                      "route",
                      "emergencyAddress"
                    ]
                  },
                  "numbers": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 100,
                    "description": "The numbers, E.164 (`61299999999`, with or without `+`).",
                    "items": {
                      "type": "string",
                      "example": "61299999999"
                    }
                  },
                  "trunk": {
                    "type": "string",
                    "description": "For `route`, required there and only there; the trunk's `sipUsername`."
                  },
                  "emergencyAddressId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "For `emergencyAddress`, required there and only there; one of your emergency addresses."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "x-summary": "Accepted",
            "description": "The job, with each number's result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/NumberBulkJob"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/numbers/bulk/{jobId}": {
      "parameters": [
        {
          "name": "jobId",
          "in": "path",
          "required": true,
          "description": "The `jobId` from `POST /numbers/bulk`.",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "tags": [
          "Numbers"
        ],
        "summary": "Get a Bulk Number Change",
        "operationId": "get_bulk_numbers",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nWhat a `POST /numbers/bulk` call did to each number.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The job.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/NumberBulkJob"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/numbers/areas": {
      "get": {
        "tags": [
          "Numbers"
        ],
        "summary": "Find the Numbering Area for an Address",
        "operationId": "find_numbering_areas",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nThe numbering areas (SZUs) that serve a street address, best match first,\nas the portal's Order Numbers page finds them, so you can order a local\nnumber for a customer's address. Search for the address with\n`GET /addresses/search` and send its `fullAddress` as `address`; pass the\nfirst `szu` to `GET /numbers/available`.\n\nOur supplier answers this, which can take up to a minute. An address it\nrefuses answers `422` with its reason; when it cannot be asked, `503`.\n",
        "parameters": [
          {
            "name": "address",
            "in": "query",
            "required": true,
            "description": "The `fullAddress` of a `GET /addresses/search` result.",
            "schema": {
              "type": "string",
              "minLength": 4,
              "maxLength": 255,
              "example": "12 QUEEN ST, BRISBANE CITY QLD 4000"
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The areas serving the address, best first. Empty when none was found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "results"
                  ],
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "szu",
                          "percentMatch"
                        ],
                        "properties": {
                          "szu": {
                            "type": "string",
                            "description": "The area, as `GET /numbers/available` takes it.",
                            "example": "Brisbane"
                          },
                          "percentMatch": {
                            "type": "number",
                            "description": "How well the area matches the address, in percent.",
                            "example": 100
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/numbers/available": {
      "get": {
        "tags": [
          "Numbers"
        ],
        "summary": "Search Available Numbers",
        "operationId": "search_available_numbers",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nUp to five numbers, or for a block the block you would get, that you can\norder now, each with its monthly and setup price per number, as the\nportal's Order Numbers page shows them. Our own stock first. Where we hold\nnone for an Australian geographic number, our supplier's offer, which\nreserves nothing until you order it with its `offerId`; never inside a\nbundle.\n\nHold a single number of ours with `POST /numbers/holds`, then order it.\n",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "fixed",
                "mobile",
                "local_rate_1300",
                "toll_free_1800",
                "nz_geographic",
                "nz_0800"
              ]
            }
          },
          {
            "name": "szu",
            "in": "query",
            "required": false,
            "description": "The numbering area, required for `fixed` and `nz_geographic`; from `GET /numbers/areas`.",
            "schema": {
              "type": "string",
              "maxLength": 120,
              "example": "Brisbane"
            }
          },
          {
            "name": "blockSize",
            "in": "query",
            "required": false,
            "description": "`1`, or `10` or `100` consecutive numbers for a geographic type.",
            "schema": {
              "type": "integer",
              "enum": [
                1,
                10,
                100
              ],
              "default": 1
            }
          },
          {
            "name": "bundle",
            "in": "query",
            "required": false,
            "description": "The bundle you will order into: only numbers we hold are offered. A bundle that has been submitted answers `422`.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "What you can order now. An empty `results` means nothing is available in this area.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "type",
                    "szu",
                    "blockSize",
                    "blocksInStock",
                    "results"
                  ],
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "szu": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "blockSize": {
                      "type": "integer"
                    },
                    "blocksInStock": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "How many complete blocks we hold; null for a single-number search."
                    },
                    "results": {
                      "type": "array",
                      "maxItems": 5,
                      "items": {
                        "$ref": "#/components/schemas/NumberOffer"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/numbers/holds": {
      "post": {
        "tags": [
          "Numbers"
        ],
        "summary": "Hold a Number",
        "operationId": "hold_number",
        "security": [
          {
            "OAuth2": [
              "voice:create"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:create\n\nHold one of our numbers from `GET /numbers/available` (a `stock` single)\nfor 24 hours while you finish the order, as picking a number in the\nportal does, so nobody else can take it. Order it with `POST /numbers`\nand the `holdId`. A hold cannot be extended; once `heldUntil` passes, the\norder answers `422` with the code `hold_expired`, and you can hold the\nnumber again if it is still free.\n\nYour account may hold 50 numbers at once, counting numbers being\nordered. A hold past that answers `409` saying so, until one of them is\nordered or its hold ends. Ask us if you need more. A `409` also means\nsomebody else has just taken the number.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "number"
                ],
                "properties": {
                  "number": {
                    "type": "string",
                    "maxLength": 20,
                    "example": "61755512345"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The number is held for you.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "holdId",
                        "number",
                        "type",
                        "szu",
                        "heldUntil"
                      ],
                      "properties": {
                        "holdId": {
                          "type": "string",
                          "description": "The hold, to order the number by."
                        },
                        "number": {
                          "type": "string",
                          "example": "61755512345"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "fixed",
                            "mobile",
                            "local_rate_1300",
                            "toll_free_1800",
                            "nz_geographic",
                            "nz_0800"
                          ]
                        },
                        "szu": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "heldUntil": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/numbers/orders": {
      "get": {
        "tags": [
          "Numbers"
        ],
        "summary": "List Number Orders",
        "operationId": "list_number_orders",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nYour number orders, newest first, each with its status, its numbers once\nallocated, and its error if it failed.\n",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "pending",
                "completed",
                "failed",
                "cancelled"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 50,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A page of number orders.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "total",
                    "page",
                    "perPage",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/NumberOrder"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/numbers/orders/{id}": {
      "get": {
        "tags": [
          "Numbers"
        ],
        "summary": "Retrieve a Number Order",
        "operationId": "get_number_order",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nOne number order, the `Location` an order answers with. Poll it from\n`pending` until it is `completed`, with each number and its route, or\n`failed`, with `error`. An order in a bundle is `draft` until the bundle\nis released.\n",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The order.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/NumberOrder"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/numbers/lookup": {
      "post": {
        "tags": [
          "Numbers"
        ],
        "summary": "Look Up Numbers",
        "operationId": "lookup_numbers",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nWho an Australian number was assigned to, who serves it now, its\nnumbering area, whether it is already porting and whether we already hold\nit, for a batch of numbers, as the portal's Number Lookup shows. Use it as\nthe first step of a port, before asking the end user for paperwork.\n\nIt only reads, so a suspended account may still call it, as it may any\n`GET`.\n\nEach number counts against your account's daily lookup allowance, the\nsame one the portal uses. A batch that would go over it is refused whole\nwith `429`, the allowance in `error.allowance`, and `Retry-After` set to\nthe seconds until it resets at midnight Brisbane time.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "numbers"
                ],
                "properties": {
                  "numbers": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 200,
                    "description": "The numbers, in any Australian form (`0731306460`, `61731306460`, `+61731306460`).",
                    "items": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "example": [
                      "0731306460",
                      "0412345678"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "One answer for each number.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "results"
                  ],
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/NumberLookupResult"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "x-summary": "Too Many Requests",
            "description": "Over the daily lookup allowance (`error.allowance`), or over the limit of requests per minute. Wait for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "status": 429,
                    "code": "rate_limited",
                    "reason": "You have used 990 of your 1,000 daily number lookups, and this batch asks for 25 more. The allowance resets at midnight.",
                    "allowance": {
                      "used": 990,
                      "limit": 1000,
                      "requested": 25
                    }
                  }
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/ports": {
      "get": {
        "tags": [
          "Number Ports"
        ],
        "summary": "List Number Ports",
        "operationId": "list_ports",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nEvery number port on your account, in and out, newest request first, as\nthe portal's Number Ports page lists them. A port-out (`direction: out`)\nis a number leaving you for another carrier: it takes its customer's\ncalls with it when it goes, so filter on `direction=out` to watch them.\n\nFilter by `direction`, by `group` (the portal's tabs: `active`,\n`completed`, `rejected`), by `state`, by `number` (any number on the\nport, including one inside a CAT C range) and by `needsAttention=true`\n(ports stalled past their step's usual time, or past a date they carry:\na cutover that passed, a verification code that lapsed).\n\nFor a download, set `format=csv` or `format=ndjson` to stream every\nmatching port instead of paged JSON; `page`/`perPage` are then ignored.\n`csv` has the portal's export columns (`reference`, `requested`,\n`direction`, `numbers`, `state`, `losing_provider`, `end_user`,\n`scheduled_for`, `completed`), with dates on your account's calendar, so\n`group=active&format=csv` is the portal's export of its Active tab.\n`ndjson` is one `results[]` item per line.\n",
        "parameters": [
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "in",
                "out"
              ]
            }
          },
          {
            "name": "group",
            "in": "query",
            "required": false,
            "description": "The portal's tab: `active` (in flight), `completed` (`activated`, `ported_away`) or `rejected` (`rejected`, `cancelled`).",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "completed",
                "rejected"
              ]
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PortState"
            }
          },
          {
            "name": "number",
            "in": "query",
            "required": false,
            "description": "Ports carrying this number, in E.164 or national form.",
            "schema": {
              "type": "string"
            },
            "example": "61299990001"
          },
          {
            "name": "needsAttention",
            "in": "query",
            "required": false,
            "description": "`true` for only the ports that need a person to look at them (see `attention`).",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "Bulk export format. Omit for paged JSON; `csv` or `ndjson` streams every matching port as a download.\n",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "ndjson"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number to retrieve. Defaults to `1`.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "description": "Number of records per page. Defaults to `50`, maximum `200`.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A page of ports, or the download.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PortOrder"
                      }
                    }
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string",
                  "description": "Present only when `format=csv`: a header row with the portal's export columns, then one row per port.\n"
                }
              },
              "application/x-ndjson": {
                "schema": {
                  "type": "string",
                  "description": "Present only when `format=ndjson`: one JSON object per line, each identical to a `results[]` item.\n"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Number Ports"
        ],
        "summary": "Request a Port-In",
        "operationId": "create_port",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:create"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:create\n\nAsk for numbers to be ported to you from another carrier, as the portal's\nport request form does, with the same checks and the same refusals.\n\n- `portType` picks the kind of port: `CatA` (one fixed-line number),\n  `CatC` (a list of fixed-line numbers; an entry ending `#` is a range of\n  10, `##` a range of 100), `Mob` (one mobile number) or `Inbound` (one\n  13, 1300 or 1800 number). Every type but `CatC` takes one number.\n- `trunk` (a `sipUsername` from `GET /trunks`) and `emergencyAddressId`\n  (from `GET /emergency-addresses`) are where the numbers land when the\n  port completes.\n- The most recent bill from the losing provider, as a PDF of up to 8 MB,\n  is required on every port except a prepaid mobile one, whose holder's\n  `dateOfBirth` is the proof instead. Send the request as\n  `multipart/form-data` to attach it.\n- A mobile port needs `accountType`: `postpaid` with the losing carrier's\n  `accountNumber`, or `prepaid` with `dateOfBirth`.\n- `consents.portingAuthority` and `consents.terms` must be accepted;\n  `consents.authorisedAgent` is recommended. Your API key is recorded as\n  the one who gave them (its name, as it was then), not a user.\n- To have the number's holder give the Porting Authority instead, send\n  `authorityHolder` with their `name` and `email` and leave out\n  `consents.portingAuthority` (any port but `Mob`). The port is saved in\n  `awaiting_authority` and the holder is emailed a link\n  (`confirmAuthority`, on `/ports/{reference}/delegations`) on your\n  end-user portal. Their confirmation, with their name and position, is\n  the port's Porting Authority and covers the Agent Authority; the port\n  then moves to `requested` and we lodge it. They are reminded after 7\n  days, and the port is cancelled after 14 without it. An account with\n  no end-user portal is a `403` with `no_end_user_portal_access`.\n\nA mobile port sends a verification code to the number straight away:\nconfirm it with `POST /ports/{reference}/confirm` within 30 minutes.\n`verificationCodeSent: false` means it could not be sent yet; send one\nwith `POST /ports/{reference}/verification-code`.\n\nA number the account may not port is a 422 on `numbers.0`: one that does\nnot match the port type, or a mobile number already on another open\nport, or whose verification failed in the last day. An account that may\nnot place orders is a 403.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PortInRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/PortInRequest"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "recentBill": {
                        "type": "string",
                        "format": "binary",
                        "description": "The losing provider's most recent bill, PDF, up to 8 MB."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The port, in state `requested` (or `ppv_sent` once a mobile port's code has gone, or `awaiting_authority` when sent to the number's holder).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result",
                    "verificationCodeSent"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/PortOrder"
                    },
                    "verificationCodeSent": {
                      "type": [
                        "boolean",
                        "null"
                      ],
                      "description": "On a mobile port, whether the verification code went to the number. Null on every other port."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/ports/{reference}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/PortReferencePath"
        }
      ],
      "get": {
        "tags": [
          "Number Ports"
        ],
        "summary": "Get Number Port",
        "operationId": "get_port",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nOne port, as the portal's port page shows it: its real `state`, who it\nis `waitingOn` and the `nextStep`, whether it needs `attention` and why,\nits `history` step by step with dates, the cutover you asked for\n(`preferredCutoverOn`) and the booked one (`scheduledFor`), and why it\nstopped (`statusReason`). A mobile port carries its `verificationCode`\ndates and the wrong codes it can still take.\n",
        "responses": {
          "200": {
            "$ref": "#/components/responses/PortResult"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/ports/{reference}/confirm": {
      "parameters": [
        {
          "$ref": "#/components/parameters/PortReferencePath"
        }
      ],
      "post": {
        "tags": [
          "Number Ports"
        ],
        "summary": "Confirm a Mobile Port's Verification Code",
        "operationId": "confirm_port_verification_code",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:update\n\nThe six-digit code the mobile number's holder was sent, for a port in\nstate `ppv_sent`. A correct code moves the port to `ppv_validated` and we\nlodge it with the carrier.\n\nA refusal is a 422 on `code` whose message says what to do: the code is\nwrong (with the attempts left), it has lapsed (send a fresh one with\n`POST /ports/{reference}/verification-code`), or the port is not waiting\nfor a code. Five wrong codes per port, counted across every code sent,\nreject the port. A 503 means the code could not be checked just then and\nthe attempt was not counted.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "code"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "maxLength": 16,
                    "example": "123456"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/PortResult"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/ports/{reference}/verification-code": {
      "parameters": [
        {
          "$ref": "#/components/parameters/PortReferencePath"
        }
      ],
      "post": {
        "tags": [
          "Number Ports"
        ],
        "summary": "Resend a Mobile Port's Verification Code",
        "operationId": "resend_port_verification_code",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:update\n\nSend a fresh verification code to the mobile number being ported, when\nthe last one lapsed or never arrived. The port stays waiting for the\ncode (`ppv_sent`). A code lasts **30 minutes**; the new one replaces the\nold, which no longer works.\n\nThe five wrong codes a port can take are counted across every code sent,\nso a resend does not give more tries: `verificationCode.attemptsRemaining`\non the port says how many are left. Resends count against your API rate\nlimit like any other write.\n\nA port that is not a mobile port waiting for its code, or a number the\ncode cannot be sent to, is a 422 on `reference` whose message says why.\n",
        "responses": {
          "200": {
            "$ref": "#/components/responses/PortResult"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotInSandbox"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/ports/{reference}/withdraw": {
      "parameters": [
        {
          "$ref": "#/components/parameters/PortReferencePath"
        }
      ],
      "post": {
        "tags": [
          "Number Ports"
        ],
        "summary": "Withdraw a Port-In",
        "operationId": "withdraw_port",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:delete"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:delete\n\nWithdraw a port-in you no longer want, before its cutover is locked in,\nas the port-in terms allow and the portal offers. The port moves to\n`cancelled` with `statusReason` saying you withdrew it, and the step is\nsent as `order.statusChanged` like any other.\n\nA port can be withdrawn in these states: `requested`, `submitted`,\n`confirmed` (fixed line, 13/1300/1800), and `ppv_sent`, `ppv_validated`\n(mobile). Once it is `scheduled`, or a mobile port is\n`submitted_upstream`, the cutover is locked in: that, and a port that is\ncomplete, rejected or cancelled by us, is a 409 with the reason. A\nport-out is worked by our team and cannot be withdrawn here (409).\nWithdrawing a port you already withdrew answers 200 with the port.\n",
        "responses": {
          "200": {
            "$ref": "#/components/responses/PortResult"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/voice/cdrs/summary": {
      "get": {
        "tags": [
          "Voice"
        ],
        "summary": "Summarise Calls",
        "operationId": "summarise_cdrs",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nThe figures the portal's call history shows above its table, over the\nsame window and filters as `GET /voice/cdrs`: calls, answered calls,\nminutes, cost, answer rate and average call length.\n",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "On or after this datetime (ISO 8601). Defaults to 31 days before `to`.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "On or before this datetime (ISO 8601). Defaults to now.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "description": "`unbilled`: the calls since the start of this month that are not on an invoice yet. Not with `from`.",
            "schema": {
              "type": "string",
              "enum": [
                "unbilled"
              ]
            }
          },
          {
            "name": "trunk",
            "in": "query",
            "required": false,
            "description": "Only this trunk's calls, by sipUsername.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "endUser",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "inbound",
                "outbound",
                "internal"
              ]
            }
          },
          {
            "name": "disposition",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "in_progress",
                "answered",
                "busy",
                "no_answer",
                "failed",
                "cancelled",
                "blocked"
              ]
            }
          },
          {
            "name": "invoice",
            "in": "query",
            "required": false,
            "description": "Only the calls billed on this invoice of ours to you, by its `id` in your invoice list. Not one of yours is a 422.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Search the source and destination numbers.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The figures.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "window": {
                          "type": "object",
                          "properties": {
                            "from": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "date-time"
                            },
                            "to": {
                              "type": "string",
                              "format": "date-time"
                            }
                          }
                        },
                        "calls": {
                          "type": "integer"
                        },
                        "answered": {
                          "type": "integer"
                        },
                        "minutes": {
                          "type": "number"
                        },
                        "costExGst": {
                          "type": "string",
                          "example": "12.40"
                        },
                        "costGst": {
                          "type": "string",
                          "example": "1.24"
                        },
                        "costIncGst": {
                          "type": "string",
                          "example": "13.64"
                        },
                        "currency": {
                          "type": "string",
                          "example": "AUD"
                        },
                        "answerRate": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "Answered calls as a percentage of calls."
                        },
                        "averageSeconds": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "The average length of an answered call."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/voice/cdrs/exports": {
      "get": {
        "tags": [
          "Voice"
        ],
        "summary": "List Scheduled Call Record Exports",
        "operationId": "list_cdr_exports",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nThe scheduled call record exports, daily and monthly, each on or off, as\nthe portal's SFTP Access card shows them. Exports land on our SFTP server\nunder your SFTP login.\n\n`sftpLogin` says whether you have a login and its username. The login is\ncreated, rotated and withdrawn in the portal only; the password is never\nreturned. When the login's state cannot be read right now, `exists` and\n`username` are `null`.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The exports and the SFTP login.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "exports": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/CdrExport"
                          }
                        },
                        "sftpLogin": {
                          "type": "object",
                          "properties": {
                            "exists": {
                              "type": [
                                "boolean",
                                "null"
                              ]
                            },
                            "username": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/voice/cdrs/exports/{cadence}": {
      "parameters": [
        {
          "name": "cadence",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "enum": [
              "daily",
              "monthly"
            ]
          }
        }
      ],
      "put": {
        "tags": [
          "Voice"
        ],
        "summary": "Turn a Scheduled Call Record Export On or Off",
        "operationId": "set_cdr_export",
        "security": [
          {
            "OAuth2": [
              "voice:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:update\n\nTurns the daily or monthly export on or off, as the portal's SFTP Access\ncard does. The change is audited with the API key that made it. The SFTP\nlogin itself is managed in the portal only. An unknown cadence is a `404`.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "active"
                ],
                "properties": {
                  "active": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The export as it now stands.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/CdrExport"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/voice/cdrs/{cgrid}": {
      "parameters": [
        {
          "name": "cgrid",
          "in": "path",
          "required": true,
          "description": "The call's `cgrid`, as `GET /voice/cdrs` lists it.",
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "Voice"
        ],
        "summary": "Get One Call",
        "operationId": "get_cdr",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nOne call detail record. Another account's call and an unknown id both\nanswer `404`.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The call.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/Cdr"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/voice/recordings": {
      "get": {
        "tags": [
          "Call Recordings"
        ],
        "summary": "List Call Recordings",
        "operationId": "list_call_recordings",
        "security": [
          {
            "OAuth2": [
              "recordings:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** recordings:read\n\nThe recordings of calls on your trunks, newest first, as the Call\nRecordings page of the portal lists them. Follow `nextCursor` for the next\npage until it is `null`. Answers `403` while call recording is not\navailable on your account.\n",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "Recorded on or after this datetime (ISO 8601), or from the start of this date (`YYYY-MM-DD`).",
            "schema": {
              "type": "string",
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "string",
                  "format": "date"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "Recorded on or before this datetime (ISO 8601), or to the end of this date (`YYYY-MM-DD`).",
            "schema": {
              "type": "string",
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "string",
                  "format": "date"
                }
              ]
            }
          },
          {
            "name": "trunk",
            "in": "query",
            "required": false,
            "description": "Only this trunk's recordings, by sipUsername. A trunk that is not yours is a 422.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "inbound",
                "outbound",
                "internal"
              ]
            }
          },
          {
            "name": "trigger",
            "in": "query",
            "required": false,
            "description": "What started the recording. An unknown value is a 422.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Search the caller ID number and name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 50,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The recordings.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "perPage": {
                      "type": "integer"
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/VoiceRecording"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/voice/recordings/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "description": "The recording's `id` (a uuid).",
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "example": "4211"
        }
      ],
      "get": {
        "tags": [
          "Call Recordings"
        ],
        "summary": "Get a Call Recording",
        "operationId": "get_call_recording",
        "security": [
          {
            "OAuth2": [
              "recordings:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** recordings:read\n\nOne recording, with `downloadUrl`: a link to the audio that works for\n**5 minutes**. Fetch the recording again for a fresh link. Every fetch is\naudited with the API key that made it.\n\nAnother account's recording, an unknown id and a recording whose audio is\nno longer stored all answer `404`.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The recording and its download link.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/VoiceRecording"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "downloadUrl": {
                              "type": "string",
                              "format": "uri",
                              "description": "The audio file. Works for 5 minutes."
                            },
                            "downloadUrlExpiresAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/voice/calls/active": {
      "get": {
        "tags": [
          "Voice"
        ],
        "summary": "List Live Calls",
        "operationId": "list_active_calls",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nThe calls up now on your trunks, oldest first, as the trunk page of the\nportal lists them under Concurrency. Filter to one trunk with `trunk`.\n\nA call to an emergency number (000, 112 or 106) is listed with\n`emergency: true`. It is never hung up: `POST /voice/calls/{callId}/hangup`\nrefuses it with `422 emergency_call`.\n\nFollow `nextCursor` for the next page until it is `null`.\n",
        "parameters": [
          {
            "name": "trunk",
            "in": "query",
            "required": false,
            "description": "Only this trunk's calls, by its sipUsername. A trunk that is not yours is a 422.",
            "schema": {
              "type": "string"
            },
            "example": "784512"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "The `nextCursor` of the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "description": "Number of calls per page. Defaults to `50`, maximum `200`.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 50,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The live calls.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "perPage": {
                      "type": "integer"
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as `cursor` for the next page; `null` on the last page."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "callId": {
                            "type": "string",
                            "description": "The call's id; hang it up with `POST /voice/calls/{callId}/hangup`."
                          },
                          "trunk": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The sipUsername of the trunk the call is on."
                          },
                          "direction": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "inbound",
                              "outbound",
                              null
                            ]
                          },
                          "from": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The calling number, digits only.",
                            "example": "61755500001"
                          },
                          "to": {
                            "type": "string",
                            "description": "The called number, digits only.",
                            "example": "61712345678"
                          },
                          "startedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "answeredAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Null while the call is ringing."
                          },
                          "emergency": {
                            "type": "boolean",
                            "description": "True for a call to 000, 112 or 106, which is never hung up."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/voice/calls/{callId}/hangup": {
      "parameters": [
        {
          "name": "callId",
          "in": "path",
          "required": true,
          "description": "The live call's `callId`, as `GET /voice/calls/active` lists it.",
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "Voice"
        ],
        "summary": "Hang Up a Live Call",
        "operationId": "hang_up_call",
        "security": [
          {
            "OAuth2": [
              "voice:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:update\n\nEnds one live call on one of your trunks: both parties are disconnected.\nThe call is billed for the time it was up. The hang-up is audited with\nthe API key that sent it.\n\n**An emergency call (000, 112 or 106) is never hung up.** It answers\n`422` with `error.code` `emergency_call`, and nothing is sent to the\nnetwork.\n\nA call that has already ended, or is not on one of your trunks, answers\n`404`.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "responses": {
          "202": {
            "x-summary": "Accepted",
            "description": "The call has been ended.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "callId": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "ended"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/trunks/{username}/calls/hangup": {
      "parameters": [
        {
          "name": "username",
          "in": "path",
          "required": true,
          "description": "The trunk's `id`, or its SIP digest username.",
          "schema": {
            "type": "string"
          },
          "example": "784512"
        }
      ],
      "post": {
        "tags": [
          "Voice"
        ],
        "summary": "Hang Up a Trunk's Live Calls",
        "operationId": "hang_up_trunk_calls",
        "security": [
          {
            "OAuth2": [
              "voice:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:update\n\nEnds every live call on one of your trunks in one step, for example to\nstop fraud: both parties are disconnected on each. Each call is billed\nfor the time it was up. The request is audited once, with the API key\nthat sent it and the counts. To stop new calls too, suspend the trunk\n(`POST /trunks/{username}/suspend`) first.\n\n**An emergency call (000, 112 or 106) is never hung up.** It is left up\nand counted in `skipped`.\n\n`failed` counts calls the network could not end; send the request again\nwith a new `Idempotency-Key` to retry them. A trunk with no live calls\nanswers `202` with every count `0`. A trunk that is not yours answers\n`404`.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "responses": {
          "202": {
            "x-summary": "Accepted",
            "description": "The trunk's calls have been ended, emergency calls aside.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "trunk",
                        "ended",
                        "skipped",
                        "failed"
                      ],
                      "properties": {
                        "trunk": {
                          "type": "string",
                          "description": "The trunk as `GET /trunks` names it (its SIP username, else its `id`).",
                          "example": "784512"
                        },
                        "ended": {
                          "type": "integer",
                          "description": "Calls hung up.",
                          "example": 2
                        },
                        "skipped": {
                          "type": "integer",
                          "description": "Emergency calls (000, 112, 106), left up.",
                          "example": 1
                        },
                        "failed": {
                          "type": "integer",
                          "description": "Calls the network could not end.",
                          "example": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/sms/messages/{messageId}": {
      "parameters": [
        {
          "name": "messageId",
          "in": "path",
          "required": true,
          "description": "The message's id, the `messageId` that `POST /sms` returned.",
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "example": "3f6c2a8e-1b7d-4c55-9a40-2d8e6b1f0c93"
        }
      ],
      "get": {
        "tags": [
          "SMS"
        ],
        "summary": "Get SMS Message",
        "operationId": "get_sms_message",
        "security": [
          {
            "OAuth2": [
              "sms:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** sms:read\n\nOne message on your account, with its `status`. The `Location` header of\n`POST /sms` points here, so a client can send, then poll this until the\nmessage is `delivered` or `failed`. A message held for review reads\n`pending` with a `statusReason` until it is released or blocked.\n\nA message on another account, or an inbound message held as a suspected\nscam (one you never received), answers `404`. Reads are audited, with the\nmessage id, never the text.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The message.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/SmsMessage"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/sms/senders": {
      "get": {
        "tags": [
          "SMS"
        ],
        "summary": "List SMS Senders",
        "operationId": "list_sms_senders",
        "security": [
          {
            "OAuth2": [
              "sms:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** sms:read\n\nEvery sender your account has asked for or holds, with its status: the\nportal's **Approved Senders** list. Numbers you hold with us are approved\nautomatically and appear here too.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The account's senders, by name.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "results"
                  ],
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SmsSender"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "SMS"
        ],
        "summary": "Request an SMS Sender",
        "operationId": "request_sms_sender",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "sms:send"
            ]
          }
        ],
        "description": ">**Required Scope(s):** sms:send\n\nAsk for a sender that `POST /sms` refused with `sender_not_approved`: a\nnumber you control (ported elsewhere, say) or a sender ID of 3 to 11\nletters and digits. It lands as `pending`, and can be used once our team\napproves it. Sending again for your own pending or rejected request\nupdates it.\n\n`422` when the sender is malformed, already approved, or held by one of\nyour end users.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "sender"
                ],
                "properties": {
                  "sender": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "An E.164 number, or a sender ID of 3 to 11 letters and digits.",
                    "example": "HarbourCafe"
                  },
                  "notes": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 1000,
                    "description": "What the sender is for, for our team's check.",
                    "example": "Appointment reminders for our clinics."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The request, pending.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/SmsSender"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/sms/senders/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "description": "The request's `id` (a uuid), from `GET /sms/senders`.",
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "example": "3e6a9d2f-7b14-4c58-9f03-b2d8e1a6c47f"
        }
      ],
      "delete": {
        "tags": [
          "SMS"
        ],
        "summary": "Withdraw an SMS Sender Request",
        "operationId": "withdraw_sms_sender",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "sms:send"
            ]
          }
        ],
        "description": ">**Required Scope(s):** sms:send\n\nTake back one of your own pending requests; it reads `withdrawn`. A\nrequest our team has already decided, or one an end user made, answers\n`409` and is unchanged.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The request, withdrawn.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/SmsSender"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/fax/documents": {
      "get": {
        "tags": [
          "Fax"
        ],
        "summary": "List Faxes",
        "operationId": "list_faxes",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nEvery fax sent and received on your numbers, your end users' included,\nnewest first: the portal's **Fax History**. Metadata only, never the\ndocument.\n\nA page carries `perPage`, `nextCursor` and `results`. Pass `nextCursor`\nback as `cursor` for the next page, until it is `null`.\n",
        "parameters": [
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "inbound",
                "outbound"
              ]
            }
          },
          {
            "name": "number",
            "in": "query",
            "required": false,
            "description": "One of your numbers; only faxes received on or sent from it.",
            "schema": {
              "type": "string",
              "example": "61299999999"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Part of the other party's number, as the portal's search.",
            "schema": {
              "type": "string",
              "maxLength": 32
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "received",
                "emailed",
                "delivered",
                "failed",
                "pending",
                "rendering",
                "dialing",
                "sending",
                "sent"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "Faxes received or queued at or after this time. A date alone means the start of that day.",
            "schema": {
              "type": "string",
              "example": "2026-11-01"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "Faxes received or queued at or before this time. A date alone means the end of that day.",
            "schema": {
              "type": "string",
              "example": "2026-11-01"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "The `nextCursor` of the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A page of faxes.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "perPage",
                    "nextCursor",
                    "results"
                  ],
                  "properties": {
                    "perPage": {
                      "type": "integer"
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as `cursor` for the next page; `null` on the last page."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FaxDocument"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Fax"
        ],
        "summary": "Send a Fax",
        "operationId": "send_fax",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:create"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:create\n\nSend from one of your numbers that is on a fax plan, to one or more\nAustralian landlines, mobiles and 13, 1300 and 1800 numbers: one fax per\ndestination, each billed per page. A fax cannot be recalled.\n\nSend `multipart/form-data`. Documents are PDF or TIFF only, at most 5\nof them, each at most 10 MB. A cover page, when it is on in your fax\nsettings, goes first and shows the subject, note and `replyEmail`.\n\n**`Idempotency-Key` is required** (`400` without one): a retry with the\nsame key returns the first send's faxes instead of faxing again.\n\n`202` with one fax per destination, `pending`. Follow each with\n`GET /fax/documents/{id}` or the `fax.sent` and `fax.failed` webhook\nevents. `422` when the number is not yours or not on a fax plan, a\ndestination cannot be faxed, a document is the wrong type or too large,\nthere are too many, or a document fails the virus scan.\n",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "from",
                  "to",
                  "documents"
                ],
                "properties": {
                  "from": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "One of your numbers on a fax plan.",
                    "example": "61299999999"
                  },
                  "to": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 50,
                    "description": "The numbers to fax, as `to[]`.",
                    "items": {
                      "type": "string",
                      "maxLength": 32,
                      "example": "0288887777"
                    }
                  },
                  "subject": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "For the cover page."
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 2000,
                    "description": "For the cover page."
                  },
                  "replyEmail": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 320,
                    "description": "Shown on the cover page as who the fax is from, and sent the result by email. Leave it out for no result email."
                  },
                  "documents": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 5,
                    "description": "PDF or TIFF files, as `documents[]`, each at most 10 MB.",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "x-summary": "Accepted",
            "description": "One fax per destination, queued.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "results"
                  ],
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FaxDocument"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotInSandbox"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/fax/documents/{id}": {
      "get": {
        "tags": [
          "Fax"
        ],
        "summary": "Get a Fax",
        "operationId": "get_fax",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nOne fax on your account, by the id `GET /fax/documents`, `POST\n/fax/documents` and the `fax.*` webhook events give it. Metadata only,\nnever the document. `404` for any other id.\n",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The fax.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/FaxDocument"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/fax/settings": {
      "get": {
        "tags": [
          "Fax"
        ],
        "summary": "Get Fax Settings",
        "operationId": "get_fax_settings",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nYour fax domain and cover page: the portal's **Fax Settings**.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The settings.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/FaxSettings"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "Fax"
        ],
        "summary": "Update Fax Settings",
        "operationId": "update_fax_settings",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:update\n\nSet your fax domain or cover page; a field left out keeps its value.\n`domain: null` goes back to the platform's domain. Check a new domain\nwith `POST /fax/settings/domain-check`.\n\n`422` when the domain is not a hostname, is a shared platform domain, or\nis held by another account.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255,
                    "example": "fax.example.com.au"
                  },
                  "coverPage": {
                    "type": "object",
                    "properties": {
                      "enabled": {
                        "type": "boolean"
                      },
                      "company": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 120
                      },
                      "footer": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 200
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The settings as saved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/FaxSettings"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/fax/settings/domain-check": {
      "post": {
        "tags": [
          "Fax"
        ],
        "summary": "Check a Fax Domain",
        "operationId": "check_fax_domain",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nCheck your fax domain both ways, as **Check domain** in the portal: your\nsaved domain, or the one you give. Nothing is stored, so run it again\nafter changing your DNS. `422` when there is no domain to check.\n\nIt only reads, so a suspended account may still call it, as it may any\n`GET`.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "A domain to check instead of the saved one.",
                    "example": "fax.example.com.au"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/FaxDomainCheck"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/allowed-countries": {
      "get": {
        "tags": [
          "SIP Trunks"
        ],
        "summary": "Get Allowed Countries",
        "operationId": "get_account_allowed_countries",
        "description": ">**Required Scope(s):** voice:read\n\nYour account's list of countries its SIP trunks may call when\n`International` is in their calling permissions. Every trunk follows it\nunless the trunk has its own `allowedCountries`, and a new trunk follows\nit too. An account that has never set a list allows every country.\n\nThe list applies to international calls only: calls to Australia and New\nZealand follow each trunk's calling permissions, high-risk destinations\nstay blocked whatever the list says, and 000 always connects. New Zealand\nis not in the list: a call to it is `NZMobile` or `NZNational`, never\ninternational, so take those out of a trunk's `callingPermissions` to\nstop it.\n",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/AllowedCountries"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "put": {
        "tags": [
          "SIP Trunks"
        ],
        "summary": "Set Allowed Countries",
        "operationId": "put_account_allowed_countries",
        "description": ">**Required Scope(s):** voice:update\n\nReplace your account's list. Every trunk that follows it uses the new\nlist from its next call; a trunk with its own `allowedCountries` keeps\nits own. At least one country: to stop every international call, take\n`International` out of the trunk's calling permissions instead. A list\nnaming `NZ` is a `422`: New Zealand follows `NZMobile` and `NZNational`.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:update"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "allowedCountries"
                ],
                "properties": {
                  "allowedCountries": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string",
                      "pattern": "^[A-Za-z]{2}$"
                    },
                    "description": "ISO 3166 alpha-2 codes, each one of `availableCountries` (the United Kingdom is `GB`, not `UK`).",
                    "example": [
                      "GB",
                      "US"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The list as it now stands.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/AllowedCountries"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/trunks/{username}/spend-cap/release": {
      "parameters": [
        {
          "name": "username",
          "in": "path",
          "required": true,
          "description": "The trunk's SIP digest username.",
          "schema": {
            "type": "string"
          },
          "example": "784512"
        }
      ],
      "post": {
        "tags": [
          "SIP Trunks"
        ],
        "summary": "Release Spend Cap Hold",
        "operationId": "post_trunk_spend_cap_release",
        "description": ">**Required Scope(s):** voice:update\n\nLift the hold on a trunk that reached its daily spend cap, so its\noutbound calls connect again now rather than at midnight Brisbane time.\nThe trunk then runs for the rest of the day at the same cap; changing the\ncap arms it again. Raising `dailySpendCapExGst` above `spendTodayExGst`\nalso lifts the hold. A trunk that is not held is a 422. The hold never\nstopped 000 or inbound calls.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:update"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The trunk, no longer held.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/SipTrunk"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/residential-lines": {
      "get": {
        "tags": [
          "Residential Lines"
        ],
        "summary": "List Residential Lines",
        "operationId": "list_residential_lines",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nReturns a paginated list of your residential lines, oldest first. A line\nwith `awaitingNumber: true` is billing but has no number yet, so it can\nmake and receive no calls. Filter by `endUser` for one end user's lines.\n",
        "parameters": [
          {
            "name": "endUser",
            "in": "query",
            "required": false,
            "description": "Only the lines of this end user, by its public number. A number that is not one of your end users is a 422, not an empty list.",
            "schema": {
              "type": "string",
              "example": "100042"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number to retrieve. Defaults to `1`.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "description": "Number of records per page. Defaults to `50`, maximum `200`.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 50,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A paginated list of residential lines.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ResidentialLine"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Residential Lines"
        ],
        "summary": "Order a Residential Line",
        "operationId": "create_residential_line",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:create"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:create\n\nOrder a residential line on a plan. Every residential number is lodged\nwith the emergency register against a service address, so the order\nneeds one of your emergency addresses; the answer gives it back for\nordering the line's number.\n\n**The line bills from now.** It cannot make or receive calls until its\nnumber is ordered, and reads `awaitingNumber: true` until then. The\nanswer carries the line's SIP password, once: it cannot be read again.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "plan",
                  "emergencyAddressId"
                ],
                "properties": {
                  "plan": {
                    "type": "string",
                    "enum": [
                      "payg",
                      "ultimate"
                    ]
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 120,
                    "description": "A friendly name for the line.",
                    "example": "Smith Home Line"
                  },
                  "emergencyAddressId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "One of your emergency addresses (`GET /emergency-addresses`): where the line's number will be lodged. Another account's address, or an unknown one, is a 422."
                  },
                  "endUser": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 64,
                    "description": "The end user this line is for, by its public number. One of your end users that is not archived; any other number is a 422. Omitted or null makes the line your own.",
                    "example": "100042"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The line was ordered. Includes the one-time SIP password.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/ResidentialLine"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "sipPassword": {
                              "type": "string",
                              "description": "The line's SIP password. Shown only in this response."
                            },
                            "emergencyAddressId": {
                              "type": "string",
                              "format": "uuid",
                              "description": "The address sent, to order the line's number against."
                            }
                          }
                        }
                      ]
                    },
                    "notice": {
                      "type": "string",
                      "description": "That the line bills now and takes no calls until its number is ordered."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/residential-lines/{username}": {
      "parameters": [
        {
          "name": "username",
          "in": "path",
          "required": true,
          "description": "The line's SIP username, as call records and numbers name it in `trunk`. A SIP trunk's username is a 404.",
          "schema": {
            "type": "string"
          },
          "example": "r800321-3fa9c1"
        }
      ],
      "get": {
        "tags": [
          "Residential Lines"
        ],
        "summary": "Get Residential Line",
        "operationId": "get_residential_line",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nReturns one of your residential lines, with its live numbers.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The line.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ResidentialLine"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "Residential Lines"
        ],
        "summary": "Change a Residential Line's Plan",
        "operationId": "update_residential_line",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:update\n\nMove an active line to the other plan, from today. The old plan's\nmonthly charge still applies to this billing period; the new one starts\ntoday. A line that is not active, or a change onto the plan it is\nalready on, is a 422.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "plan"
                ],
                "properties": {
                  "plan": {
                    "type": "string",
                    "enum": [
                      "payg",
                      "ultimate"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The line, on its new plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ResidentialLine"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/residential-lines/{username}/settings": {
      "parameters": [
        {
          "name": "username",
          "in": "path",
          "required": true,
          "description": "The line's SIP username. A SIP trunk's username is a 404.",
          "schema": {
            "type": "string"
          },
          "example": "r800321-3fa9c1"
        }
      ],
      "get": {
        "tags": [
          "Residential Lines"
        ],
        "summary": "Get a Residential Line's Call Settings",
        "operationId": "get_residential_line_settings",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nReturns the line's call forwarding, Do Not Disturb, anonymous call\nreject and call waiting, and the kinds of number it may call.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The line's call settings.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ResidentialLineSettings"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "Residential Lines"
        ],
        "summary": "Update a Residential Line's Call Settings",
        "operationId": "update_residential_line_settings",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:update\n\nChange any of the line's call settings; a setting left out keeps its\nvalue. Turning forwarding on needs a `destination` of 6 to 15 digits.\nThe change reaches the line within a minute, and the portal and the end\nuser's star codes see the same settings. `callingPermissions` cannot be\nchanged here.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "forwarding": {
                    "type": "object",
                    "properties": {
                      "enabled": {
                        "type": "boolean"
                      },
                      "destination": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "pattern": "^[0-9]{6,15}$",
                        "description": "Never 000, 112 or 106, in any form; that is a `422`, \"Calls can’t be diverted to an emergency number (000, 112 or 106).\"",
                        "example": "0412345678"
                      }
                    }
                  },
                  "doNotDisturb": {
                    "type": "boolean"
                  },
                  "anonymousReject": {
                    "type": "boolean"
                  },
                  "callWaiting": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The line's call settings as saved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ResidentialLineSettings"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/residential-lines/{username}/voicemail": {
      "parameters": [
        {
          "name": "username",
          "in": "path",
          "required": true,
          "description": "The line's SIP username. A SIP trunk's username is a 404.",
          "schema": {
            "type": "string"
          },
          "example": "r800321-3fa9c1"
        }
      ],
      "get": {
        "tags": [
          "Residential Lines"
        ],
        "summary": "Get a Residential Line's Voicemail",
        "operationId": "get_residential_line_voicemail",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nReturns whether the line's mailbox is on, where its messages are\nemailed, and what happens to a message once it is emailed. The PIN is\nthe end user's own and is not returned.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The line's voicemail settings.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ResidentialLineVoicemail"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "Residential Lines"
        ],
        "summary": "Update a Residential Line's Voicemail",
        "operationId": "update_residential_line_voicemail",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:update\n\nTurn the mailbox on or off and set where messages are emailed; a field\nleft out keeps its value. Send `email: null` to stop emailing. The PIN\ncannot be set here: sending `pin` is a 422.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResidentialLineVoicemail"
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The line's voicemail settings as saved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ResidentialLineVoicemail"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/caller-id-authorisations": {
      "get": {
        "tags": [
          "Caller ID Authorisations"
        ],
        "summary": "List Caller ID Authorisation Requests",
        "operationId": "list_caller_id_authorisations",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nReturns your caller ID authorisation requests, newest first. Filter by\n`status` for, say, the ones still pending.\n",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "approved",
                "rejected",
                "cancelled"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number to retrieve. Defaults to `1`.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "description": "Number of records per page. Defaults to `50`, maximum `200`.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 50,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A paginated list of requests.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CallerIdAuthorisation"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Caller ID Authorisations"
        ],
        "summary": "Request a Caller ID Authorisation",
        "operationId": "create_caller_id_authorisation",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:create"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:create\n\nAsk to present a number your account does not hold as a trunk's caller\nID. Send `multipart/form-data` with the number, why you need it, and\nproof that you may use it (a PDF, PNG or JPEG up to 8 MB, such as a\nrecent bill for the number). We review it and email the account's\ntechnical contact, or its notification address, with the outcome; the\ndecision also sends `callerId.statusChanged`.\n\nA 422 on `number` means a 13, 1300, 1800 or 1900 number (never\npresentable), a number your account can already present, or one with a\nrequest already pending.\n",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "number",
                  "reason",
                  "evidence"
                ],
                "properties": {
                  "number": {
                    "type": "string",
                    "maxLength": 20,
                    "example": "0299990000"
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 2000,
                    "description": "Why you need to present this number."
                  },
                  "evidence": {
                    "type": "string",
                    "format": "binary",
                    "description": "Proof you may use the number. PDF, PNG or JPEG, up to 8 MB."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The request, pending our review.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/CallerIdAuthorisation"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/caller-id-authorisations/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "description": "The request's `id` (a uuid).",
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "example": 42
        }
      ],
      "get": {
        "tags": [
          "Caller ID Authorisations"
        ],
        "summary": "Get a Caller ID Authorisation Request",
        "operationId": "get_caller_id_authorisation",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nReturns one request: its status, when it was made and decided, and the\nreason for a rejection.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/CallerIdAuthorisation"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Caller ID Authorisations"
        ],
        "summary": "Cancel a Caller ID Authorisation Request",
        "operationId": "cancel_caller_id_authorisation",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:delete"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:delete\n\nWithdraw a request we have not decided yet. It stays in the list as\n`cancelled`. A request already approved, rejected or cancelled is a 422.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The request, now cancelled.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/CallerIdAuthorisation"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/data/sq/batches": {
      "get": {
        "summary": "List your qualification batches",
        "description": ">**Required Scope(s):** data:read\n\nYour qualification batches, newest first: the ones sent here and the\nones uploaded on the portal's Batch Qualification page. `q` searches the\nbatch's reference. Each batch's rows are on `GET /data/sq/batches/{id}`.\n",
        "operationId": "list_data_sq_batches",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Q"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "`createdAt` or `updatedAt`, `-` in front for descending.",
            "schema": {
              "type": "string",
              "enum": [
                "createdAt",
                "-createdAt",
                "updatedAt",
                "-updatedAt"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/CreatedFrom"
          },
          {
            "$ref": "#/components/parameters/CreatedTo"
          },
          {
            "$ref": "#/components/parameters/UpdatedSince"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of batches.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "total",
                    "page",
                    "perPage",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DataSqBatch"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data Service Qualification"
        ]
      },
      "post": {
        "summary": "Qualify a batch of premises",
        "description": ">**Required Scope(s):** data:read\n\nQualify up to 2,000 premises as one job, as the portal's Batch\nQualification page does with a CSV. Each row is a location id (`locId`,\nLOC… or OPC…) or a street `address`, with your own `reference` for it.\nFor a premises whose port or line is in use, `avc` and `authorityDate`\ncarry the service id and customer authority date for a transfer, as the\nCSV's `avc` and `authority_date` columns do.\n\nThe batch is accepted at once (`202`) and each row is qualified on our\nside, usually within minutes: follow it with\n`GET /data/sq/batches/{id}` until its `status` is `completed`. An\naddress that does not resolve to one location is `unresolved`, not a\nrefused batch.\n\nBatches share the portal's allowance: ten batches an hour, and a number\nof rows a day. A batch over either is refused whole with\n`409 - sq_batch_allowance_exceeded`, the portal's words in `reason`, and\nthe rows left today in `remainingRows`; nothing in it is qualified or\ncounted. Creating orders from a batch is not offered.\n\nIf the batch can't be started just then, the answer is `503` and\nnothing is kept or counted: send the same request again shortly.\n",
        "operationId": "create_data_sq_batch",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "rows"
                ],
                "properties": {
                  "reference": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255,
                    "description": "Your name for the batch. The portal shows the batch by it."
                  },
                  "rows": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 2000,
                    "items": {
                      "type": "object",
                      "description": "One premises. Give `locId` or `address`, not both.",
                      "properties": {
                        "locId": {
                          "type": "string",
                          "pattern": "^(LOC|OPC)\\d{12}$",
                          "description": "An NBN Location ID or an Opticomm Property ID.",
                          "example": "LOC000000000001"
                        },
                        "address": {
                          "type": "string",
                          "maxLength": 500,
                          "description": "A street address, resolved to its location first.",
                          "example": "16 De Vecchi Close, Edmonton QLD 4869"
                        },
                        "reference": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 255,
                          "description": "Your reference for the row, given back with its result."
                        },
                        "avc": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^[Aa][Vv][Cc]\\d{12}$",
                          "description": "For a transfer, the service in use at the premises, in any case."
                        },
                        "authorityDate": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date",
                          "description": "For a transfer, the date the end user gave authority."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "x-summary": "Accepted",
            "description": "The batch is accepted and its rows are being qualified.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/DataSqBatch"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "x-summary": "Over the allowance",
            "description": "The batch is over your account's batch allowance.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "status": 409,
                    "code": "sq_batch_allowance_exceeded",
                    "reason": "This batch has 500 rows, and this account has 120 of its 5000 rows a day left. Upload a smaller batch, or the rest tomorrow.",
                    "remainingRows": 120
                  }
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Data Service Qualification"
        ]
      }
    },
    "/data/sq/batches/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "description": "The batch's id."
        }
      ],
      "get": {
        "summary": "Read a qualification batch and its results",
        "description": ">**Required Scope(s):** data:read\n\nOne batch, its progress, and one page of its rows in the order you sent\nthem, each with its result once qualified. `page` and `perPage` page the\nrows. Another account's batch answers `404`.\n",
        "operationId": "get_data_sq_batch",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/DataSqBatch"
                        },
                        {
                          "type": "object",
                          "required": [
                            "rows"
                          ],
                          "properties": {
                            "rows": {
                              "type": "object",
                              "description": "One page of the batch's rows.",
                              "required": [
                                "total",
                                "page",
                                "perPage",
                                "results"
                              ],
                              "properties": {
                                "total": {
                                  "type": "integer"
                                },
                                "page": {
                                  "type": "integer"
                                },
                                "perPage": {
                                  "type": "integer"
                                },
                                "results": {
                                  "type": "array",
                                  "items": {
                                    "$ref": "#/components/schemas/DataSqBatchRow"
                                  }
                                }
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data Service Qualification"
        ]
      }
    },
    "/colocation/services": {
      "get": {
        "summary": "List your colocation services",
        "description": ">**Required Scope(s):** colocation:read\n\nYour colocation services, newest first, as the portal's My Colocation\npage lists them. `q` searches the service number.\n",
        "operationId": "list_colocation_services",
        "security": [
          {
            "OAuth2": [
              "colocation:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Q"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "`createdAt` or `updatedAt`, `-` in front for descending.",
            "schema": {
              "type": "string",
              "enum": [
                "createdAt",
                "-createdAt",
                "updatedAt",
                "-updatedAt"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/CreatedFrom"
          },
          {
            "$ref": "#/components/parameters/CreatedTo"
          },
          {
            "$ref": "#/components/parameters/UpdatedSince"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of services.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "total",
                    "page",
                    "perPage",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ColocationService"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Colocation"
        ]
      }
    },
    "/colocation/services/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "description": "The colocation service's id."
        }
      ],
      "get": {
        "summary": "Read a colocation service",
        "description": ">**Required Scope(s):** colocation:read\n\nOne of your colocation services. Another account's service answers `404`.\n",
        "operationId": "get_colocation_service",
        "security": [
          {
            "OAuth2": [
              "colocation:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ColocationService"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Colocation"
        ]
      }
    },
    "/colocation/services/{id}/remote-hands": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "description": "The colocation service the work is at."
        }
      ],
      "post": {
        "summary": "Ask for remote hands at a colocation service",
        "description": ">**Required Scope(s):** colocation:create\n\nAsk our technicians for work at your rack, as the portal's Remote Hands\nrequest does. Remote hands is billed per incident. The request is a\nsupport ticket with the service linked: it is answered with the new\nticket, which you follow and reply to on `/tickets`, and it shows on the\nportal's Support page.\n\nAnother account's service answers `404`; a decommissioned one `409`.\n",
        "operationId": "create_colocation_remote_hands",
        "security": [
          {
            "OAuth2": [
              "colocation:create"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "description"
                ],
                "properties": {
                  "description": {
                    "type": "string",
                    "maxLength": 20000,
                    "description": "The work needed at the rack."
                  },
                  "priority": {
                    "type": "string",
                    "enum": [
                      "low",
                      "normal",
                      "high",
                      "urgent"
                    ],
                    "default": "normal"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The ticket raised.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/Ticket"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Colocation"
        ]
      }
    },
    "/colocation/services/{id}/extras": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "description": "The colocation service the extra is for."
        }
      ],
      "post": {
        "summary": "Ask for an extra on a colocation service",
        "description": ">**Required Scope(s):** colocation:create\n\nAsk for another power outlet, cross-connect or network port, or a\nbandwidth uplift, as the portal's Extras request does. We quote and\nbill it. The request is a support ticket with the service linked: it is\nanswered with the new ticket, which you follow on `/tickets`, and it\nshows on the portal's Support page.\n\nAnother account's service answers `404`; a decommissioned one `409`.\n",
        "operationId": "create_colocation_extras",
        "security": [
          {
            "OAuth2": [
              "colocation:create"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "kind",
                  "details"
                ],
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "power_outlet",
                      "cross_connect",
                      "network_port",
                      "bandwidth"
                    ]
                  },
                  "details": {
                    "type": "string",
                    "maxLength": 20000,
                    "description": "What you need."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The ticket raised.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/Ticket"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Colocation"
        ]
      }
    },
    "/colocation/sites": {
      "get": {
        "summary": "List the sites you can order colocation at",
        "description": ">**Required Scope(s):** colocation:read\n\nThe sites that offer colocation, as the portal's order form lists them.\nPass a site's `id` as `siteId` on `POST /colocation/orders`.\n",
        "operationId": "list_colocation_sites",
        "security": [
          {
            "OAuth2": [
              "colocation:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "results"
                  ],
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "name",
                          "label",
                          "defaultPowerAmps"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The site's code.",
                            "example": "SYD1"
                          },
                          "name": {
                            "type": "string",
                            "example": "Equinix SY1"
                          },
                          "label": {
                            "type": "string",
                            "description": "The site as the portal names it.",
                            "example": "SYD1 — Equinix SY1"
                          },
                          "defaultPowerAmps": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "The power a new service at this site includes, in amps, when the tier does not say."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Colocation"
        ]
      }
    },
    "/colocation/orders": {
      "post": {
        "summary": "Order colocation",
        "description": ">**Required Scope(s):** colocation:create\n\nOrder rack space at a site, as the portal's Order Colocation page does.\nThe order is recorded at once and we assign the rack and rack units; the\nservice then appears on `GET /colocation/services`.\n\nAn account that may not place orders (its credit, an onboarding check,\nor a prepay balance short of the order) is refused with `403 -\nforbidden` and the reason, as a data order is. A site that does not\noffer colocation answers `422` naming `siteId`.\n",
        "operationId": "create_colocation_order",
        "security": [
          {
            "OAuth2": [
              "colocation:create"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "siteId",
                  "sellUnit"
                ],
                "properties": {
                  "siteId": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "The site's code, from `GET /colocation/sites`.",
                    "example": "SYD1"
                  },
                  "sellUnit": {
                    "$ref": "#/components/schemas/ColocationSellUnit"
                  },
                  "requestedPowerAmps": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 1000,
                    "description": "The power you need, in amps, when more than the tier includes."
                  },
                  "notes": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The order, waiting for us to assign rack space.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ColocationOrder"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Colocation"
        ]
      }
    },
    "/data/occupancy-documents": {
      "post": {
        "summary": "Upload a proof of occupancy",
        "description": ">**Required Scope(s):** data:create\n\nWhen the end user has moved into premises whose line or port is still in\nuse by someone else, and the old service's id cannot be given, order a\nConnect Outstanding with a proof of occupancy instead: a lease, a utility\nbill or similar showing the end user occupies the premises.\n\nSend `multipart/form-data` with the document as `file`, a PDF, JPEG or\nPNG up to 10 MB. The answer's `id` goes on the order as\n`occupancyDocumentId` (on `POST /data/orders` and the NBN Connect\nroutes). Each document is used by one order and kept with it as\nevidence, for as long as the order record is kept. It is stored\nprivately against your account and never served to anyone outside it.\n\nA file of another type or over 10 MB is a `422`.\n",
        "operationId": "upload_occupancy_document",
        "security": [
          {
            "OAuth2": [
              "data:create"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "The document, a PDF, JPEG or PNG up to 10 MB."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The document, ready for an order to use.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/OccupancyDocument"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data Orders"
        ]
      }
    },
    "/bundles": {
      "get": {
        "summary": "List your bundles",
        "description": ">**Required Scope(s):** data:read\n\nYour bundles, newest first, each with its items in order. `q` searches\nthe reference and title.\n",
        "operationId": "list_bundles",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Q"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "`createdAt` or `updatedAt`, `-` in front for descending.",
            "schema": {
              "type": "string",
              "enum": [
                "createdAt",
                "-createdAt",
                "updatedAt",
                "-updatedAt"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/CreatedFrom"
          },
          {
            "$ref": "#/components/parameters/CreatedTo"
          },
          {
            "$ref": "#/components/parameters/UpdatedSince"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of bundles.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "total",
                    "page",
                    "perPage",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Bundle"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data Bundles"
        ]
      },
      "post": {
        "summary": "Start a bundle",
        "description": ">**Required Scope(s):** data:create\n\nStart an empty bundle, as the portal's Start a bundle does. Add to it\nthrough each item's own order route with its id: `bundleId` on\n`POST /data/orders` and `POST /trunks`, and `bundle` on `POST /numbers`.\nEach joins as a draft, and nothing is sent until you submit the bundle\nwith `POST /bundles/{id}/submit`.\n\nNumbers and a trunk added after a data order start once the items above\nthem have completed, so nothing rings or bills before the service it runs\nover; change that, and the order, with `PATCH /bundles/{id}/items/{itemId}`.\n\nA bundle is submitted as a data order, so an account that may not order\ndata services is refused with a `403` here, before anything is added.\n",
        "operationId": "create_bundle",
        "security": [
          {
            "OAuth2": [
              "data:create"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255,
                    "description": "Your name for the bundle."
                  },
                  "endUser": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 64,
                    "description": "The end user the bundle is for, by its public number."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The bundle, empty.",
            "headers": {
              "Location": {
                "description": "Where to read the bundle.",
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/Bundle"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data Bundles"
        ]
      }
    },
    "/bundles/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "description": "The bundle's id."
        }
      ],
      "get": {
        "summary": "Read a bundle",
        "description": ">**Required Scope(s):** data:read\n\nOne of your bundles, with its items in order, each with its state and\nwhat it is still waiting on. Another account's bundle answers `404`.\n",
        "operationId": "get_bundle",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/Bundle"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data Bundles"
        ]
      },
      "delete": {
        "summary": "Cancel a bundle",
        "description": ">**Required Scope(s):** data:delete\n\nCancel a bundle nothing has left: its drafts are discarded and nothing\nin it is sent. A bundle that has been submitted, or has an item already\nsent, is a `409`; contact support for that.\n",
        "operationId": "cancel_bundle",
        "security": [
          {
            "OAuth2": [
              "data:delete"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "responses": {
          "204": {
            "x-summary": "No Content",
            "description": "Cancelled."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data Bundles"
        ]
      }
    },
    "/bundles/{id}/items/{itemId}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "description": "The bundle's id."
        },
        {
          "name": "itemId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The item's `id`, as the bundle read shows it."
        }
      ],
      "patch": {
        "summary": "Move a bundle item, or set when it starts",
        "description": ">**Required Scope(s):** data:update\n\nPut an item at a place in the bundle (`position`, 1 is first; past the\nend puts it last), and say whether it starts only once every item above\nit has completed (`waitsForPrevious`). The first item waits for nothing,\nand numbers on the bundle's own trunk always stay after it and wait for\nit: a change that breaks either is a `422` and changes nothing. A bundle\nthat has been submitted is a `409`.\n\n`acceptNewPrice: true` accepts the price a draft data order costs today\nwhen its `checkoutBlockedReason` is `price_changed`, as the portal's\nAccept New Price: the draft then checks out at that price, its `price`\non the item. It works on a draft still in a submitted bundle too, but\nnot on one already checked out (a `409`). A draft whose price has not\nrisen is left as it is. Send it on its own, or with a move.\n",
        "operationId": "update_bundle_item",
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "position": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "waitsForPrevious": {
                    "type": "boolean"
                  },
                  "acceptNewPrice": {
                    "type": "boolean",
                    "description": "`true` to accept a draft data order's new, higher price (`checkoutBlockedReason` `price_changed`), so it can be checked out."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The item as it now stands.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/BundleItem"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data Bundles"
        ]
      },
      "delete": {
        "summary": "Remove a draft from a bundle",
        "description": ">**Required Scope(s):** data:delete\n\nDrop a draft from the bundle and discard it: a data order, numbers (their\nhold is freed) or a trunk. Remove the numbers ordered for the bundle's\ntrunk before the trunk itself. Something already sent, or a bundle that\nhas been submitted, is a `409`.\n",
        "operationId": "delete_bundle_item",
        "security": [
          {
            "OAuth2": [
              "data:delete"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "responses": {
          "204": {
            "x-summary": "No Content",
            "description": "Removed."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Data Bundles"
        ]
      }
    },
    "/bundles/{id}/submit": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "description": "The bundle's id."
        }
      ],
      "post": {
        "summary": "Submit a bundle",
        "description": ">**Required Scope(s):** data:create\n\nLimit: 30 per minute for the account (carrier write).\n\nSubmit the bundle, as the portal's Submit All: every item that is ready\nis sent now, each on its own, and the items that wait are sent as the\nitems above them complete. Read the bundle to follow each item. Sent\nagain, it sends anything added or made ready since.\n\nTo check out only some of the draft data orders, list their ids in\n`orders`, as the portal's ticked rows. Only those are checked out; every\nother draft stays in the bundle as a draft, to check out later, change or\nremove. Without `orders`, every draft that is ready is checked out.\n\nEach draft the submit was for is answered in `orders`: `submitted`\n(`scheduled` with `sendAt`), or `refused` with the\n`checkoutBlockedReason` its item shows on the bundle read and the words\nfor it. One refusal does not stop the rest, and a refused draft stays a\ndraft in the bundle. A draft whose price has gone up since it was added\nis refused with `price_changed` and its `price` today: accept it with\n`acceptNewPrice` on `PATCH /bundles/{id}/items/{itemId}`, and submit\nagain. An id in `orders` that is not a data order in this bundle is a\n`422` on that place in the list, and nothing is sent.\n\nA bundle with nothing ready to send, or one that has finished, is a\n`409`. Its data orders go to the carrier, so the `Idempotency-Key` is\nrequired and the call counts against the write limit.\n\nOn a prepaid account, the chosen ready data orders' up-front cost together\n(each one's setup and first charge, ex GST) must fit your balance less\nwhat orders already sent hold. If it does not, the call is a `422` and\nnothing is sent: the `reason` names the total, the shortfall and what is\nheld.\n\nTo send the bundle later instead, give `sendAt`: at least 15 minutes\nand at most 30 days away. The whole bundle waits for that time: each\ndraft is held for it, and its number orders and trunk wait with them,\nso nothing goes to a carrier and nothing is provisioned until then.\n`released` is empty (but for the drafts placed now, below), the waiting items are in `waiting`, and the\nbundle's `sendAt` is the time. The prepay check is made once, now, for\nthe whole checkout. At the time the drafts go, each checked again as a\ndelayed order is, then the numbers and trunk as an immediate submit\nwould have released them; one that fails is held for a person with the\nreason, and the rest still go. Change the time for all of them with\n`PATCH /bundles/{id}/send-time`, or cancel it with\n`DELETE /bundles/{id}/send-time`, which returns the bundle to how it was\nbefore the submit. A time outside the window is a `422` on `sendAt`.\n\nAn nbn draft a technician attends (a new NTD, a Fibre Uplift, or no NTD\nchosen) is not held for `sendAt`: its day is its install appointment, so\nit is placed with nbn now with the appointment booked on it, which locks\nthe slot in, as `POST /nbn/orders/delayed` places one. It is answered\n`placed` in `orders` and listed in `released`; the rest are held. If such\na draft has no appointment booked, the call is a `422` naming the drafts\nthat need one, and nothing is held or placed: book the appointments and\nsubmit again. The bundle's send time changes and cancels only the drafts\nit holds. A placed order is with nbn: move its appointment to change its\nday, and cancelling it asks our team, who withdraw it with nbn by hand.\n",
        "operationId": "submit_bundle",
        "security": [
          {
            "OAuth2": [
              "data:create"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sendAt": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "When to send the bundle, its drafts, number orders and trunk alike, at least 15 minutes and at most 30 days away. Left out or null, they are sent now.",
                    "example": "2026-12-01T02:00:00+10:00"
                  },
                  "orders": {
                    "anyOf": [
                      {
                        "type": "array",
                        "minItems": 1,
                        "maxItems": 200,
                        "uniqueItems": true,
                        "items": {
                          "type": "string",
                          "maxLength": 64
                        }
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "The ids of the draft data orders to check out, as the bundle read shows them. Left out or null, every ready draft is checked out.",
                    "example": [
                      "PND000000000901",
                      "PND000000000902"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "x-summary": "Accepted",
            "description": "The ready items are on their way.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "released",
                        "waiting",
                        "orders",
                        "bundle"
                      ],
                      "properties": {
                        "released": {
                          "type": "array",
                          "description": "The ids of the items sent now.",
                          "items": {
                            "type": "string"
                          }
                        },
                        "waiting": {
                          "type": "array",
                          "description": "The ids of the items that follow once the items above them complete.",
                          "items": {
                            "type": "string"
                          }
                        },
                        "orders": {
                          "type": "array",
                          "description": "One answer for each draft data order the submit was for: those in `orders`, else every draft in the bundle.",
                          "items": {
                            "type": "object",
                            "required": [
                              "id",
                              "outcome",
                              "reason",
                              "message",
                              "price"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "The draft's id, as given.",
                                "example": "PND000000000901"
                              },
                              "outcome": {
                                "type": "string",
                                "enum": [
                                  "submitted",
                                  "scheduled",
                                  "placed",
                                  "refused"
                                ],
                                "description": "`submitted`: checked out, and sent as the bundle's order allows. `scheduled`: checked out and held for `sendAt`. `placed`: with `sendAt`, an nbn draft a technician attends, placed now with its booked appointment rather than held. `refused`: not checked out, and still a draft in the bundle."
                              },
                              "reason": {
                                "description": "Why it was refused, or null.",
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/CheckoutBlockedReason"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "message": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "What to do about `reason`, in words for this draft."
                              },
                              "price": {
                                "description": "For `price_changed`, the price today to accept; else null. Null too for a key without `billing:read`.",
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/DraftOrderPrice"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            }
                          }
                        },
                        "bundle": {
                          "$ref": "#/components/schemas/Bundle"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "x-summary": "Unprocessable Entity",
            "description": "A prepaid balance, less what sent orders hold, does not cover the chosen ready data orders together; or an id in `orders` is not a data order in this bundle (named in `fields`); or, with `sendAt`, an nbn draft a technician attends has no install appointment booked (the `reason` names the drafts). Nothing was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "status": 422,
                    "code": "validation_failed",
                    "reason": "Your prepaid balance does not cover this checkout: the chosen drafts cost $348.00 up front, ex GST (short by $48.00). Check out fewer drafts, or top up. Nothing was sent."
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Data Bundles"
        ]
      }
    },
    "/bundles/{id}/send-time": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "description": "The bundle's id."
        }
      ],
      "patch": {
        "summary": "Change a bundle's send time",
        "description": ">**Required Scope(s):** data:update\n\nMove everything a bundle's submit holds for later (`sendAt` on\n`POST /bundles/{id}/submit`), its orders, number orders and trunk, to a\nnew time, together: at least 15 minutes and at most 30 days away.\nNothing goes to a carrier and nothing is provisioned. An order already\nsent is left as it is.\n\nA bundle holding nothing for a later time is a `409`, and a time\noutside the window a `422` on `sendAt`.\n",
        "operationId": "update_bundle_send_time",
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "sendAt"
                ],
                "properties": {
                  "sendAt": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The new time, at least 15 minutes and at most 30 days away.",
                    "example": "2026-12-02T02:00:00+10:00"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The bundle, with its new `sendAt`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/Bundle"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Data Bundles"
        ]
      },
      "delete": {
        "summary": "Cancel a bundle's send time",
        "description": ">**Required Scope(s):** data:delete\n\nThe bundle goes back to how it was before its submit: every order it\nholds for later goes back to being a draft in the bundle, and its\nnumber orders and trunk stay drafts. Nothing has been sent, so there is\nno charge. The drafts stay in the bundle until you submit them again or\nremove them. An order already sent is left as it is.\n\nA bundle holding nothing for a later time is a `409`.\n",
        "operationId": "delete_bundle_send_time",
        "security": [
          {
            "OAuth2": [
              "data:delete"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The bundle, its items drafts again and its `sendAt` null.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/Bundle"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Data Bundles"
        ]
      }
    },
    "/bundles/{id}/keep": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "description": "The bundle's id."
        }
      ],
      "post": {
        "summary": "Keep a bundle's drafts",
        "description": ">**Required Scope(s):** data:update\n\nA draft data order that has not been checked out is removed on its\n`draftRemoval.removesAt`, 30 days after it was made. Keep gives every\ndraft in the bundle that can still be kept another 30 days, but never\nmore than 90 days from when it was made. Each draft's\n`draftRemoval.keepLimit` is the latest Keep can take it to, and\n`canKeep` says whether Keep would move it. Nothing goes to the carrier.\n\nA delayed order, an order the carrier already has, and a draft that has\nbeen checked out are never removed, so they show no `draftRemoval`.\n\nA bundle none of whose drafts can be kept any longer, or one that has\nfinished, is a `409`.\n",
        "operationId": "keep_bundle_drafts",
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "How many drafts were kept, and the bundle with their new removal dates.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "kept",
                        "bundle"
                      ],
                      "properties": {
                        "kept": {
                          "type": "integer",
                          "minimum": 1,
                          "description": "How many drafts were kept."
                        },
                        "bundle": {
                          "$ref": "#/components/schemas/Bundle"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Data Bundles"
        ]
      }
    },
    "/vpn/groups": {
      "get": {
        "summary": "List VPN Groups",
        "description": "Your VPN access groups, by name, with what each allows and how many\nusers it has.\n",
        "operationId": "get_vpn_groups",
        "security": [
          {
            "OAuth2": [
              "vpn:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "total",
                    "page",
                    "perPage",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/VpnGroup"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "VPN"
        ]
      },
      "post": {
        "summary": "Create a VPN Group",
        "description": "Create an access group. A `split` group needs at least one destination,\nand none may name a reserved or Check Networks network: such a\ndestination is `422` naming `destinations`. A `full` group keeps none.\n",
        "operationId": "post_vpn_groups",
        "security": [
          {
            "OAuth2": [
              "vpn:create"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "accessMode"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "accessMode": {
                    "type": "string",
                    "enum": [
                      "split",
                      "full"
                    ]
                  },
                  "destinations": {
                    "type": "array",
                    "maxItems": 100,
                    "description": "For a `split` group, the networks it reaches, as CIDRs or bare addresses.",
                    "items": {
                      "type": "string",
                      "example": "192.168.50.0/24"
                    }
                  },
                  "notes": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/VpnGroup"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "VPN"
        ]
      }
    },
    "/vpn/groups/{id}": {
      "patch": {
        "summary": "Update a VPN Group",
        "description": "Change a group's name, access mode, destinations or notes; a field left\nout is kept. Every user in the group takes the change, and no profile\nhas to be downloaded again.\n",
        "operationId": "patch_vpn_group",
        "security": [
          {
            "OAuth2": [
              "vpn:update"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The group's id.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "accessMode": {
                    "type": "string",
                    "enum": [
                      "split",
                      "full"
                    ]
                  },
                  "destinations": {
                    "type": "array",
                    "maxItems": 100,
                    "items": {
                      "type": "string"
                    }
                  },
                  "notes": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/VpnGroup"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "VPN"
        ]
      },
      "delete": {
        "summary": "Delete a VPN Group",
        "description": "Delete a group whose users are all removed or moved. Removed users\ndon't hold a group; a group that still has a live or suspended user\nis `409` with the reason. A group with a dedicated egress IP has the\nIP released, and its monthly charge ends on the day of the delete. If\nthe IP can't be released just now, the delete is `503` and nothing\nchanges: the group, its IP and its charge stay until you try again.\n",
        "operationId": "delete_vpn_group",
        "security": [
          {
            "OAuth2": [
              "vpn:delete"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The group's id.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "VPN"
        ]
      }
    },
    "/vpn/users": {
      "get": {
        "summary": "List VPN Users",
        "description": "Your VPN users, by name. Removed users are not listed.\n",
        "operationId": "get_vpn_users",
        "security": [
          {
            "OAuth2": [
              "vpn:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "group",
            "in": "query",
            "required": false,
            "description": "Only this group's users, by the group's id. A group not on your account is `422`.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "endUser",
            "in": "query",
            "required": false,
            "description": "Only this end user's, by its number. An unknown number is `422`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "total",
                    "page",
                    "perPage",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/VpnUser"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "VPN"
        ]
      },
      "post": {
        "summary": "Order VPN Users",
        "description": "Order up to 50 users in one of your groups, optionally for one of your\nend users, as the portal's order form. Each is billed monthly from\nissue at your seat price, shown in the answer. An account that may not\norder is `403` with the reason: one your account manager has not\nenabled for VPN, or one at its credit limit. A staff hold on the end\nuser is `409`. While you bill your end users, seats for an end user you\nbill need a retail price for VPN users (a price, or a markup): until\nthen it is `422` on `endUser`, saying what to set.\n\nThe users are issued in the background, so the answer is `202`: they\nare on GET /vpn/users as `provisioning` shortly after, and each\nprofile is ready to download a minute or so later (`profileReady`).\n",
        "operationId": "post_vpn_users",
        "security": [
          {
            "OAuth2": [
              "vpn:create"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "groupId",
                  "names"
                ],
                "properties": {
                  "groupId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The group the users join."
                  },
                  "names": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 50,
                    "description": "Each user's name, one user per name.",
                    "items": {
                      "type": "string",
                      "maxLength": 120,
                      "example": "Jane Citizen"
                    }
                  },
                  "endUser": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The end user the seats are for, by its number. They then appear on that end user's own portal, where it downloads and resets its profiles."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The users are ordered.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "status",
                        "group",
                        "endUser",
                        "endUserName",
                        "users",
                        "seatPriceExGst",
                        "seatPriceGst",
                        "seatPriceIncGst",
                        "monthlyPriceExGst",
                        "monthlyPriceGst",
                        "monthlyPriceIncGst",
                        "currency",
                        "message"
                      ],
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending"
                          ]
                        },
                        "group": {
                          "type": "object",
                          "required": [
                            "id",
                            "name"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "name": {
                              "type": "string"
                            }
                          }
                        },
                        "endUser": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The end user's number; null when none."
                        },
                        "endUserName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "users": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "displayName",
                              "state"
                            ],
                            "properties": {
                              "displayName": {
                                "type": "string"
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "pending"
                                ]
                              }
                            }
                          }
                        },
                        "seatPriceExGst": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Each user's monthly price, ex GST. Null when no price is set for your account.",
                          "example": "10.00"
                        },
                        "seatPriceGst": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "seatPriceIncGst": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "monthlyPriceExGst": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "What this order adds to your monthly bill, ex GST.",
                          "example": "20.00"
                        },
                        "monthlyPriceGst": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "monthlyPriceIncGst": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "currency": {
                          "type": "string",
                          "example": "AUD"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          }
        },
        "tags": [
          "VPN"
        ]
      }
    },
    "/vpn/users/{id}": {
      "get": {
        "summary": "Get a VPN User",
        "operationId": "get_vpn_user",
        "security": [
          {
            "OAuth2": [
              "vpn:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The user's id.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/VpnUser"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "VPN"
        ]
      },
      "patch": {
        "summary": "Update a VPN User",
        "description": "Rename a user, move it to another of your groups, or give it to another\nend user (null for none); a field left out is kept. Its certificate,\naddress and profile stay the same, so nothing needs downloading again.\nA suspended user is `409`. So is a move to an end user you bill while\nnothing prices a VPN user for them (a retail price or a markup).\n",
        "operationId": "patch_vpn_user",
        "security": [
          {
            "OAuth2": [
              "vpn:update"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The user's id.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "displayName": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "groupId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "endUser": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The end user's number, or null for none."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/VpnUser"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "VPN"
        ]
      },
      "delete": {
        "summary": "Remove a VPN User",
        "description": "Revoke the user's certificate and stop its monthly charge, as the\nportal's Remove. This cannot be undone: order a new user to replace it.\n",
        "operationId": "delete_vpn_user",
        "security": [
          {
            "OAuth2": [
              "vpn:delete"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The user's id.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Removed"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "VPN"
        ]
      }
    },
    "/vpn/users/{id}/profile": {
      "get": {
        "summary": "Get a VPN User's Profile",
        "description": "A link to download the user's OpenVPN profile (`.ovpn`), working for 5\nminutes. The profile holds the user's private key, so it needs its own\nscope, `vpn:credentials`, and each link given is recorded. `409`\nwhile the profile is still being made (`profileReady` is false), or\nwhile the user is suspended.\n",
        "operationId": "get_vpn_user_profile",
        "security": [
          {
            "OAuth2": [
              "vpn:credentials"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The user's id.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "id",
                        "url",
                        "expiresAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "description": "The user's id."
                        },
                        "url": {
                          "type": "string",
                          "description": "Download the profile from here."
                        },
                        "expiresAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "When the link stops working."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "VPN"
        ]
      }
    },
    "/account/usage": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get Usage This Month",
        "operationId": "get_account_usage",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nWhat your usage has added to your bill with us for one month so far:\ncall charges, data and numbers, grouped as the bill groups them, with\neach group's items, plus the month's usage in real units. These are the\nfigures the Usage page in the Wholesale Portal shows, worked out the way\nthe bill run will charge them; the bill itself is on\n[List Invoices](#tag/Account/operation/list_invoices) once issued.\n\nMonths run on your bill's calendar: your account's time zone, the zone\nyour invoices are cut in (set in the Wholesale Portal's Company\nSettings; Brisbane until you set another). A month already billed stays on the zone its invoice was cut\nin. You can ask for this month or any of the eleven before it;\n`daysRemaining` is how many days of the month are left after today,\n`0` for a past month.\n\nAmounts are dollars as decimal strings: each comes without GST, its\nGST, and with GST (`...ExGst`, `...Gst`, `...IncGst`).\n\nThe units count every answered call, inbound and free ones included,\nwhich the charges leave out.\n\nSet `format=csv` for the Usage page's charges CSV: one row per item, then\neach group's subtotal.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/UsageMonth"
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "Omit for JSON; `csv` downloads the charges as CSV.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The month's usage.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "month",
                        "periodStart",
                        "periodEnd",
                        "daysTotal",
                        "daysRemaining",
                        "currency",
                        "groups",
                        "totalExGst",
                        "totalGst",
                        "totalIncGst",
                        "units"
                      ],
                      "properties": {
                        "month": {
                          "type": "string",
                          "description": "The month, as `YYYY-MM`.",
                          "example": "2026-11"
                        },
                        "periodStart": {
                          "type": "string",
                          "format": "date",
                          "example": "2026-11-01"
                        },
                        "periodEnd": {
                          "type": "string",
                          "format": "date",
                          "example": "2026-11-30"
                        },
                        "daysTotal": {
                          "type": "integer",
                          "example": 30
                        },
                        "daysRemaining": {
                          "type": "integer",
                          "description": "Days of the month left after today; `0` for a past month.",
                          "example": 9
                        },
                        "currency": {
                          "type": "string",
                          "example": "AUD"
                        },
                        "groups": {
                          "type": "array",
                          "description": "The charges, by the group the bill puts them in. Groups with nothing in them are left out.",
                          "items": {
                            "type": "object",
                            "required": [
                              "group",
                              "label",
                              "subtotalExGst",
                              "subtotalGst",
                              "subtotalIncGst",
                              "items"
                            ],
                            "properties": {
                              "group": {
                                "type": "string",
                                "enum": [
                                  "voice",
                                  "data",
                                  "platform",
                                  "other"
                                ]
                              },
                              "label": {
                                "type": "string",
                                "example": "Voice"
                              },
                              "subtotalExGst": {
                                "type": "string",
                                "example": "120.50"
                              },
                              "subtotalGst": {
                                "type": "string",
                                "example": "12.05"
                              },
                              "subtotalIncGst": {
                                "type": "string",
                                "example": "132.55"
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "required": [
                                    "description",
                                    "quantity",
                                    "amountExGst",
                                    "amountGst",
                                    "amountIncGst"
                                  ],
                                  "properties": {
                                    "description": {
                                      "type": "string",
                                      "example": "Calls to Australian mobiles"
                                    },
                                    "quantity": {
                                      "type": "number",
                                      "example": 1
                                    },
                                    "amountExGst": {
                                      "type": "string",
                                      "example": "40.20"
                                    },
                                    "amountGst": {
                                      "type": "string",
                                      "example": "4.02"
                                    },
                                    "amountIncGst": {
                                      "type": "string",
                                      "example": "44.22"
                                    }
                                  }
                                }
                              }
                            }
                          }
                        },
                        "totalExGst": {
                          "type": "string",
                          "example": "250.00"
                        },
                        "totalGst": {
                          "type": "string",
                          "example": "25.00"
                        },
                        "totalIncGst": {
                          "type": "string",
                          "example": "275.00"
                        },
                        "units": {
                          "type": "object",
                          "required": [
                            "voiceMinutes",
                            "voiceCalls",
                            "dataDownBytes",
                            "dataUpBytes",
                            "smsMessages"
                          ],
                          "properties": {
                            "voiceMinutes": {
                              "type": "integer"
                            },
                            "voiceCalls": {
                              "type": "integer"
                            },
                            "dataDownBytes": {
                              "type": "integer",
                              "description": "Bytes sent to your services."
                            },
                            "dataUpBytes": {
                              "type": "integer",
                              "description": "Bytes sent from your services."
                            },
                            "smsMessages": {
                              "type": "integer",
                              "description": "SMS messages sent, counting each part of a long message."
                            }
                          }
                        }
                      }
                    }
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string",
                  "description": "Present only when `format=csv`. Columns `group`, `item`, `quantity`, `excl_gst`, `gst` and `incl_gst`.\n"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/usage/by-end-user": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get Usage by End User",
        "operationId": "get_account_usage_by_end_user",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nOne month's usage for each of your end users, in real units, with what\nit has added to your bill with us so far. Every end user is listed,\nalphabetically, including those with no usage; your own services, not\nresold to an end user, come last with `endUser: null` when they have any.\nThese are the Usage page's \"Usage by End User\" figures.\n\nSet `format=csv` for the Usage page's CSV of the same table (units only).\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/UsageMonth"
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "Omit for JSON; `csv` downloads the table as CSV.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "Usage per end user.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "month",
                    "periodStart",
                    "periodEnd",
                    "daysTotal",
                    "daysRemaining",
                    "currency",
                    "results"
                  ],
                  "properties": {
                    "month": {
                      "type": "string",
                      "example": "2026-11"
                    },
                    "periodStart": {
                      "type": "string",
                      "format": "date"
                    },
                    "periodEnd": {
                      "type": "string",
                      "format": "date"
                    },
                    "daysTotal": {
                      "type": "integer"
                    },
                    "daysRemaining": {
                      "type": "integer"
                    },
                    "currency": {
                      "type": "string",
                      "example": "AUD"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "endUser",
                          "name",
                          "voiceMinutes",
                          "voiceCalls",
                          "dataDownBytes",
                          "dataUpBytes",
                          "smsMessages",
                          "chargesExGst",
                          "chargesGst",
                          "chargesIncGst"
                        ],
                        "properties": {
                          "endUser": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The end user's number, as `/end-users` names it; `null` for your own services.",
                            "example": "SA-000123"
                          },
                          "name": {
                            "type": "string"
                          },
                          "voiceMinutes": {
                            "type": "integer"
                          },
                          "voiceCalls": {
                            "type": "integer"
                          },
                          "dataDownBytes": {
                            "type": "integer"
                          },
                          "dataUpBytes": {
                            "type": "integer"
                          },
                          "smsMessages": {
                            "type": "integer"
                          },
                          "chargesExGst": {
                            "type": "string",
                            "description": "What this usage has added to your bill so far, without GST.",
                            "example": "18.40"
                          },
                          "chargesGst": {
                            "type": "string",
                            "example": "1.84"
                          },
                          "chargesIncGst": {
                            "type": "string",
                            "example": "20.24"
                          }
                        }
                      }
                    }
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string",
                  "description": "Present only when `format=csv`. Columns `end_user`, `voice_minutes`, `voice_calls`, `data_down_bytes`, `data_up_bytes` and `sms_messages`.\n"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/usage/daily-data": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get Daily Data Usage",
        "operationId": "get_account_usage_daily_data",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nThe data your services moved each day of one month, the curve behind the\nUsage page's bar chart. Only days with usage are listed, oldest first.\nEach day is a day on your bill's calendar, as `GET /account/usage`\ndescribes it.\n\nSet `format=csv` for the Usage page's CSV of the same days.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/UsageMonth"
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "Omit for JSON; `csv` downloads the days as CSV.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "Data usage per day.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "month",
                    "periodStart",
                    "periodEnd",
                    "daysTotal",
                    "daysRemaining",
                    "results"
                  ],
                  "properties": {
                    "month": {
                      "type": "string",
                      "example": "2026-11"
                    },
                    "periodStart": {
                      "type": "string",
                      "format": "date"
                    },
                    "periodEnd": {
                      "type": "string",
                      "format": "date"
                    },
                    "daysTotal": {
                      "type": "integer"
                    },
                    "daysRemaining": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "date",
                          "downBytes",
                          "upBytes",
                          "totalBytes"
                        ],
                        "properties": {
                          "date": {
                            "type": "string",
                            "format": "date"
                          },
                          "downBytes": {
                            "type": "integer",
                            "description": "Bytes sent to your services."
                          },
                          "upBytes": {
                            "type": "integer",
                            "description": "Bytes sent from your services."
                          },
                          "totalBytes": {
                            "type": "integer"
                          }
                        }
                      }
                    }
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string",
                  "description": "Present only when `format=csv`. Columns `date`, `down_bytes`, `up_bytes` and `total_bytes`.\n"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/reports": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "List Reports",
        "operationId": "list_account_reports",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nThe business reports you can run, the ones on the Reports page of the\nWholesale Portal. Run one with\n[Get Report](#tag/Account/operation/get_account_report). A report that\n`takesPeriod` is worked out over a date window; the others are as at now.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The reports offered.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "results"
                  ],
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "key",
                          "label",
                          "takesPeriod"
                        ],
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "The report's key, for Get Report.",
                            "example": "mrr"
                          },
                          "label": {
                            "type": "string",
                            "example": "Recurring Revenue (MRR)"
                          },
                          "takesPeriod": {
                            "type": "boolean",
                            "description": "Whether the report reads `from` and `to`."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/reports/{key}": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get Report",
        "operationId": "get_account_report",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nRuns one business report for your account, the same document the\nReports page downloads, as JSON, CSV or PDF. A key not on\n[List Reports](#tag/Account/operation/list_account_reports) returns\n`404`.\n\nIn JSON the report is a table: `columns` are its headings and each of\n`rows` is one row of cells, already formatted as the download shows them\n(dollars as decimal strings such as `\"1234.50\"`). `moneyColumns` lists\nthe indexes of the dollar columns. `kpis` are the headline figures, and\n`sections` any small tables shown ahead of the main one.\n\n`from` and `to` are read only by a report that `takesPeriod`; without\nthem it runs from the first of this month to today. They are calendar\ndates on your account's time zone (Brisbane until you set one), whatever\n`CN-Time-Zone` says: a day runs from midnight to midnight there, so the\nend-user bill run at 04:00 on the 1st is in that month. `from` and `to`\ncome back as the dates asked for.\n\n`asAt` is read only by `aged_receivables`: the report is as at the end\nof that day in your account's timezone, leaving out invoices, payments\nand credits dated after it. Without it the report is as at now.\n\n`estimateRows` lists the indexes into `rows` of the rows that are an\nestimate rather than invoiced figures: the margin report's \"Usage so far\n(not yet billed)\" rows and its \"Total with usage so far\", which adds them.\nEmpty when no row is an estimate.\n",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "description": "The report's key, from List Reports.",
            "schema": {
              "type": "string",
              "example": "usage"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "The first day of the window, `YYYY-MM-DD`.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "The last day of the window, `YYYY-MM-DD`, included.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "asAt",
            "in": "query",
            "required": false,
            "description": "For `aged_receivables` only, the day the report is as at, `YYYY-MM-DD`; omit for now.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "Omit for JSON; `csv` or `pdf` downloads the report.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv",
                "pdf"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The report.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "key",
                        "label",
                        "title",
                        "subtitle",
                        "from",
                        "to",
                        "asAt",
                        "currency",
                        "kpis",
                        "sections",
                        "columns",
                        "moneyColumns",
                        "rows",
                        "estimateRows"
                      ],
                      "properties": {
                        "key": {
                          "type": "string",
                          "example": "usage"
                        },
                        "label": {
                          "type": "string",
                          "example": "Usage Summary"
                        },
                        "title": {
                          "type": "string"
                        },
                        "subtitle": {
                          "type": "string",
                          "description": "The period or as-at date the report covers."
                        },
                        "from": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date",
                          "description": "The window's first day; `null` for a report that is as at now."
                        },
                        "to": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date"
                        },
                        "asAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date",
                          "description": "The day `aged_receivables` is as at; `null` for every other report."
                        },
                        "currency": {
                          "type": "string",
                          "example": "AUD"
                        },
                        "kpis": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "label",
                              "value"
                            ],
                            "properties": {
                              "label": {
                                "type": "string",
                                "example": "Total Usage"
                              },
                              "value": {
                                "type": "string",
                                "example": "$1,234.50"
                              }
                            }
                          }
                        },
                        "sections": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "title",
                              "columns",
                              "rows"
                            ],
                            "properties": {
                              "title": {
                                "type": "string"
                              },
                              "columns": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "rows": {
                                "type": "array",
                                "items": {
                                  "type": "array",
                                  "items": {
                                    "type": [
                                      "string",
                                      "number",
                                      "null"
                                    ]
                                  }
                                }
                              }
                            }
                          }
                        },
                        "columns": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "moneyColumns": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          }
                        },
                        "rows": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "items": {
                              "type": [
                                "string",
                                "number",
                                "null"
                              ]
                            }
                          }
                        },
                        "estimateRows": {
                          "type": "array",
                          "description": "Indexes into `rows` of the rows that are an estimate, not invoiced figures.",
                          "items": {
                            "type": "integer"
                          }
                        }
                      }
                    }
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string",
                  "description": "Present only when `format=csv`. Any sections, then the main table."
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary",
                  "description": "Present only when `format=pdf`."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/usage-alerts": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "List Usage Alerts",
        "operationId": "list_usage_alerts",
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:read\n\nThe usage alerts on your account, the ones under Notifications in\nCompany Settings. A usage alert watches your call spend today or this\nmonth, your minutes this month or your SMS this month, on the whole\naccount or (for calls) one trunk. When it reaches its threshold we tell\nthe alert's own recipients, once for that day or month, and send a\n[Usage Alert Triggered](#tag/Webhook-Events-Usage/operation/webhook_usage_alert_triggered)\nevent. Alerts are checked every 15 minutes.\n\nUsage alerts are notices only: they never stop calls. Your credit limit\nis what stops calls.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "Your usage alerts, oldest first.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "results"
                  ],
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UsageAlert"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Create Usage Alert",
        "operationId": "create_usage_alert",
        "security": [
          {
            "OAuth2": [
              "billing:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:update\n\nAdds a usage alert, up to 25 on an account. `recipients` lists who the\nalert goes to (up to 10 addresses and 10 mobiles); only they are told.\nOne bad recipient refuses the whole request with `422`. Each channel in\n`channels` needs someone on it: `email` at least one address, `sms` at\nleast one mobile, or the request is `422`. Left out, `channels` is the\nones your `recipients` reach; an empty list sends only the webhook\nevent.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "metric",
                  "threshold"
                ],
                "properties": {
                  "metric": {
                    "$ref": "#/components/schemas/UsageAlertMetric"
                  },
                  "trunk": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "One of your SIP trunks, by its `sipUsername`, for a call metric only. Omit or `null` for the whole account."
                  },
                  "threshold": {
                    "type": [
                      "string",
                      "number"
                    ],
                    "description": "Dollars without GST for a spend metric (`\"50.00\"`), otherwise a whole number (`\"1000\"`). At least one cent or one unit. A JSON number is taken too (`1000`); a string keeps the cents exact.",
                    "example": "50.00"
                  },
                  "channels": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "email",
                        "sms"
                      ]
                    }
                  },
                  "recipients": {
                    "type": "array",
                    "maxItems": 20,
                    "items": {
                      "$ref": "#/components/schemas/UsageAlertRecipientInput"
                    }
                  },
                  "enabled": {
                    "type": "boolean",
                    "default": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The new usage alert.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/UsageAlert"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/usage-alerts/{alertId}": {
      "patch": {
        "tags": [
          "Account"
        ],
        "summary": "Modify Usage Alert",
        "operationId": "update_usage_alert",
        "security": [
          {
            "OAuth2": [
              "billing:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:update\n\nChanges a usage alert. Send only the fields you change; `trunk: null`\nmoves it back to the whole account. A new `metric` in another unit\n(spend to minutes or SMS, or back) needs a new `threshold` in that unit,\nor the request is `422` and the alert is left as it was; between the two\nspend metrics, or the two counts, the threshold is kept.\n`recipients`, when sent, replaces the alert's whole list (`[]` empties\nit); to add or remove one person, use the alert's `recipients` routes.\nA change to `channels` or `recipients` that leaves a channel with nobody\non it (`email` with no address, `sms` with no mobile) is `422`.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          },
          {
            "name": "alertId",
            "in": "path",
            "required": true,
            "description": "The alert's `id` (a uuid).",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "metric": {
                    "$ref": "#/components/schemas/UsageAlertMetric"
                  },
                  "trunk": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "threshold": {
                    "type": [
                      "string",
                      "number"
                    ],
                    "description": "As on create; a JSON number is taken too."
                  },
                  "channels": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "email",
                        "sms"
                      ]
                    }
                  },
                  "recipients": {
                    "type": "array",
                    "maxItems": 20,
                    "items": {
                      "$ref": "#/components/schemas/UsageAlertRecipientInput"
                    }
                  },
                  "enabled": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The usage alert as changed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/UsageAlert"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Account"
        ],
        "summary": "Remove Usage Alert",
        "operationId": "delete_usage_alert",
        "security": [
          {
            "OAuth2": [
              "billing:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:update\n\nRemoves a usage alert and its history.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          },
          {
            "name": "alertId",
            "in": "path",
            "required": true,
            "description": "The alert's `id` (a uuid).",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "x-summary": "No Content",
            "description": "Removed."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/usage-alerts/{alertId}/recipients": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Add Usage Alert Recipient",
        "operationId": "add_usage_alert_recipient",
        "security": [
          {
            "OAuth2": [
              "billing:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:update\n\nAdds one person to a usage alert: send `email` or `mobile`, not both. An\nalert takes up to 10 addresses and 10 mobiles. Someone already on the\nalert, or a mobile that is not an Australian mobile, answers `422`.\nAn alert that is not on your account answers `404`.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          },
          {
            "name": "alertId",
            "in": "path",
            "required": true,
            "description": "The alert's `id` (a uuid).",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UsageAlertRecipientInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The recipient.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/UsageAlertRecipient"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/usage-alerts/{alertId}/recipients/{recipientId}": {
      "delete": {
        "tags": [
          "Account"
        ],
        "summary": "Remove Usage Alert Recipient",
        "operationId": "remove_usage_alert_recipient",
        "security": [
          {
            "OAuth2": [
              "billing:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** billing:update\n\nStops sending one usage alert to one recipient. A recipient that is not\non this alert, or an alert that is not on your account, answers `404`.\nThe last address of an alert sent by email, or the last mobile of one\nsent by SMS, answers `422`: take that channel off the alert first.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          },
          {
            "name": "alertId",
            "in": "path",
            "required": true,
            "description": "The alert's `id` (a uuid).",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "recipientId",
            "in": "path",
            "required": true,
            "description": "The recipient's `id` (a uuid).",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "x-summary": "No Content",
            "description": "Removed."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/billing-details": {
      "patch": {
        "tags": [
          "Account"
        ],
        "summary": "Update Billing Details",
        "operationId": "patch_account_billing_details",
        "description": ">**Required Scope(s):** account:update\n\nChange the address printed on our invoices to you, your billing contact,\nor both, as the Company Details page does in the portal and with the same\nrules: a state is one of ACT, NSW, NT, QLD, SA, TAS, VIC or WA, a postcode\nis four digits, and an email is a valid address.\n\nOnly what you send changes. A field left out of `billingAddress` or\n`billingContact` keeps its value; a field sent as `null` clears it. A\nbilling contact with every field cleared is removed. Each change is\nrecorded in your account's audit log against this API key.\n\nYour legal name, ABN, ACN and trading name are changed through support,\nnot here: sending `entityDetails` is refused with 422.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "account:update"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "minProperties": 1,
                "properties": {
                  "billingAddress": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "address1": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 255
                      },
                      "address2": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 255
                      },
                      "address3": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 255
                      },
                      "locality": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 100
                      },
                      "state": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "ACT",
                          "NSW",
                          "NT",
                          "QLD",
                          "SA",
                          "TAS",
                          "VIC",
                          "WA",
                          null
                        ]
                      },
                      "postcode": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "pattern": "^\\d{4}$"
                      },
                      "country": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 100,
                        "description": "Left blank, an address is saved as in Australia."
                      }
                    }
                  },
                  "billingContact": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 255
                      },
                      "email": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "email",
                        "maxLength": 255
                      },
                      "phone": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 50
                      }
                    }
                  }
                }
              },
              "example": {
                "billingAddress": {
                  "address1": "Level 2, 10 Example Street",
                  "locality": "Brisbane",
                  "state": "QLD",
                  "postcode": "4000"
                },
                "billingContact": {
                  "email": "accounts@example.com.au"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Your billing details as they now stand.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "billingAddress",
                        "billingContact"
                      ],
                      "properties": {
                        "billingAddress": {
                          "$ref": "#/components/schemas/AccountBillingAddress"
                        },
                        "billingContact": {
                          "$ref": "#/components/schemas/AccountBillingContact"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/data/pois": {
      "get": {
        "tags": [
          "Data Utilisation"
        ],
        "summary": "List POIs With Your Services",
        "operationId": "get_data_pois",
        "description": ">**Required Scope(s):** data:read\n\nThe Points of Interconnect where your account has a live data service,\neach with how many of your services are live there, as the portal's\nUtilisation page lists them. Read a POI's utilisation with\n[Get POI Utilisation](#tag/Data-Utilisation/operation/get_data_poi_utilisation).\n",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "results"
                  ],
                  "properties": {
                    "results": {
                      "type": "array",
                      "description": "The POIs, by code.",
                      "items": {
                        "type": "object",
                        "required": [
                          "code",
                          "name",
                          "network",
                          "liveServices"
                        ],
                        "properties": {
                          "code": {
                            "type": "string",
                            "description": "The POI's code, as NBN names it (`4IPS`), or `OPC-<state>` for Opticomm.",
                            "example": "4IPS"
                          },
                          "name": {
                            "type": "string",
                            "example": "Ipswich"
                          },
                          "state": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "QLD"
                          },
                          "network": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "nbn",
                              "opticomm",
                              null
                            ]
                          },
                          "liveServices": {
                            "type": "integer",
                            "description": "How many of your data services are live at this POI."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/data/pois/{code}/utilisation": {
      "get": {
        "tags": [
          "Data Utilisation"
        ],
        "summary": "Get POI Utilisation",
        "operationId": "get_data_poi_utilisation",
        "description": ">**Required Scope(s):** data:read\n\nA POI's utilisation over a window, the series the portal's Utilisation\nchart draws: the NNI's traffic (every supplier link into the POI,\nsummed) and the POI's traffic on its outer tag on our BNG, in Mbps, with\nthe NNI's planned capacity. Both are the whole POI, every customer's\ntraffic, so you can see whether congestion is ours before you raise a\nfault.\n\nThe window is the last 24 hours unless you send `from` and `to`. It can\nreach back at most 30 days, and its points are as far apart as the\nportal's chart for that length: 5 minutes up to 24 hours, 30 minutes up\nto 7 days, 2 hours up to 30 days.\n\nA POI where your account has no live data service answers 404. When our\nmonitoring cannot be read the call answers 503; try again shortly.\n",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "description": "The POI's code, from [List POIs With Your Services](#tag/Data-Utilisation/operation/get_data_pois).",
            "schema": {
              "type": "string",
              "example": "4IPS"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "The window's start, ISO 8601. At most 30 days ago. Default 24 hours before `to`.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "The window's end, ISO 8601, not in the future. Default now.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "poi",
                        "from",
                        "to",
                        "stepSeconds",
                        "capacityMbps",
                        "points"
                      ],
                      "properties": {
                        "poi": {
                          "type": "string",
                          "description": "The POI's code."
                        },
                        "from": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "to": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "stepSeconds": {
                          "type": "integer",
                          "description": "The time between points.",
                          "example": 300
                        },
                        "capacityMbps": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "The NNI's planned capacity. Null when none is recorded."
                        },
                        "currentNniPercent": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "The NNI's busier direction at the latest point, as a percent of capacity. Null without a capacity or a latest point."
                        },
                        "currentBngPercent": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "The POI's BNG traffic, busier direction at the latest point, as a percent of capacity."
                        },
                        "points": {
                          "type": "array",
                          "description": "One point per step, oldest first. A value is null where nothing was recorded, never zero.",
                          "items": {
                            "type": "object",
                            "required": [
                              "time"
                            ],
                            "properties": {
                              "time": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "nniDownloadMbps": {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "description": "NNI traffic toward your end users."
                              },
                              "nniUploadMbps": {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "description": "NNI traffic from your end users."
                              },
                              "bngDownloadMbps": {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "description": "The POI's outer-tag traffic on the BNG, toward your end users."
                              },
                              "bngUploadMbps": {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "description": "The POI's outer-tag traffic on the BNG, from your end users."
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/audit-log": {
      "get": {
        "summary": "List the Audit Log",
        "description": "Your account's audit trail, newest first: what your portal users did,\nwhat your API keys did (named by the key), what each OAuth app you\nconnected did on your account (as `apiKey`, named by the app, and on no\nother account's trail), and what our support staff did\non your behalf (as `Support`; the staff member is never named). The same\nentries as the portal's Audit Log page, for feeding a security log system.\n\nPaged by `page`, or by following `nextCursor` (pass it back as `cursor`\nuntil it is `null`) to read every entry exactly once while new ones are\nwritten. A cursor page carries `perPage`, `nextCursor` and `results`\nonly. `q` searches the action key and the IP address.\n",
        "operationId": "get_account_audit_log",
        "security": [
          {
            "OAuth2": [
              "account:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only entries at or after this time, an ISO 8601 date or date-time. A date alone means the start of that day.",
            "example": "2026-11-01"
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only entries at or before this time. A date alone includes that whole day. Not before `from`."
          },
          {
            "name": "action",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only these actions: one or several action keys, comma-separated (`user.login,user.password_changed`), at most 50."
          },
          {
            "name": "actor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only entries by this actor: a user's id (as `GET /account/users` names it), an API key's id, or `support` for our support staff. Anything else matches nothing."
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "$ref": "#/components/parameters/Q"
          },
          {
            "$ref": "#/components/parameters/CreatedFrom"
          },
          {
            "$ref": "#/components/parameters/CreatedTo"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/ApiVersion"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "perPage",
                    "nextCursor",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer",
                      "description": "Entries matching the query. Absent on a cursor page."
                    },
                    "page": {
                      "type": "integer",
                      "description": "The page returned. Absent on a cursor page."
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as `cursor` for the next page; `null` on the last page or a page that was not full."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AuditLogEntry"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Account"
        ]
      }
    },
    "/account/api-calls": {
      "get": {
        "summary": "List Recent API Calls",
        "description": "The calls your API keys made in the last 30 days, newest first, for\ndebugging an integration: which failed, how long each took, and which\naddresses used each key. The same list as the Recent API Calls panel on\nthe API Keys page. A call refused for its key (revoked, a missing scope,\nan address not on the key's allowlist) is listed too; a call with no\nvalid token belongs to no account and is not.\n\nEach entry is a summary only: never the request or response body, the\nquery string or a header. Paged by `page`, or by following `nextCursor`\n(pass it back as `cursor` until it is `null`); a cursor page carries\n`perPage`, `nextCursor` and `results` only.\n",
        "operationId": "get_account_api_calls",
        "security": [
          {
            "OAuth2": [
              "account:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only calls at or after this time, an ISO 8601 date or date-time. A date alone means the start of that day."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only calls at or before this time. A date alone includes that whole day. Not before `from`."
          },
          {
            "name": "key",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Only calls by this key, by its `client_id`."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only calls answered with these statuses: one or several, comma-separated, each a status (`404`) or a class (`4xx`, `5xx`). Anything else is `422`.",
            "example": "4xx,5xx"
          },
          {
            "name": "path",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only calls whose path starts with this, with or without the `/v2` prefix (`/tickets` matches `/v2/tickets/TKT-10234`)."
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "$ref": "#/components/parameters/CreatedFrom"
          },
          {
            "$ref": "#/components/parameters/CreatedTo"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/ApiVersion"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "perPage",
                    "nextCursor",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer",
                      "description": "Calls matching the query. Absent on a cursor page."
                    },
                    "page": {
                      "type": "integer",
                      "description": "The page returned. Absent on a cursor page."
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as `cursor` for the next page; `null` on the last page or a page that was not full."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ApiCall"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Account"
        ]
      }
    },
    "/events": {
      "get": {
        "summary": "List Events",
        "description": "Every webhook event of the last 30 days on your account that one of your\nendpoints subscribed to when it happened, oldest first, in the body a\ndelivery carries. An event no endpoint subscribed to, of any type, is not\nkept and never appears here; an endpoint that is turned off still\ncounts. Use it to catch up after your receiver was down.\n\nTo catch up, pass the `eventId` of the last event you handled as\n`after`, and follow `nextCursor` (pass it back as `cursor`) until it is\n`null`. Events then arrive in the order they happened. Each carries the\nsame `eventId` as its deliveries, so a handler that de-duplicates on\n`eventId` treats an event read here and one delivered as one. An event\nolder than 30 days is gone.\n",
        "operationId": "get_events",
        "security": [
          {
            "OAuth2": [
              "webhooks:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only these event types: one or several, comma-separated, each a type (`ticket.replied`) or a family (`ticket.*`). A type that does not exist is `422`.",
            "example": "ticket.*,invoice.issued"
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only events at or after this time, an ISO 8601 date or date-time. A date alone means the start of that day."
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Only events after this one, by its `eventId`. An `eventId` that is not your account's, or is older than 30 days, is `422`: start again with `since`."
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "$ref": "#/components/parameters/CreatedFrom"
          },
          {
            "$ref": "#/components/parameters/CreatedTo"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "perPage",
                    "nextCursor",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer",
                      "description": "Events matching the query. Absent on a cursor page."
                    },
                    "page": {
                      "type": "integer",
                      "description": "The page returned. Absent on a cursor page."
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as `cursor` for the next page; `null` on the last page or a page that was not full."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WebhookFeedEvent"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/events/{eventId}": {
      "parameters": [
        {
          "name": "eventId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "description": "The event's `eventId`, from `GET /events` or a delivery."
        }
      ],
      "get": {
        "summary": "Get an Event",
        "description": "One event of the last 30 days, in the body a delivery carries. An event that is not your account's, or is older than 30 days, is `404`.",
        "operationId": "get_event",
        "security": [
          {
            "OAuth2": [
              "webhooks:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/WebhookFeedEvent"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/events/{eventId}/deliveries": {
      "parameters": [
        {
          "name": "eventId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "description": "The event's `eventId`, from `GET /events` or a delivery."
        }
      ],
      "post": {
        "summary": "Send an Event to an Endpoint",
        "description": "Limit: 10 per minute for the account (webhook send), shared by test, redeliver, replay-dead and event re-send.\n\nSends one event of the last 30 days to one of your webhook endpoints, as\na new delivery. Use it for an event your receiver missed. Only an event\none of your endpoints subscribed to when it happened is kept, so only\nsuch an event can be sent; it may go to any of your endpoints, including\none registered since.\n\nThe delivery carries the event's **own `eventId`** and its original\n`occurredAt`, so a handler that de-duplicates on `eventId` sees the same\nevent, and the endpoint's next `sequence`. It is sent whether or not the\nendpoint subscribes to the event's type, and while the endpoint is\ndisabled, as a redelivery is.\n\nAn endpoint that is not your account's is `404`. It is refused with `409`\nwhile the endpoint holds 100 queued deliveries.\n",
        "operationId": "post_event_delivery",
        "security": [
          {
            "OAuth2": [
              "webhooks:update"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "webhookId"
                ],
                "properties": {
                  "webhookId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The endpoint's `id`, from `GET /webhooks`."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Queued",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/WebhookDelivery"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/ports/{reference}/delegations": {
      "parameters": [
        {
          "$ref": "#/components/parameters/PortReferencePath"
        }
      ],
      "get": {
        "tags": [
          "Delegated Steps"
        ],
        "summary": "List a Port's Delegated Steps",
        "operationId": "list_port_delegations",
        "security": [
          {
            "OAuth2": [
              "voice:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:read\n\nEvery time a step of this port was handed to a person by a link, newest\nfirst, with whether the link was used, cancelled or has expired.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          }
        ],
        "responses": {
          "200": {
            "x-summary": "Success",
            "description": "A page of the port's delegations.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "total",
                    "page",
                    "perPage",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/StepDelegation"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "tags": [
          "Delegated Steps"
        ],
        "summary": "Hand a Port's Step to a Person",
        "operationId": "create_port_delegation",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:update\n\nEmail a named person a one-use link to do one step of this port, when\nyou cannot do it yourself. `confirmPort`: the holder of the mobile number\nbeing ported enters the verification code texted to it, as\n`POST /ports/{reference}/confirm` does; only a mobile port-in waiting\nfor its code (`ppv_sent`). `confirmAuthority`: the holder of the\nfixed-line number reads the Porting Authority and confirms it with their\nname and position, which is the port's Porting Authority and covers the\nAgent Authority; only a port waiting for it (`awaiting_authority`, sent\nwith `authorityHolder` on `POST /ports`). Any other port is a `409`.\n\nThe link opens a page on your end-user portal, in your branding. The\nperson is emailed a code there first, then sees only the numbers being\nported and the step, and does it once. The link works for 7 days. When\nit is used you get `delegation.used`.\n\nRefused with `403` and the code `no_end_user_portal_access` when your\naccount has no end-user portal (turned off, or no domain).\n\nThe `Idempotency-Key` is required, so a retry after a timeout answers\nwith the first delegation and sends no second email.\n\nOne link is open per step at a time: while one is open (`sent` and not\nexpired), another for the same step is a `409`, to any address, and\nsends nothing. Resend it, or cancel it and hand the step over again.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "email",
                  "action"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "The person's name, used in the email.",
                    "example": "Sam Taylor"
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 255,
                    "description": "Where the link, and then the code, are sent.",
                    "example": "sam@example.com"
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "confirmPort",
                      "confirmAuthority"
                    ],
                    "description": "The one step the link allows."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The delegation; the link has been emailed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/StepDelegation"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/ports/{reference}/delegations/{delegationId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/PortReferencePath"
        },
        {
          "$ref": "#/components/parameters/DelegationIdPath"
        }
      ],
      "delete": {
        "tags": [
          "Delegated Steps"
        ],
        "summary": "Cancel a Port's Delegated Step",
        "operationId": "cancel_port_delegation",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:update\n\nStop the link working at once. A used link cannot be cancelled (`409`);\ncancelling one already cancelled answers `200` with it.\n",
        "responses": {
          "200": {
            "$ref": "#/components/responses/StepDelegationResult"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/ports/{reference}/delegations/{delegationId}/resend": {
      "parameters": [
        {
          "$ref": "#/components/parameters/PortReferencePath"
        },
        {
          "$ref": "#/components/parameters/DelegationIdPath"
        }
      ],
      "post": {
        "tags": [
          "Delegated Steps"
        ],
        "summary": "Resend a Port's Delegated Step",
        "operationId": "resend_port_delegation",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "voice:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** voice:update\n\nEmail the same person a new link, which works for 7 days from now. The\nold link stops working at once, and any code sent for it with it. An\nexpired link can be resent; a used or cancelled one cannot (`409`), nor\none whose step is no longer open (`409`). A resend within 5 minutes of\nthe last email, or a sixth in a day, is a `429` with `Retry-After`, and\nsends nothing.\n",
        "responses": {
          "200": {
            "$ref": "#/components/responses/StepDelegationResult"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/data/orders/{orderId}/delegations": {
      "parameters": [
        {
          "$ref": "#/components/parameters/DataOrderIdPath"
        }
      ],
      "get": {
        "tags": [
          "Delegated Steps"
        ],
        "summary": "List an Order's Delegated Steps",
        "operationId": "list_data_order_delegations",
        "security": [
          {
            "OAuth2": [
              "data:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** data:read\n\nEvery time a step of this order was handed to a person by a link, newest\nfirst, with whether the link was used, cancelled or has expired.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          }
        ],
        "responses": {
          "200": {
            "x-summary": "Success",
            "description": "A page of the order's delegations.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "total",
                    "page",
                    "perPage",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/StepDelegation"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "tags": [
          "Delegated Steps"
        ],
        "summary": "Hand an Order's Step to a Person",
        "operationId": "create_data_order_delegation",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** data:update\n\nEmail a named person a one-use link to do one step of this order, when\nyou cannot do it yourself. `pickAppointment`: someone at the site picks\nthe technician's install time from the carrier's free slots and gives\nthe name and phone number the technician should call. Offered on an\nNBN or Opticomm connect with no appointment yet, including an order\nwaiting for your appointment (`order.appointmentRequired`); any other\nis a `409`.\n\nThe link opens a page on your end-user portal, in your branding. The\nperson is emailed a code there first, then sees only the site's address\nand the free install times, and books one once. The appointment is put on the order as the\nportal's Appointment card puts it; an order waiting for its appointment\nis then sent to the carrier. The link works for 7 days. When it is used\nyou get `delegation.used`.\n\nRefused with `403` and the code `no_end_user_portal_access` when your\naccount has no end-user portal (turned off, or no domain).\n\nThe `Idempotency-Key` is required, so a retry after a timeout answers\nwith the first delegation and sends no second email.\n\nOne link is open per step at a time: while one is open (`sent` and not\nexpired), another for the same step is a `409`, to any address, and\nsends nothing. Resend it, or cancel it and hand the step over again.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "email",
                  "action"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "The person's name, used in the email.",
                    "example": "Sam Taylor"
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 255,
                    "description": "Where the link, and then the code, are sent.",
                    "example": "sam@example.com"
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "pickAppointment"
                    ],
                    "description": "The one step the link allows."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The delegation; the link has been emailed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/StepDelegation"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/data/orders/{orderId}/delegations/{delegationId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/DataOrderIdPath"
        },
        {
          "$ref": "#/components/parameters/DelegationIdPath"
        }
      ],
      "delete": {
        "tags": [
          "Delegated Steps"
        ],
        "summary": "Cancel an Order's Delegated Step",
        "operationId": "cancel_data_order_delegation",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** data:update\n\nStop the link working at once. A used link cannot be cancelled (`409`);\ncancelling one already cancelled answers `200` with it.\n",
        "responses": {
          "200": {
            "$ref": "#/components/responses/StepDelegationResult"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/data/orders/{orderId}/delegations/{delegationId}/resend": {
      "parameters": [
        {
          "$ref": "#/components/parameters/DataOrderIdPath"
        },
        {
          "$ref": "#/components/parameters/DelegationIdPath"
        }
      ],
      "post": {
        "tags": [
          "Delegated Steps"
        ],
        "summary": "Resend an Order's Delegated Step",
        "operationId": "resend_data_order_delegation",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "data:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** data:update\n\nEmail the same person a new link, which works for 7 days from now. The\nold link stops working at once, and any code sent for it with it. An\nexpired link can be resent; a used or cancelled one cannot (`409`), nor\none whose step is no longer open (`409`). A resend within 5 minutes of\nthe last email, or a sixth in a day, is a `429` with `Retry-After`, and\nsends nothing.\n",
        "responses": {
          "200": {
            "$ref": "#/components/responses/StepDelegationResult"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/account/api-keys/self": {
      "get": {
        "tags": [
          "Authentication"
        ],
        "summary": "Get This API Key",
        "operationId": "get_own_api_key",
        "security": [
          {
            "OAuth2": []
          }
        ],
        "description": ">**Required Scope(s):** none. Any token reads the key it was issued to.\n\nThe key the calling token belongs to: its name, scopes, IP allowlist,\nend date and, while a rotation's overlap runs, when the old secret stops\nworking. Never a secret, and never another key.\n\nA key belongs to your account, not to the user who made it: it keeps\nworking when that user leaves or changes role. Keys are created, rescoped\nand revoked by an Owner or Admin under API Keys in the portal.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The calling key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ApiKey"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/api-keys/self/rotate": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "summary": "Rotate This API Key's Secret",
        "operationId": "rotate_own_api_key",
        "security": [
          {
            "OAuth2": []
          }
        ],
        "description": ">**Required Scope(s):** none. Any token rotates the key it was issued to.\n\nGives the calling key a new secret, returned in this response only:\nstore it before anything else. Use it to roll a secret on a schedule\nwithout an outage.\n\n`rotationOverlapHours` (0 to 168, default 24) keeps the old secret\nworking for that long: both secrets mint tokens, and tokens from before\nthe rotation keep working, until `result.previousSecretExpiresAt`. A\ntoken the old secret mints in the overlap ends with it. With `0`, the\nold secret and every token minted with it stop at once, including the\ntoken that asked. Rotating again ends the earlier overlap: only the\nsecret just replaced still works.\n\nThe account's Owners are emailed each time a key rotates itself.\n\nAn `Idempotency-Key` is required: a retry with the same key returns the\nsame new secret instead of rotating again.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyRequired"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rotationOverlapHours": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 168,
                    "default": 24,
                    "description": "How long the old secret keeps working, in hours."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "Rotated",
            "description": "The key, and its new secret.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result",
                    "secret"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ApiKey"
                    },
                    "secret": {
                      "type": "string",
                      "description": "The new secret. Shown once."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/users/{userId}/two-factor-reset": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Reset A User's Two-Factor",
        "operationId": "reset_account_user_two_factor",
        "security": [
          {
            "OAuth2": [
              "account:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** account:update\n\nClears a staff user's second factor, for someone who has lost their\ndevice. They set it up again the next time they sign in; on an account\nthat requires two-factor, they cannot go further until they do.\n\nAn Owner's two-factor cannot be reset through the API (`403`,\n`owner_protected`): another\nOwner resets it in the portal. `reset` is `false` when the user had no\nsecond factor.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "description": "The user's `id`.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The user, after the reset.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result",
                    "reset"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/AccountUser"
                    },
                    "reset": {
                      "type": "boolean",
                      "description": "Whether there was a second factor to clear."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/users/{userId}/notification-preferences": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get A User's Notice Choices",
        "operationId": "get_account_user_notification_preferences",
        "security": [
          {
            "OAuth2": [
              "account:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** account:read\n\nFor each notice a staff user can receive, the channels it can use and\nthe one they chose (`none` when they turned it off). Read only: each\nuser sets their own under Notifications in the portal.\n",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "description": "The user's `id`.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The user's notice choices.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/NotificationPreferences"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/invites": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "List Open Invitations",
        "operationId": "list_account_invites",
        "security": [
          {
            "OAuth2": [
              "account:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** account:read\n\nThe staff invitations not yet accepted, newest first, expired ones\nincluded (`status: expired`) so you can resend them. `POST /account/users`\nsends one, and its `inviteId` is the `id` here. Partner invitations are under `/partners/invites`.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A page of open invitations.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "total",
                    "page",
                    "perPage",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AccountInvite"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/invites/{inviteId}": {
      "delete": {
        "tags": [
          "Users"
        ],
        "summary": "Withdraw An Invitation",
        "operationId": "delete_account_invite",
        "security": [
          {
            "OAuth2": [
              "account:delete"
            ]
          }
        ],
        "description": ">**Required Scope(s):** account:delete\n\nWithdraws an open staff invitation: its link stops working at once.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          },
          {
            "name": "inviteId",
            "in": "path",
            "required": true,
            "description": "The invitation's `id`.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "x-summary": "No Content",
            "description": "The invitation is withdrawn."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/invites/{inviteId}/resend": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Resend An Invitation",
        "operationId": "resend_account_invite",
        "security": [
          {
            "OAuth2": [
              "account:create"
            ]
          }
        ],
        "description": ">**Required Scope(s):** account:create\n\nEmails the invitation again with a fresh link, and starts its expiry\nagain. The old link stops working.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          },
          {
            "name": "inviteId",
            "in": "path",
            "required": true,
            "description": "The invitation's `id`.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The invitation, as resent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/AccountInvite"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/security": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get Security Settings",
        "operationId": "get_account_security",
        "security": [
          {
            "OAuth2": [
              "account:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** account:read\n\nWhether staff must use two-factor, and the addresses they may sign in to\nthe portal from: Company Settings > Security. Read only: an Owner or\nAdmin changes them in the portal. Each API key's own IP allowlist is on\n`GET /account/api-keys/self`.\n",
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The security settings.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/AccountSecurity"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/account/booked-changes": {
      "get": {
        "summary": "List Booked Changes",
        "description": ">**Required Scope(s):** `data:read` for disconnects, `voice:read` for plan changes; at least one\n\nEvery change booked on your account for a later date, in one list,\nsoonest first: a data service disconnect booked for a later day, and a\ntrunk plan or channel change waiting for the start of the next billing\ncycle. Each can be cancelled with `DELETE /account/booked-changes/{id}`\nbefore its date. A change that has taken effect, been cancelled or failed\non its date is no longer listed; `bookedChange.applied`,\n`bookedChange.cancelled` and `bookedChange.failed` say when that happens.\n\nA key lists only the kinds it may read: without `voice:read` there are no\nplan changes, without `data:read` no disconnects. Asking for a `kind` the\nkey may not read is a `403`. The same change shows on the data service\nand the trunk reads, as their `bookedChange`.\n",
        "operationId": "get_account_booked_changes",
        "security": [
          {
            "OAuth2": []
          }
        ],
        "parameters": [
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "description": "One or both kinds, comma-separated. A value outside the set is `422`.",
            "schema": {
              "type": "string",
              "example": "planChange"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Order by this field, `-` in front for descending. An unknown field is `422`.",
            "schema": {
              "type": "string",
              "enum": [
                "effectiveOn",
                "-effectiveOn",
                "bookedAt",
                "-bookedAt"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Q"
          },
          {
            "$ref": "#/components/parameters/CreatedFrom"
          },
          {
            "$ref": "#/components/parameters/CreatedTo"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          }
        ],
        "responses": {
          "200": {
            "description": "Success. `createdFrom` and `createdTo` bound `bookedAt`; `q` searches `serviceId`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "total",
                    "page",
                    "perPage",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BookedChange"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Account"
        ]
      }
    },
    "/account/booked-changes/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "description": "The booked change's id, as `GET /account/booked-changes` returns it."
        }
      ],
      "delete": {
        "summary": "Cancel a Booked Change",
        "description": ">**Required Scope(s):** `data:delete` to cancel a disconnect, `voice:update` to cancel a plan change\n\nCancels a booked change before its date, so it does not apply: a\ndisconnect booked for a later day (the service stays live and billed),\nor a trunk plan change booked for the next billing cycle (the trunk keeps\nits current plan). It is the same cancel as the data service's and the\ntrunk's own (`DELETE /trunks/{username}/plan-change`), and sends\n`bookedChange.cancelled`, beside `trunk.planChangeCancelled` for a plan\nchange.\n\nA key without the cancelling kind's scope gets `403`. Another account's\nchange, and one already applied or cancelled, are `404`, as an unknown\nid is. A disconnect that can no longer be cancelled is `409` with the\nreason.\n",
        "operationId": "delete_account_booked_change",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "security": [
          {
            "OAuth2": []
          }
        ],
        "responses": {
          "204": {
            "description": "Cancelled."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Account"
        ]
      }
    },
    "/exports": {
      "get": {
        "summary": "List Exports",
        "description": ">**Required Scope(s):** the read scope of each type listed (`voice:read`, `sms:read`, `billing:read`, `data:read`); at least one\n\nThe account's background exports from the last 14 days, newest first,\nof the types the key may read: without `voice:read` no `cdrs` exports\nare listed, and so on. A ready one carries a fresh `downloadUrl`.\n",
        "operationId": "get_exports",
        "security": [
          {
            "OAuth2": []
          }
        ],
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "required": false,
            "description": "One or more states, comma-separated. A value outside the set is `422`.",
            "schema": {
              "type": "string",
              "example": "ready"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Order by this field, `-` in front for descending. An unknown field is `422`.",
            "schema": {
              "type": "string",
              "enum": [
                "createdAt",
                "-createdAt"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Q"
          },
          {
            "$ref": "#/components/parameters/CreatedFrom"
          },
          {
            "$ref": "#/components/parameters/CreatedTo"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          }
        ],
        "responses": {
          "200": {
            "description": "Success. `q` searches `type`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "total",
                    "page",
                    "perPage",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ApiExport"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Account"
        ]
      },
      "post": {
        "summary": "Start an Export",
        "description": ">**Required Scope(s):** the read scope of the type: `voice:read` for `cdrs`, `sms:read` for `sms`, `billing:read` for `invoiceLines`, `data:read` for `dataUsage`\n\nWrites a large export in the background instead of one long streamed\nresponse, and answers `202` with the export at once. Follow it with\n`GET /exports/{exportId}`, or wait for `export.ready` (or\n`export.failed`); a ready export carries a signed `downloadUrl`, good\nfor an hour, and its file is kept 7 days.\n\nThe rows are the streamed reads' own, so a file holds what `?format=` on\nthe list would have streamed for the same window and filters:\n\n- `cdrs`: `GET /voice/cdrs`. Filters `trunk`, `endUser`, `direction`,\n  `disposition`, `q`, `invoice`, `sort`.\n- `sms`: `GET /sms`. Filters `direction`, `status`, `q`, `sort`.\n- `invoiceLines`: each invoice issued in the window, one row per line as\n  `GET /account/invoices/{invoiceId}?format=csv` has it. No filters.\n- `dataUsage`: one row per data service per day, as\n  `GET /data/services/{ref}/usage` buckets it (`serviceId`, `date`,\n  `downloadBytes`, `uploadBytes`, `totalBytes`). Filter `serviceId`.\n  Each day is a day on your account's time zone, the zone your bills\n  are cut in. The export runs in the background, so `CN-Time-Zone`\n  sets how `from` and `to` are read, not the days.\n\n`from` is required and `to` defaults to now; the window is at most 93\ndays. A filter the type does not take, or a value the list would refuse,\nis `422`. At most 3 exports run at once on an account: a fourth, while\n3 are queued or running, is `409`.\n",
        "operationId": "create_export",
        "security": [
          {
            "OAuth2": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type",
                  "from"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "cdrs",
                      "sms",
                      "invoiceLines",
                      "dataUsage"
                    ]
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "csv",
                      "ndjson"
                    ],
                    "default": "csv"
                  },
                  "from": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The window's start.",
                    "example": "2026-01-01T00:00:00+10:00"
                  },
                  "to": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "The window's end. Now when absent.",
                    "example": "2026-01-31T23:59:59+10:00"
                  },
                  "filters": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "description": "The list's own filters, by its query parameter names.",
                    "additionalProperties": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "example": {
                      "trunk": "trunk123456"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted. The export is queued; `Location` names its read.",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ApiExport"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Account"
        ]
      }
    },
    "/exports/{exportId}": {
      "parameters": [
        {
          "name": "exportId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "description": "The export's id, as `POST /exports` returned it."
        }
      ],
      "get": {
        "summary": "Get an Export",
        "description": ">**Required Scope(s):** the read scope of the export's type (`voice:read`, `sms:read`, `billing:read` or `data:read`)\n\nThe export's state, row count and size. While it is `ready` and its file\nis kept (7 days), `downloadUrl` is a signed link to the file, good for\none hour; each read gives a new one, so read the export again when a\nlink has expired. Another account's export is `404`, as an unknown id\nis; a key without the type's read scope gets `403`.\n",
        "operationId": "get_export",
        "security": [
          {
            "OAuth2": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/ApiExport"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "tags": [
          "Account"
        ]
      }
    },
    "/exports/{exportId}/download": {
      "parameters": [
        {
          "name": "exportId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "description": "The export's id."
        }
      ],
      "get": {
        "summary": "Download an Export",
        "description": "The file of a ready export, through the signed `downloadUrl` that\n`GET /exports/{exportId}` hands out. It needs no token: the signature is\nthe authority, and it lasts one hour. An expired or altered link is\n`403`; read the export again for a new one. A file past its 7 days is\n`410`.\n",
        "operationId": "get_export_download",
        "security": [],
        "parameters": [
          {
            "name": "expires",
            "in": "query",
            "required": true,
            "description": "When the link stops working, as a Unix time. Part of the signed link.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "description": "The link's signature.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The file.",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "410": {
            "description": "The export's file has been removed after its 7 days.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "tags": [
          "Account"
        ]
      }
    },
    "/partners": {
      "get": {
        "tags": [
          "Partners"
        ],
        "summary": "List Partners",
        "operationId": "list_partners",
        "security": [
          {
            "OAuth2": [
              "account:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** account:read\n\nYour partners, by name, with the end users, products and permissions\neach may reach: Company Settings > Partners.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A page of partners.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "total",
                    "page",
                    "perPage",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Partner"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/partners/invites": {
      "get": {
        "tags": [
          "Partners"
        ],
        "summary": "List Partner Invitations",
        "operationId": "list_partner_invites",
        "security": [
          {
            "OAuth2": [
              "account:read"
            ]
          }
        ],
        "description": ">**Required Scope(s):** account:read\n\nThe partner invitations not yet accepted, newest first.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          }
        ],
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "A page of partner invitations.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "total",
                    "page",
                    "perPage",
                    "results"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "perPage": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PartnerInvite"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Partners"
        ],
        "summary": "Invite A Partner",
        "operationId": "create_partner_invite",
        "security": [
          {
            "OAuth2": [
              "account:create"
            ]
          }
        ],
        "description": ">**Required Scope(s):** account:create\n\nEmails an invitation to a partner login. On accepting, the partner sees\nonly the end users and products named here; give it permissions after\nwith `PUT /partners/{partnerId}/scope`.\n\n`endUsers` are end-user numbers on your account; `products` are product\nids on your retail price book. An unknown one is `422`. An email that\nalready has a login on your account, or an open invitation, is `422`.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 160
                  },
                  "endUsers": {
                    "type": "array",
                    "maxItems": 5000,
                    "items": {
                      "type": "string"
                    }
                  },
                  "products": {
                    "type": "array",
                    "maxItems": 1000,
                    "items": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "x-summary": "Created",
            "description": "The invitation, sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/PartnerInvite"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/partners/invites/{inviteId}": {
      "delete": {
        "tags": [
          "Partners"
        ],
        "summary": "Withdraw A Partner Invitation",
        "operationId": "delete_partner_invite",
        "security": [
          {
            "OAuth2": [
              "account:delete"
            ]
          }
        ],
        "description": ">**Required Scope(s):** account:delete\n\nWithdraws an open partner invitation: its link stops working at once.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          },
          {
            "name": "inviteId",
            "in": "path",
            "required": true,
            "description": "The invitation's `id`.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "x-summary": "No Content",
            "description": "The invitation is withdrawn."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/partners/{partnerId}": {
      "delete": {
        "tags": [
          "Partners"
        ],
        "summary": "Remove A Partner",
        "operationId": "delete_partner",
        "security": [
          {
            "OAuth2": [
              "account:delete"
            ]
          }
        ],
        "description": ">**Required Scope(s):** account:delete\n\nRemoves a partner: their login stops at once and they no longer see any\nof your end users. Commission already earned is kept.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          },
          {
            "name": "partnerId",
            "in": "path",
            "required": true,
            "description": "The partner's `id`.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "x-summary": "No Content",
            "description": "The partner is removed."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/partners/{partnerId}/scope": {
      "put": {
        "tags": [
          "Partners"
        ],
        "summary": "Set A Partner's Scope",
        "operationId": "update_partner_scope",
        "security": [
          {
            "OAuth2": [
              "account:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** account:update\n\nReplaces what a partner may reach. `endUsers` and `products` are both\nrequired and replace the whole list (`[]` empties it). `permissions`,\nwhen sent, replaces the partner's permissions; left out, they stay as\nthey are.\n\n`endUsers` are end-user numbers on your account; `products` are product\nids on your retail price book. An unknown one is `422`.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          },
          {
            "name": "partnerId",
            "in": "path",
            "required": true,
            "description": "The partner's `id`.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "endUsers",
                  "products"
                ],
                "properties": {
                  "endUsers": {
                    "type": "array",
                    "maxItems": 5000,
                    "items": {
                      "type": "string"
                    }
                  },
                  "products": {
                    "type": "array",
                    "maxItems": 1000,
                    "items": {
                      "type": "integer"
                    }
                  },
                  "permissions": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "view_invoices",
                        "manage_pricing",
                        "manage_credit",
                        "decide_hardship",
                        "edit_safety",
                        "manage_representatives",
                        "manage_logins",
                        "listen_recordings",
                        "view_commission_estimate"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "x-summary": "OK",
            "description": "The partner, as changed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "$ref": "#/components/schemas/Partner"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/sandbox/reset": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Reset The Sandbox",
        "operationId": "reset_sandbox",
        "security": [
          {
            "OAuth2": [
              "account:update"
            ]
          }
        ],
        "description": ">**Required Scope(s):** account:update\n\n**Sandbox only** (`https://api.checknetworks.dev`): production answers\n`404`.\n\nWipes your sandbox account's orders, services, bills and callbacks and\nstarts its test addresses again, so a test run starts clean. Its users,\nAPI keys and addresses are kept.\n\nA sandbox can be reset 3 times in any 24 hours, from here and from API\nKeys in the production portal together. Past that the reset is refused\nwith `429` and `Retry-After`, the seconds until the next is allowed.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          }
        ],
        "responses": {
          "200": {
            "x-summary": "Reset",
            "description": "The sandbox is reset.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "required": [
                        "resetAt",
                        "resetsPerDay"
                      ],
                      "properties": {
                        "resetAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "resetsPerDay": {
                          "type": "integer",
                          "description": "How many resets are allowed in any 24 hours.",
                          "example": 3
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    }
  },
  "webhooks": {
    "ping": {
      "post": {
        "tags": [
          "Webhook Delivery"
        ],
        "operationId": "webhook_ping",
        "summary": "Ping (Test Delivery)",
        "description": "Sent when you call `POST /webhooks/{webhookId}/test` with no `eventType`, so you can check your endpoint receives and verifies deliveries. With an `eventType`, the test sends a sample of that event instead, in its own shape, with `test: true`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "eventId",
                  "eventType",
                  "occurredAt",
                  "sequence",
                  "data"
                ],
                "properties": {
                  "eventId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Unique per emitted event — use it to deduplicate."
                  },
                  "eventType": {
                    "type": "string",
                    "example": "ping"
                  },
                  "occurredAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "sequence": {
                    "$ref": "#/components/schemas/sequence"
                  },
                  "apiVersion": {
                    "$ref": "#/components/schemas/apiVersion"
                  },
                  "livemode": {
                    "$ref": "#/components/schemas/livemode"
                  },
                  "test": {
                    "$ref": "#/components/schemas/test"
                  },
                  "accountId": {
                    "$ref": "#/components/schemas/accountId"
                  },
                  "resourceUrl": {
                    "$ref": "#/components/schemas/resourceUrl"
                  },
                  "data": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "ticketCreated": {
      "post": {
        "tags": [
          "Webhook Events Tickets"
        ],
        "operationId": "webhook_ticket_created",
        "summary": "Ticket Created",
        "description": "Sent when a support ticket is raised on your account, from the portal, by our staff or through this API.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookTicketEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "ticketReplied": {
      "post": {
        "tags": [
          "Webhook Events Tickets"
        ],
        "operationId": "webhook_ticket_replied",
        "summary": "Ticket Replied",
        "description": "Sent when a public message is added to one of your tickets. `data.author` tells you who wrote it (`support`, `customer` or `api`). Internal Check Networks notes never emit this event.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookTicketEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "ticketStatusChanged": {
      "post": {
        "tags": [
          "Webhook Events Tickets"
        ],
        "operationId": "webhook_ticket_status_changed",
        "summary": "Ticket Status Changed",
        "description": "Sent when a ticket's status changes — including the automatic re-open when a reply lands on a resolved ticket. `data.from` / `data.to` carry the transition.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookTicketEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "ticketCsatSubmitted": {
      "post": {
        "tags": [
          "Webhook Events Tickets"
        ],
        "operationId": "webhook_ticket_csat_submitted",
        "summary": "Ticket Satisfaction Submitted",
        "description": "Sent when a satisfaction rating is submitted for one of your tickets. `data.rating` carries the 1–5 score.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookTicketEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "ticketInformationRequired": {
      "post": {
        "tags": [
          "Webhook Events Tickets"
        ],
        "operationId": "webhook_ticket_information_required",
        "summary": "Ticket Information Required",
        "description": "Sent when our staff send one of your tickets back to you because they need something before they can go on: the ticket is set to waiting on you (`pending`), and the reply they send with it, the ticket's latest message from support, says what. It comes with `ticket.statusChanged`. A ticket set to `pending` any other way sends only `ticket.statusChanged`. Reply to the ticket to send it back to us.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookTicketEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "voiceCallCompleted": {
      "post": {
        "tags": [
          "Webhook Events Voice"
        ],
        "operationId": "webhook_voice_call_completed",
        "summary": "Voice Call Completed",
        "description": "Sent when a call on one of your services completes and is rated.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookVoiceCallEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "voicemailReceived": {
      "post": {
        "tags": [
          "Webhook Events Voice"
        ],
        "operationId": "webhook_voice_voicemail_received",
        "summary": "Voicemail Received",
        "description": "Sent when a caller leaves a voicemail on one of your residential lines. It is sent for every new message, whether or not the mailbox also emails it.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookVoicemailEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "voiceRecordingReady": {
      "post": {
        "tags": [
          "Webhook Events Voice"
        ],
        "operationId": "webhook_voice_recording_ready",
        "summary": "Voice Recording Ready",
        "description": "Sent once when a call recording on one of your trunks is stored and ready to fetch with `GET /voice/recordings/{id}` (a key with the `recordings:read` scope). The event carries no audio and no link. Never sent for a call to a family violence support number.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookVoiceRecordingEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "trunkDown": {
      "post": {
        "tags": [
          "Webhook Events Voice"
        ],
        "operationId": "webhook_trunk_down",
        "summary": "Trunk Down",
        "description": "Sent when one of your SIP trunks has neither registered nor sent an OPTIONS keepalive for 10 minutes, so calls to it are failing. Only an active trunk that has connected before sends this.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookTrunkEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "trunkUp": {
      "post": {
        "tags": [
          "Webhook Events Voice"
        ],
        "operationId": "webhook_trunk_up",
        "summary": "Trunk Back Up",
        "description": "Sent when a trunk that was down registers or sends OPTIONS again. It always follows a `trunk.down`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookTrunkEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "callerIdStatusChanged": {
      "post": {
        "tags": [
          "Webhook Events Voice"
        ],
        "operationId": "webhook_caller_id_status_changed",
        "summary": "Caller ID Authorisation Decided",
        "description": "Sent once when we approve or reject one of your caller ID authorisation requests (`POST /caller-id-authorisations`), however it was made. An approved number can be set as a trunk's default caller ID from then on; a rejection carries the reason. A request you cancel sends nothing.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCallerIdEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "voiceHoldPlaced": {
      "post": {
        "tags": [
          "Webhook Events Voice"
        ],
        "operationId": "webhook_voice_hold_placed",
        "summary": "Voice Hold Placed",
        "description": "Sent when a hold stops calls: your account's outbound calls paused for unusual spend or calling (`spendVelocity`, `callingPattern`), one trunk's international calls held at its international minutes cap (`internationalCap`), or one trunk's outbound calls stopped at the daily spend cap you set (`dailySpendCap`, until `releasesAt`). A hold never stops a 000 call, and inbound calls are not affected. Sent once per hold.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookVoiceHoldEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "voiceHoldReleased": {
      "post": {
        "tags": [
          "Webhook Events Voice"
        ],
        "operationId": "webhook_voice_hold_released",
        "summary": "Voice Hold Released",
        "description": "Sent when a hold lifts: released by us, released by you or by a raised cap (`dailySpendCap`), or at midnight Brisbane time (`dailySpendCap`). It always follows a `voice.hold.placed` for the same hold.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookVoiceHoldEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "numberAssigned": {
      "post": {
        "tags": [
          "Webhook Events Voice"
        ],
        "operationId": "webhook_number_assigned",
        "summary": "Number Assigned",
        "description": "Sent when one of your numbers is assigned to a trunk, from the portal, the API or by Check Networks.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookNumberEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "numberUnassigned": {
      "post": {
        "tags": [
          "Webhook Events Voice"
        ],
        "operationId": "webhook_number_unassigned",
        "summary": "Number Unassigned",
        "description": "Sent when one of your numbers comes off its trunk. The number is still yours; `serviceId` is the trunk it was on.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookNumberEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "numberReleased": {
      "post": {
        "tags": [
          "Webhook Events Voice"
        ],
        "operationId": "webhook_number_released",
        "summary": "Number Released",
        "description": "Sent when a release you asked for has run and the number is no longer yours (`GET` then answers `404`).\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookNumberEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "numberSuspended": {
      "post": {
        "tags": [
          "Webhook Events Voice"
        ],
        "operationId": "webhook_number_suspended",
        "summary": "Number Suspended",
        "description": "Sent when Check Networks suspends one of your numbers. While it is suspended it cannot be released; contact support to have it lifted.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookNumberEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "numberReactivated": {
      "post": {
        "tags": [
          "Webhook Events Voice"
        ],
        "operationId": "webhook_number_reactivated",
        "summary": "Number Reactivated",
        "description": "Sent when a suspended number is reactivated. It always follows a `number.suspended`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookNumberEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "ipndRecordRejected": {
      "post": {
        "tags": [
          "Webhook Events Voice"
        ],
        "operationId": "webhook_ipnd_record_rejected",
        "summary": "IPND Record Rejected",
        "description": "Sent once when the IPND refuses one of your numbers' records, or the file it was in, within a few minutes of Check Networks reading the IPND's answer. The IPND listing never affects calls, 000 included. Fix the emergency address when an error says so.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookIpndRecordRejectedEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "trunkPlanChangeScheduled": {
      "post": {
        "tags": [
          "Webhook Events Voice"
        ],
        "operationId": "webhook_trunk_plan_change_scheduled",
        "summary": "Trunk Plan Change Scheduled",
        "description": "Sent when a plan or channel change is booked on one of your trunks for the start of the next billing cycle, for example a downgrade made with `PATCH /trunks/{username}` or in the portal.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookTrunkPlanChangeEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "trunkPlanChangeCancelled": {
      "post": {
        "tags": [
          "Webhook Events Voice"
        ],
        "operationId": "webhook_trunk_plan_change_cancelled",
        "summary": "Trunk Plan Change Cancelled",
        "description": "Sent when a booked plan or channel change is cancelled, with `DELETE /trunks/{username}/plan-change` or in the portal. The trunk keeps its current plan.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookTrunkPlanChangeEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "trunkPlanChanged": {
      "post": {
        "tags": [
          "Webhook Events Voice"
        ],
        "operationId": "webhook_trunk_plan_changed",
        "summary": "Trunk Plan Changed",
        "description": "Sent when a plan or channel change takes effect on one of your trunks: a booked change on its effective date, or an upgrade at once. Use it to bill your end users for channels from the right day.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookTrunkPlanChangeEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "bookedChangeApplied": {
      "post": {
        "tags": [
          "Webhook Events Account"
        ],
        "operationId": "webhook_booked_change_applied",
        "summary": "Booked Change Applied",
        "description": "Sent when a change booked for a later date takes effect on its date: a trunk plan change on the 1st of the month, or a data disconnect booked for a later day, sent to the carrier that day (`service.disconnected` follows when the carrier confirms it). `data` is the entry `GET /account/booked-changes` listed.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookBookedChangeEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "bookedChangeCancelled": {
      "post": {
        "tags": [
          "Webhook Events Account"
        ],
        "operationId": "webhook_booked_change_cancelled",
        "summary": "Booked Change Cancelled",
        "description": "Sent when a booked change will no longer happen: cancelled with `DELETE /account/booked-changes/{id}`, on the service or trunk, or in the portal; a plan change replaced by a newer one; or a disconnect dropped on its day because the service can no longer be disconnected. `data` is the entry as it was listed.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookBookedChangeEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "bookedChangeFailed": {
      "post": {
        "tags": [
          "Webhook Events Account"
        ],
        "operationId": "webhook_booked_change_failed",
        "summary": "Booked Change Failed",
        "description": "Sent when a booked change reaches its date but cannot be made: the carrier refuses a booked data disconnect, or a trunk plan change cannot be applied (for example, the trunk was cancelled first). The change is no longer listed and nothing changed; book it again if you still want it. `data` is the entry `GET /account/booked-changes` listed, plus the `reason`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookBookedChangeFailedEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "bookedChangeRescheduled": {
      "post": {
        "tags": [
          "Webhook Events Account"
        ],
        "operationId": "webhook_booked_change_rescheduled",
        "summary": "Booked Change Rescheduled",
        "description": "Sent when Check Networks moves a data disconnect booked for a later day to another day, at your request or after its day came and it was held for us to check. It is the same booking, with the same `id`; nothing was cancelled. `data` is the entry `GET /account/booked-changes` now lists, with its new `effectiveOn`, plus `previousEffectiveOn`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookBookedChangeRescheduledEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "exportReady": {
      "post": {
        "tags": [
          "Webhook Events Account"
        ],
        "operationId": "webhook_export_ready",
        "summary": "Export Ready",
        "description": "Sent when a background export (`POST /exports`) has its file. `data` is the export without its link: read `GET /exports/{exportId}` (the `resourceUrl`) for a signed `downloadUrl`, good for an hour.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookExportEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "exportFailed": {
      "post": {
        "tags": [
          "Webhook Events Account"
        ],
        "operationId": "webhook_export_failed",
        "summary": "Export Failed",
        "description": "Sent when a background export could not be written. `failureReason` says what to do; start it again with `POST /exports`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookExportEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "invoiceIssued": {
      "post": {
        "tags": [
          "Webhook Events Account"
        ],
        "operationId": "webhook_invoice_issued",
        "summary": "Invoice Issued",
        "description": "Sent when Check Networks issues an invoice to your account. `data` carries the invoice summary. Invoices you raise to your own retail customers do not send this.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookInvoiceEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "invoicePaid": {
      "post": {
        "tags": [
          "Webhook Events Account"
        ],
        "operationId": "webhook_invoice_paid",
        "summary": "Invoice Paid",
        "description": "Sent when one of your invoices is settled in full. `occurredAt` is when it cleared. Fires once per invoice, when the last of its balance is covered.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookInvoiceEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "invoiceVoided": {
      "post": {
        "tags": [
          "Webhook Events Account"
        ],
        "operationId": "webhook_invoice_voided",
        "summary": "Invoice Voided",
        "description": "Sent when one of your invoices is cancelled and its charges unwound — the counterpart to `invoice.issued`. The invoice is no longer owed: clear it from your receivables rather than carrying it as an open debt that nothing will ever settle.\n\n`data.voidedAt` is when it was cancelled. A paid invoice is never voided — that is a refund or a credit note — so this only ever follows an `invoice.issued` you have already seen, and it fires once per invoice however many times a void is attempted.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookInvoiceEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "paymentReceived": {
      "post": {
        "tags": [
          "Webhook Events Account"
        ],
        "operationId": "webhook_payment_received",
        "summary": "Payment Received",
        "description": "Sent whenever a payment lands on your account, whether or not it settles an invoice — a part payment, an overpayment and a payment made before an invoice is issued all fire this.\n\n`invoice.paid` only fires on FULL settlement, so this is the event to post receipts against if you are keeping a receivables ledger in step. `data.amount` is the payment and `data.balance` is your account balance after it, so you can reconcile without calling `GET /account/balance`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "eventType": {
                    "type": "string",
                    "enum": [
                      "payment.received"
                    ]
                  },
                  "occurredAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "amount": {
                        "type": "string",
                        "description": "The payment amount, as a decimal string.",
                        "example": "250.00"
                      },
                      "balance": {
                        "type": "string",
                        "description": "Your account balance after this payment.",
                        "example": "1150.00"
                      },
                      "currency": {
                        "type": "string",
                        "example": "AUD"
                      },
                      "receivedAt": {
                        "type": "string",
                        "format": "date-time"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "paymentSucceeded": {
      "post": {
        "tags": [
          "Webhook Events Account"
        ],
        "operationId": "webhook_payment_succeeded",
        "summary": "Payment Succeeded",
        "description": "Sent when a card or direct-debit payment on your account succeeds, including a credit top-up. `data.source` says which; a charge's `data.invoiceNumber` links it to the invoice it paid, and a top-up's is null.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookPaymentEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "paymentFailed": {
      "post": {
        "tags": [
          "Webhook Events Account"
        ],
        "operationId": "webhook_payment_failed",
        "summary": "Payment Failed",
        "description": "Sent when a card or direct-debit payment on your account is declined or errors. `data.failureCode` / `data.failureMessage` carry the reason.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookPaymentEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "paymentReversed": {
      "post": {
        "tags": [
          "Webhook Events Account"
        ],
        "operationId": "webhook_payment_reversed",
        "summary": "Payment Reversed",
        "description": "Sent when a payment that succeeded is taken back: a direct debit dishonoured or a card charged back. The invoices it paid are owed again, and `data.failureCode` / `data.failureMessage` carry the reason.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookPaymentEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "creditNoteIssued": {
      "post": {
        "tags": [
          "Webhook Events Account"
        ],
        "operationId": "webhook_credit_note_issued",
        "summary": "Credit Note Issued",
        "description": "Sent when we issue a credit note against one of your invoices, including one that decides a dispute in your favour.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCreditNoteEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "disputeRaised": {
      "post": {
        "tags": [
          "Webhook Events Account"
        ],
        "operationId": "webhook_dispute_raised",
        "summary": "Dispute Raised",
        "description": "Sent when a dispute is raised on one of our invoices to you, by you or by our staff. The disputed amount is not collected while it is open.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookDisputeEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "disputeDecided": {
      "post": {
        "tags": [
          "Webhook Events Account"
        ],
        "operationId": "webhook_dispute_decided",
        "summary": "Dispute Decided",
        "description": "Sent once when a dispute is decided. `data.outcome` says how; a credit carries its amount and credit note, and `creditNote.issued` is sent for it too.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookDisputeEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "invoiceOverdue": {
      "post": {
        "tags": [
          "Webhook Events Account"
        ],
        "operationId": "webhook_invoice_overdue",
        "summary": "Invoice Overdue",
        "description": "Sent for each overdue invoice when we send a payment reminder: first `reminder`, then `warning`. Pay it, or raise a dispute on the part you contest, to stop the reminders.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookInvoiceOverdueEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "paymentMethodExpiring": {
      "post": {
        "tags": [
          "Webhook Events Account"
        ],
        "operationId": "webhook_payment_method_expiring",
        "summary": "Card Expiring",
        "description": "Sent when a card you pay us with is about to expire. Add a new one in the portal before it does, or automatic payments will stop.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookPaymentMethodEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "priceRiseNoticed": {
      "post": {
        "tags": [
          "Webhook Events Account"
        ],
        "operationId": "webhook_price_rise_noticed",
        "summary": "Price Rise Notice",
        "description": "Sent when we give notice that the price of a product you hold goes up, once per notice, with the old and new prices, the date and the services it reaches. A product priced for you on your own price book keeps its price and is not in it.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookPriceRiseEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "creditThresholdReached": {
      "post": {
        "tags": [
          "Webhook Events Usage"
        ],
        "operationId": "webhook_credit_threshold_reached",
        "summary": "Credit Warning",
        "description": "Sent when the credit you have used passes one of your credit warning levels, or reaches 100% of your limit, at the same moment as the warning email or SMS. Once per level each time you climb past it; dropping back below your lowest level starts again.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCreditEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "creditCallsBlocked": {
      "post": {
        "tags": [
          "Webhook Events Usage"
        ],
        "operationId": "webhook_credit_calls_blocked",
        "summary": "Calls Blocked for Credit",
        "description": "Sent when available credit reaches zero and new outbound calls are blocked. A call to 000 is never blocked. Pay or top up to lift it: `credit.callsRestored` follows.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCreditEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "creditCallsRestored": {
      "post": {
        "tags": [
          "Webhook Events Usage"
        ],
        "operationId": "webhook_credit_calls_restored",
        "summary": "Calls Restored",
        "description": "Sent when available credit is above zero again and the block on new calls lifts. It always follows a `credit.callsBlocked`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCreditEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "usageThresholdReached": {
      "post": {
        "tags": [
          "Webhook Events Usage"
        ],
        "operationId": "webhook_usage_threshold_reached",
        "summary": "End User Data Allowance",
        "description": "Sent when one of your end users' data services passes 50, 85 or 100% of its monthly allowance, once per level a month, so you can offer a top up or an upgrade at the moment it matters.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookUsageThresholdEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "usageAlertTriggered": {
      "post": {
        "tags": [
          "Webhook Events Usage"
        ],
        "operationId": "webhook_usage_alert_triggered",
        "summary": "Usage Alert",
        "description": "Sent when one of the usage alerts you set (`/account/usage-alerts`) passes its threshold, once per period. An alert is a warning only: it never blocks a call or a message.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookUsageAlertEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "dataRealmApproved": {
      "post": {
        "tags": [
          "Webhook Events RADIUS"
        ],
        "operationId": "webhook_data_realm_approved",
        "summary": "Realm Approved",
        "description": "Sent when a PPPoE realm you requested is approved. The realm is live from that moment: logins are namespaced into it and PPPoE services can be provisioned.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookRealmEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "dataRealmRejected": {
      "post": {
        "tags": [
          "Webhook Events RADIUS"
        ],
        "operationId": "webhook_data_realm_rejected",
        "summary": "Realm Rejected",
        "description": "Sent when a PPPoE realm you requested is not granted. `data.reason` carries why; the name is free for someone else, and you are welcome to request a different one.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookRealmEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "dataRadiusSessionRetrieved": {
      "post": {
        "tags": [
          "Webhook Events RADIUS"
        ],
        "operationId": "webhook_data_radius_session_retrieved",
        "summary": "Session Retrieved",
        "description": "Sent when Opticomm reports the session of one of your RADIUS users on Opticomm's RADIUS. Opticomm gives it a minute or two after we ask, so when *Check Whether a User Is Online* or *Retrieve the Current Session* answers `202`, this event carries the answer and you need not poll. `data.session` is null when nothing is connected.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookRadiusSessionEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "orderStatusChanged": {
      "post": {
        "tags": [
          "Webhook Events Orders"
        ],
        "operationId": "webhook_order_status_changed",
        "summary": "Order Status Changed",
        "description": "Sent when one of your orders changes status, so you do not have to poll `/data/orders`. `data.from` / `data.to` carry the transition in the same words that endpoint publishes.\n\nOrders move through more internal steps than the API publishes, and this event follows the published status — several internal steps share the status `InProgress`, and moving between them does not emit. You get one event per status change you can actually see.\n\nDraft orders do not emit: they are not visible on `/data/orders` and have no order id to correlate against, so the first event for an order is the one where it becomes `InProgress`. The exception is an order waiting for your appointment or port (`order.appointmentRequired`, `order.ntdFull`): it is public under its PND, so if it is cancelled after 7 days unanswered, this event names that PND, with the reason. An order held for later (`order.delayed`) is public under its PND too: cancelling it sends this event naming the PND, `to: Failed`, with the reason.\n\nNumber ports (`orderType: numberPort`) are the exception to one event per status: a port sends this event on **every** step it takes, and again when its cutover moves, as our emails tell you. `step` is the port's real state (as `GET /ports/{reference}` reads it), `waitingOn` who it waits on, `scheduledFor` the booked cutover and `statusReason` why it stopped. A step that waits on you also sends `port.actionRequired`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookOrderEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "orderDelayed": {
      "post": {
        "tags": [
          "Webhook Events Orders"
        ],
        "operationId": "webhook_order_delayed",
        "summary": "Order Delayed",
        "description": "Sent for an order a person holds for a later submit time: when the hold starts, when its time changes, and when we hold it for you at its time because it could not be sent (for credit, because it was not ready, or because another order is open at the location). Nothing has been sent to the carrier. An order we are still trying to send to the carrier does not send it.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookOrderDelayedEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "orderAppointmentRequired": {
      "post": {
        "tags": [
          "Webhook Events Orders"
        ],
        "operationId": "webhook_order_appointment_required",
        "summary": "Order Appointment Required",
        "description": "Sent when an order you placed with POST /data/orders needs a technician and no appointment was attached. The order is accepted and waits on our side; nothing is sent to the carrier until it has an appointment.\n\nRead the order's timeslots (GET /data/orders/{orderId}/timeslots), reserve one on the network's appointment endpoint, and attach it with PATCH /data/orders/{orderId}. An order still waiting after 7 days is cancelled.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookOrderAwaitingEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "orderNtdFull": {
      "post": {
        "tags": [
          "Webhook Events Orders"
        ],
        "operationId": "webhook_order_ntd_full",
        "summary": "Order NTD Full",
        "description": "Sent when an order you placed with POST /data/orders named no port and every port on the installed NTD is in use. We never order another NTD unasked, so the order waits on our side for you to choose:\n\n- **A new NTD:** reserve an appointment from the order's timeslots and\n  attach it with PATCH /data/orders/{orderId} (`appointmentId`).\n\n- **Take over a port:** PATCH /data/orders/{orderId} with the port\n  (`resourceId`), the service on it (`serviceId`, the AVC on NBN) and\n  the `customerAuthorityDate`.\n\n\nAn order still waiting after 7 days is cancelled.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookOrderAwaitingEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "portActionRequired": {
      "post": {
        "tags": [
          "Webhook Events Orders"
        ],
        "operationId": "webhook_port_action_required",
        "summary": "Port Action Required",
        "description": "Sent when a number port arrives at a step only you can move: today, a mobile port-in waiting for the verification code its number's holder was sent (`action: enterVerificationCode`). Confirm it with `POST /ports/{reference}/confirm`, or send a fresh code with `POST /ports/{reference}/verification-code` once it lapses. The same step also arrives as `order.statusChanged`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookPortActionRequiredEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "serviceProvisioned": {
      "post": {
        "tags": [
          "Webhook Events Services"
        ],
        "operationId": "webhook_service_provisioned",
        "summary": "Service Provisioned",
        "description": "Sent when a service first comes up — a data service going live, or a SIP trunk becoming active. This is the event that tells you an order has turned into something usable.\n\n`data.serviceType` says whether to read `data.serviceId` as a data service id or a trunk's `sipUsername`. Services migrated onto the platform from an existing environment do not emit this: they were already live for you, and the import is our records catching up.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookServiceEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "serviceSuspended": {
      "post": {
        "tags": [
          "Webhook Events Services"
        ],
        "operationId": "webhook_service_suspended",
        "summary": "Service Suspended",
        "description": "Sent when a service is suspended and stops carrying traffic — including a suspension for non-payment, which is the most common reason a working service stops. Pair it with `service.resumed`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookServiceEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "serviceResumed": {
      "post": {
        "tags": [
          "Webhook Events Services"
        ],
        "operationId": "webhook_service_resumed",
        "summary": "Service Resumed",
        "description": "Sent when a suspended service is restored. Only emitted coming out of a suspension — a service going live for the first time sends `service.provisioned` instead.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookServiceEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "serviceDisconnected": {
      "post": {
        "tags": [
          "Webhook Events Services"
        ],
        "operationId": "webhook_service_disconnected",
        "summary": "Service Disconnected",
        "description": "Sent when a service is cancelled or terminated for good. Unlike `service.suspended` this is final — the service will not resume, and a replacement means a new order.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookServiceEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "serviceCeaseScheduled": {
      "post": {
        "tags": [
          "Webhook Events Services"
        ],
        "operationId": "webhook_service_cease_scheduled",
        "summary": "Service Cease Scheduled",
        "description": "Sent when the carrier tells us it will cease one of your data services on a future date, and no cease order of yours asked for it. Most are churns: the end user has moved to another provider. The service stays live, and billed, until `data.ceaseAt`, so there is time to warn your end user or reorder.\n\nSent once per date; if the carrier moves the date, it is sent again with the new one. `service.disconnected` follows on the day. A cease you ordered sends no `service.ceaseScheduled`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookServiceCeaseScheduledEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "diagnosticCompleted": {
      "post": {
        "tags": [
          "Webhook Events Services"
        ],
        "operationId": "webhook_diagnostic_completed",
        "summary": "Line Test Finished",
        "description": "Sent once when a line test on one of your data services finishes: completed, cancelled or rejected. The carrier tells us when a test ends, so after `POST /nbn/diagnostics/avc/service_test` or `POST /opticomm/serviceTest` you need not poll. `data.result` is `Passed` or `Failed` where the carrier gives one; read the test by `data.testId` on `data.network`'s diagnostics endpoints for its measurements. A test still running sends nothing.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookDiagnosticCompletedEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "serviceHealthReportReady": {
      "post": {
        "tags": [
          "Webhook Events Services"
        ],
        "operationId": "webhook_service_health_report_ready",
        "summary": "Service Health Report Ready",
        "description": "Sent once when a service health report on one of your data services is complete and stored, so after asking for one (`POST /nbn/service_health/service/{serviceRef}` or `POST /opticomm/serviceHealth`) you need not poll. Read it by `data.reportId` on `data.network`'s health endpoints. A report the carrier sends without being asked sends it too.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookServiceHealthReportReadyEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "ontUpgradeCompleted": {
      "post": {
        "tags": [
          "Webhook Events Services"
        ],
        "operationId": "webhook_ont_upgrade_completed",
        "summary": "ONT Upgrade Finished",
        "description": "Sent once when an ONT upgrade on one of your Opticomm data services ends: `data.succeeded` says whether the ONT was upgraded, and `data.speedChangeSubmitted` whether the change to the speed asked for (`data.targetSku`) was submitted after it. A submitted change then follows as any speed change does. The same outcome is emailed to your users who have the ONT upgrade notice on.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookOntUpgradeCompletedEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "appointmentBooked": {
      "post": {
        "tags": [
          "Webhook Events Orders"
        ],
        "operationId": "webhook_appointment_booked",
        "summary": "Appointment Booked",
        "description": "Sent when a technician appointment is committed to one of your orders. This is the first event for any appointment: a reserved slot is a hold that has not been committed and routinely lapses, so it is not announced, and every later appointment event follows a booking you have already been sent.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookAppointmentEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "appointmentRescheduled": {
      "post": {
        "tags": [
          "Webhook Events Orders"
        ],
        "operationId": "webhook_appointment_rescheduled",
        "summary": "Appointment Rescheduled",
        "description": "Sent when a booked appointment's window moves. `data.previousSlotStart` and `data.previousSlotEnd` carry the window it used to hold.\n\nWorth wiring up before anything else on this list: a reschedule most often originates with the carrier rather than with you, and a missed one means the technician arrives at an empty premises — a missed-appointment fee and a week's slip on the order.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookAppointmentEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "appointmentCancelled": {
      "post": {
        "tags": [
          "Webhook Events Orders"
        ],
        "operationId": "webhook_appointment_cancelled",
        "summary": "Appointment Cancelled",
        "description": "Sent when a booked appointment is cancelled or expires. The order stays where it is — it simply has no appointment any more, and needs a new one booked.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookAppointmentEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "outageOpened": {
      "post": {
        "tags": [
          "Webhook Events Outages"
        ],
        "operationId": "webhook_outage_opened",
        "summary": "Outage Opened",
        "description": "Sent when a network outage affecting services on your account reaches the register. `data` is the same body `GET /outages` returns, plus `yourAffectedServiceCount` and `yourAffectedServiceTypes`.\n\nYou are only sent outages that match your own services — the same matching `GET /outages` performs — so this and the read endpoint can never disagree about whether you are affected. Only reviewed, published entries are sent.\n\nPlanned maintenance is sent too, with `data.planned` true: when we first send its notice to your account.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookOutageEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "outageUpdated": {
      "post": {
        "tags": [
          "Webhook Events Outages"
        ],
        "operationId": "webhook_outage_updated",
        "summary": "Outage Updated",
        "description": "Sent when something a customer would be told about a running outage changes — the estimated restoration time, the affected area, the cause, the notes. Our own notification bookkeeping does not emit, so you will not receive one of these every time we send an email about the outage.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookOutageEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "outageClosed": {
      "post": {
        "tags": [
          "Webhook Events Outages"
        ],
        "operationId": "webhook_outage_closed",
        "summary": "Outage Closed",
        "description": "Sent when the outage is resolved and services are restored. `data.resolvedAt` is when that happened.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookOutageEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "degradationOpened": {
      "post": {
        "tags": [
          "Webhook Events Outages"
        ],
        "operationId": "webhook_degradation_opened",
        "summary": "Degradation Opened",
        "description": "Sent when we raise a potential service degradation at a POI where you have a live data service: our interconnect there is busy and the extra capacity is delayed, so services may be slower at peak. They are not down, and it is not an outage. `data.expectedResolutionAt` is when we expect the capacity, and `data.yourAffectedServiceCount` how many of your services are there.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookDegradationEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "degradationUpdated": {
      "post": {
        "tags": [
          "Webhook Events Outages"
        ],
        "operationId": "webhook_degradation_updated",
        "summary": "Degradation Updated",
        "description": "Sent when the expected date, the affected POIs or what we tell customers changes. An account newly affected by the change is sent `degradation.opened` instead.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookDegradationEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "degradationClosed": {
      "post": {
        "tags": [
          "Webhook Events Outages"
        ],
        "operationId": "webhook_degradation_closed",
        "summary": "Degradation Closed",
        "description": "Sent when the extra capacity is in place. `data.resolvedAt` is when.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookDegradationEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "quoteCompleted": {
      "post": {
        "tags": [
          "Webhook Events Quotes"
        ],
        "operationId": "webhook_quote_completed",
        "summary": "Quote Completed",
        "description": "Sent when an EE fibre build quote linked to your account is priced. `data.quote` is the quote as `GET /nbn/quotes/{quoteId}` returns it, with the fibre build contribution in `quoteItem` and its validity in `validFor`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookQuoteEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "quoteActionRequired": {
      "post": {
        "tags": [
          "Webhook Events Quotes"
        ],
        "operationId": "webhook_quote_action_required",
        "summary": "Quote Action Required",
        "description": "Sent when the carrier holds a quote waiting on you: `data.quote.status` is `InProgress` with `subStatus` `Pending`, and `eventNote` gives the carrier's reason. Contact support so we can give the carrier what it needs.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookQuoteEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "quoteClosed": {
      "post": {
        "tags": [
          "Webhook Events Quotes"
        ],
        "operationId": "webhook_quote_closed",
        "summary": "Quote Closed",
        "description": "Sent when a quote ends without a price: `data.quote.status` is `Rejected`, `Cancelled`, `Closed` or `Expired`. Request a new quote for the location with `POST /nbn/quotes`. A priced quote reaching the end of its `validFor` window sends nothing.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookQuoteEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "transitBlackholePlaced": {
      "post": {
        "tags": [
          "Webhook Events Transit"
        ],
        "operationId": "webhook_transit_blackhole_placed",
        "summary": "Blackhole Placed (Not Available Yet)",
        "x-badges": [
          {
            "name": "Not Available Yet",
            "color": "#6b7280"
          }
        ],
        "description": "**Not available yet:** IP transit is not offered by API yet, so this event cannot be subscribed to and is not sent until it is. Sent when an address on one of your IP transit services is blackholed, by you or by Check Networks (`data.placedBy`). Traffic to the address is dropped at our border from then on.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookTransitBlackholeEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "transitBlackholeReleased": {
      "post": {
        "tags": [
          "Webhook Events Transit"
        ],
        "operationId": "webhook_transit_blackhole_released",
        "summary": "Blackhole Released (Not Available Yet)",
        "x-badges": [
          {
            "name": "Not Available Yet",
            "color": "#6b7280"
          }
        ],
        "description": "**Not available yet:** IP transit is not offered by API yet, so this event cannot be subscribed to and is not sent until it is. Sent when a blackhole is released before its expiry, by you or by Check Networks. Traffic to the address resumes.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookTransitBlackholeEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "transitBlackholeExpired": {
      "post": {
        "tags": [
          "Webhook Events Transit"
        ],
        "operationId": "webhook_transit_blackhole_expired",
        "summary": "Blackhole Expired (Not Available Yet)",
        "x-badges": [
          {
            "name": "Not Available Yet",
            "color": "#6b7280"
          }
        ],
        "description": "**Not available yet:** IP transit is not offered by API yet, so this event cannot be subscribed to and is not sent until it is. Sent when a blackhole reaches its expiry and lifts by itself, within 15 minutes of `data.expiresAt`. Traffic to the address resumes; place it again if the attack is still running.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookTransitBlackholeEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "endUserSpendThreshold": {
      "post": {
        "tags": [
          "Webhook Events End Users"
        ],
        "operationId": "webhook_end_user_spend_threshold",
        "summary": "End User Spend Threshold",
        "description": "Sent when an end user's charges this month reach 50, 85 or 100 per cent (`data.tier`) of the monthly spend limit you set on them, once per tier per month, from the daily check that emails the end user. It is sent whether or not the end user has an address to email. Spent is the same figure as Get End User Spend and the end user's Next Bill Estimate. Only for an account that bills its end users.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEndUserSpendEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "endUserCreditNoteIssued": {
      "post": {
        "tags": [
          "Webhook Events End Users"
        ],
        "operationId": "webhook_end_user_credit_note_issued",
        "summary": "End User Credit Note Issued",
        "description": "Sent when you issue a credit note on one of your bills to an end user, including one that decides the end user's dispute in their favour. `data.endUser` names the end user by its number. Only for an account that bills its end users.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEndUserCreditNoteEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "endUserDisputeRaised": {
      "post": {
        "tags": [
          "Webhook Events End Users"
        ],
        "operationId": "webhook_end_user_dispute_raised",
        "summary": "End User Dispute Raised",
        "description": "Sent when an end user disputes one of your bills to them, from their portal. The disputed amount is not chased while the dispute is open. Only for an account that bills its end users.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEndUserDisputeEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "endUserDisputeDecided": {
      "post": {
        "tags": [
          "Webhook Events End Users"
        ],
        "operationId": "webhook_end_user_dispute_decided",
        "summary": "End User Dispute Decided",
        "description": "Sent once when you decide an end user's dispute, in the portal or by API. `data.outcome` says how; a credit carries its amount and credit note, and `endUser.creditNote.issued` is sent for it too.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEndUserDisputeEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "smsReceived": {
      "post": {
        "tags": [
          "Webhook Events SMS"
        ],
        "operationId": "webhook_sms_received",
        "summary": "SMS Received",
        "description": "Sent when a message arrives on one of your mobile numbers and is passed on, with its text (`data.message`). A message held as a suspected scam sends nothing unless our team releases it, when it is sent then. This is the only SMS event that carries the text.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookSmsEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "smsDelivered": {
      "post": {
        "tags": [
          "Webhook Events SMS"
        ],
        "operationId": "webhook_sms_delivered",
        "summary": "SMS Delivered",
        "description": "Sent once when the delivery receipt for a message you sent says it reached the handset. `data.messageId` is the `messageId` from `POST /sms`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookSmsEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "smsFailed": {
      "post": {
        "tags": [
          "Webhook Events SMS"
        ],
        "operationId": "webhook_sms_failed",
        "summary": "SMS Failed",
        "description": "Sent once when the delivery receipt for a message you sent says it could not be delivered, with the reason (`data.failureReason`).\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookSmsEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "faxReceived": {
      "post": {
        "tags": [
          "Webhook Events Fax"
        ],
        "operationId": "webhook_fax_received",
        "summary": "Fax Received",
        "description": "Sent once when a fax arrives on one of your numbers, after it is emailed or kept for the portal; `data.status` says which, or `failed` when it could not be passed on. Metadata only: never the document.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookFaxEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "faxSent": {
      "post": {
        "tags": [
          "Webhook Events Fax"
        ],
        "operationId": "webhook_fax_sent",
        "summary": "Fax Sent",
        "description": "Sent once when a fax from one of your fax plans has gone through, with the pages sent.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookFaxEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "faxFailed": {
      "post": {
        "tags": [
          "Webhook Events Fax"
        ],
        "operationId": "webhook_fax_failed",
        "summary": "Fax Failed",
        "description": "Sent once when a fax from one of your fax plans has failed for good, with the reason. A busy line or no answer is retried first, and sends nothing until the last try fails.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookFaxEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "accountSuspended": {
      "post": {
        "tags": [
          "Webhook Events Account"
        ],
        "operationId": "webhook_account_suspended",
        "summary": "Account Suspended",
        "description": "Sent when your account is suspended. From now, writes through this API answer `403` until it is reinstated; reads and webhooks keep working.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookAccountEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "accountReinstated": {
      "post": {
        "tags": [
          "Webhook Events Account"
        ],
        "operationId": "webhook_account_reinstated",
        "summary": "Account Reinstated",
        "description": "Sent when a suspended account is reinstated and writes work again.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookAccountEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "endUserCreated": {
      "post": {
        "tags": [
          "Webhook Events End Users"
        ],
        "operationId": "webhook_end_user_created",
        "summary": "End User Created",
        "description": "Sent when an end user is added to your account, in the portal or through this API.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEndUserEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "endUserUpdated": {
      "post": {
        "tags": [
          "Webhook Events End Users"
        ],
        "operationId": "webhook_end_user_updated",
        "summary": "End User Updated",
        "description": "Sent when an end user's details change. `data.changedFields` names the fields; read the end user for their new values.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEndUserEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "endUserSuspended": {
      "post": {
        "tags": [
          "Webhook Events End Users"
        ],
        "operationId": "webhook_end_user_suspended",
        "summary": "End User Suspended",
        "description": "Sent when an end user is suspended. Their services send their own `service.suspended` events.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEndUserEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "endUserReactivated": {
      "post": {
        "tags": [
          "Webhook Events End Users"
        ],
        "operationId": "webhook_end_user_reactivated",
        "summary": "End User Reactivated",
        "description": "Sent when a suspended end user is reactivated.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEndUserEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "webhookEndpointDisabled": {
      "post": {
        "tags": [
          "Webhook Delivery"
        ],
        "operationId": "webhook_endpoint_disabled",
        "summary": "Endpoint Disabled",
        "description": "Sent to your other endpoints when one is turned off after 20 dead deliveries in a row, so a monitoring endpoint can raise the alarm. Never sent to the endpoint turned off.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEndpointDisabledEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    },
    "delegationUsed": {
      "post": {
        "tags": [
          "Webhook Events Delegated Steps"
        ],
        "operationId": "webhook_delegation_used",
        "summary": "Delegated Step Done",
        "description": "Sent when a person you handed one step to by a one-use link passed the email code and did the step: confirmed a mobile port, or booked an install appointment. Sent once per link.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookDelegationEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged - any 2xx response marks the event as delivered."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "OAuth2": {
        "description": "OAuth2 access tokens are used for API access. An API key uses the client credentials flow. A registered OAuth app uses the authorization code flow with PKCE (S256) and its client secret: an Owner or Admin approves it on the consent screen in the wholesale portal, and its tokens act for that account within the scopes approved, until the account revokes it under Connected Apps. Access tokens last an hour. An app's refresh token is replaced on every use and lasts 30 days from that use, so an app left idle for 30 days must be connected again. Sending a replaced refresh token again within 60 seconds of its replacement is refused as `temporarily_unavailable`, a retry; after that it disconnects the app from the account. An app never gets a `safety:*` scope. See https://help.checknetworks.tools/api/oauth-apps/.",
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "/oauth/token",
            "scopes": {
              "account:read": "View Account Details",
              "account:create": "Create Account Resources",
              "account:update": "Update Account Resources",
              "account:delete": "Remove Account Resources",
              "billing:read": "View Billing and Pricing Information",
              "billing:update": "Update Billing Settings (Disputes, Credit Alerts, Payment Methods). Never pays: paying our invoices stays in the portal.",
              "end-users:read": "View End Users",
              "end-users:create": "Create End Users",
              "end-users:update": "Update, Suspend and Archive End Users",
              "end-users:sign-in": "Sign End Users In to the End-User Portal",
              "safety:read": "View Family Violence Safety Records and Reveal Contacts. These calls carry legal obligations under the family violence rules; every read and reveal is audited. Granted only by name.",
              "safety:update": "Raise and Update Family Violence Safety Records. These calls carry legal obligations under the family violence rules; every change is audited. Granted only by name.",
              "retail:read": "View End-User Billing. Every retail route answers 404 for an account that does not bill its end users.",
              "retail:create": "Create End-User Billing Records",
              "retail:update": "Update End-User Billing",
              "retail:delete": "Remove End-User Billing Records",
              "retail-cases:read": "View End-User Hardship Cases and Invoice Disputes. These calls carry legal obligations: the hardship and complaints rules the portal follows.",
              "retail-cases:update": "Decide End-User Hardship Cases and Invoice Disputes. A decision made by API carries the same legal obligations as one made in the portal (the hardship and complaints rules, their deadlines and notices), and the wholesaler is responsible for meeting them.",
              "integrations:read": "View Accounting Integrations",
              "integrations:update": "Update Accounting Integrations",
              "tickets:read": "View Support Tickets",
              "tickets:create": "Raise Support Tickets",
              "tickets:update": "Reply to and Update Support Tickets",
              "webhooks:read": "View Webhook Endpoints",
              "webhooks:create": "Register Webhook Endpoints",
              "webhooks:update": "Update Webhook Endpoints",
              "webhooks:delete": "Remove Webhook Endpoints",
              "watch:read": "View Watches",
              "watch:create": "Create Watches",
              "watch:update": "Update Watches",
              "watch:delete": "Remove Watches",
              "data:read": "View Data Services (NBN and Opticomm)",
              "data:create": "Create/Order Data Services (NBN and Opticomm)",
              "data:update": "Update Data Services (NBN and Opticomm)",
              "data:delete": "Cancel Data Services (NBN and Opticomm)",
              "data:credentials": "Read Data Service Passwords (PPPoE)",
              "colocation:read": "View Colocation Services",
              "colocation:create": "Order Colocation and Request Remote Hands",
              "vpn:read": "View VPN Groups and Users",
              "vpn:create": "Create VPN Groups and Order VPN Users",
              "vpn:update": "Update VPN Groups and Users",
              "vpn:delete": "Remove VPN Groups and Users",
              "vpn:credentials": "Download VPN User Profiles (Holding the User's Private Key)",
              "voice:read": "View Voice Services and Data",
              "voice:create": "Create Voice Services",
              "voice:update": "Update Voice Services",
              "voice:delete": "Cancel Voice Services",
              "secrets:read": "Reveal Stored Secrets (SIP Passwords). Never part of voice:read; every read is audited.",
              "recordings:read": "List and Download Call Recordings. Recordings are call content, so they are not part of voice:read.",
              "sms:send": "Send SMS Messages",
              "sms:read": "View SMS Messages and History",
              "transit:read": "View IP Transit Services. Not available yet: IP transit is not offered by API, so no key can be granted this scope until it is.",
              "transit:create": "Create IP Transit Resources. Not available yet: IP transit is not offered by API, so no key can be granted this scope until it is.",
              "transit:delete": "Remove IP Transit Resources. Not available yet: IP transit is not offered by API, so no key can be granted this scope until it is."
            }
          },
          "authorizationCode": {
            "authorizationUrl": "https://checknetworks.tools/oauth/authorize",
            "tokenUrl": "/oauth/token",
            "refreshUrl": "/oauth/token",
            "scopes": {
              "account:read": "View Account Details",
              "account:create": "Create Account Resources",
              "account:update": "Update Account Resources",
              "account:delete": "Remove Account Resources",
              "billing:read": "View Billing and Pricing Information",
              "billing:update": "Update Billing Settings (Disputes, Credit Alerts, Payment Methods). Never pays: paying our invoices stays in the portal.",
              "end-users:read": "View End Users",
              "end-users:create": "Create End Users",
              "end-users:update": "Update, Suspend and Archive End Users",
              "end-users:sign-in": "Sign End Users In to the End-User Portal",
              "safety:read": "View Family Violence Safety Records and Reveal Contacts. These calls carry legal obligations under the family violence rules; every read and reveal is audited. Granted only by name.",
              "safety:update": "Raise and Update Family Violence Safety Records. These calls carry legal obligations under the family violence rules; every change is audited. Granted only by name.",
              "retail:read": "View End-User Billing. Every retail route answers 404 for an account that does not bill its end users.",
              "retail:create": "Create End-User Billing Records",
              "retail:update": "Update End-User Billing",
              "retail:delete": "Remove End-User Billing Records",
              "retail-cases:read": "View End-User Hardship Cases and Invoice Disputes. These calls carry legal obligations: the hardship and complaints rules the portal follows.",
              "retail-cases:update": "Decide End-User Hardship Cases and Invoice Disputes. A decision made by API carries the same legal obligations as one made in the portal (the hardship and complaints rules, their deadlines and notices), and the wholesaler is responsible for meeting them.",
              "integrations:read": "View Accounting Integrations",
              "integrations:update": "Update Accounting Integrations",
              "tickets:read": "View Support Tickets",
              "tickets:create": "Raise Support Tickets",
              "tickets:update": "Reply to and Update Support Tickets",
              "webhooks:read": "View Webhook Endpoints",
              "webhooks:create": "Register Webhook Endpoints",
              "webhooks:update": "Update Webhook Endpoints",
              "webhooks:delete": "Remove Webhook Endpoints",
              "watch:read": "View Watches",
              "watch:create": "Create Watches",
              "watch:update": "Update Watches",
              "watch:delete": "Remove Watches",
              "data:read": "View Data Services (NBN and Opticomm)",
              "data:create": "Create/Order Data Services (NBN and Opticomm)",
              "data:update": "Update Data Services (NBN and Opticomm)",
              "data:delete": "Cancel Data Services (NBN and Opticomm)",
              "data:credentials": "Read Data Service Passwords (PPPoE)",
              "colocation:read": "View Colocation Services",
              "colocation:create": "Order Colocation and Request Remote Hands",
              "vpn:read": "View VPN Groups and Users",
              "vpn:create": "Create VPN Groups and Order VPN Users",
              "vpn:update": "Update VPN Groups and Users",
              "vpn:delete": "Remove VPN Groups and Users",
              "vpn:credentials": "Download VPN User Profiles (Holding the User's Private Key)",
              "voice:read": "View Voice Services and Data",
              "voice:create": "Create Voice Services",
              "voice:update": "Update Voice Services",
              "voice:delete": "Cancel Voice Services",
              "secrets:read": "Reveal Stored Secrets (SIP Passwords). Never part of voice:read; every read is audited.",
              "recordings:read": "List and Download Call Recordings. Recordings are call content, so they are not part of voice:read.",
              "sms:send": "Send SMS Messages",
              "sms:read": "View SMS Messages and History",
              "transit:read": "View IP Transit Services. Not available yet: IP transit is not offered by API, so no key can be granted this scope until it is.",
              "transit:create": "Create IP Transit Resources. Not available yet: IP transit is not offered by API, so no key can be granted this scope until it is.",
              "transit:delete": "Remove IP Transit Resources. Not available yet: IP transit is not offered by API, so no key can be granted this scope until it is."
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "status",
              "code",
              "reason"
            ],
            "properties": {
              "status": {
                "type": "integer",
                "description": "HTTP status code for the error.",
                "example": 404
              },
              "code": {
                "type": "string",
                "description": "A stable code to branch on; `reason` is free text and may change. Each has an entry at `docUrl` saying what to do. A refusal says why: `key_revoked`, `key_expired`, `secret_rotated`, `scopes_changed` and `missing_scope` need a new key, token or scope; `ip_not_allowed` needs the caller's address on the key's allowlist; `account_suspended` and `account_inactive` need a person on your side; `owner_protected` is a change to an Owner (name, email, role, two-factor or removal), which a key, acting as an Admin, may never make; `app_disabled` and `app_access_revoked` (an OAuth app's token) mean the app must be connected again; `idempotency_in_progress` (with `Retry-After`) means retry later, and `idempotency_key_reused` means send the new request under a new key. The `carrier_` codes and the five before them are the canonical carrier errors, the same whichever carrier refused: `address_not_serviceable`, `duplicate_order`, `insufficient_capacity`, `auth_validation_failed`, `customer_authority_required` and `charge_acknowledgement_required` are a carrier refusing the request on its merits; `carrier_bad_request` is a carrier refusing it for any other reason (its own code is in `carrierCode`); `carrier_unauthenticated`, `carrier_rate_limited` and `carrier_unavailable` are our link to the carrier failing, so retry later; `carrier_unknown` is a carrier failure we could not classify. `caller_id_authorisation_required` is a trunk's caller ID that your account neither holds nor has had approved: ask for it with `POST /caller-id-authorisations`. `hold_expired` is a number order naming a hold that has run out: hold the number again. `no_end_user_portal_access` is a sign-in link asked for an end user who cannot use the end-user portal. `sender_not_approved` is a `POST /sms` from a sender your account has no approval for: request one with `POST /sms/senders`. `emergency_call` is a hang-up refused because the call is to 000, 112 or 106. `sq_batch_allowance_exceeded` is a qualification batch over your account's allowance: `remainingRows` says how many rows you may still send today. `no_live_session` is a session reset with nothing connected to drop, and `session_not_resettable` one on a network where a reset is not possible. `res_line_needs_number` is a change that would leave a Res Line with no number: `resLines` names each line, and the request is sent again with a `resLineResolutions` choice for each. `bundle_draft_limit` is a data order for a bundle that already holds as many draft orders as one may: send or remove some of its drafts, or start another bundle. New codes may be added: treat an unknown code by its `status`.",
                "enum": [
                  "bad_request",
                  "unauthenticated",
                  "forbidden",
                  "not_found",
                  "method_not_allowed",
                  "conflict",
                  "validation_failed",
                  "rate_limited",
                  "server_error",
                  "not_implemented",
                  "service_unavailable",
                  "caller_id_authorisation_required",
                  "hold_expired",
                  "no_end_user_portal_access",
                  "sender_not_approved",
                  "ticket_not_open",
                  "complaint_outcome_required",
                  "fault_ticket_limit",
                  "key_revoked",
                  "key_expired",
                  "secret_rotated",
                  "scopes_changed",
                  "missing_scope",
                  "ip_not_allowed",
                  "account_suspended",
                  "account_inactive",
                  "owner_protected",
                  "app_disabled",
                  "app_access_revoked",
                  "idempotency_in_progress",
                  "idempotency_key_reused",
                  "address_not_serviceable",
                  "duplicate_order",
                  "insufficient_capacity",
                  "auth_validation_failed",
                  "customer_authority_required",
                  "charge_acknowledgement_required",
                  "carrier_bad_request",
                  "carrier_unauthenticated",
                  "carrier_rate_limited",
                  "carrier_unavailable",
                  "carrier_unknown",
                  "emergency_call",
                  "sq_batch_allowance_exceeded",
                  "no_live_session",
                  "session_not_resettable",
                  "res_line_needs_number",
                  "bundle_draft_limit"
                ],
                "example": "not_found"
              },
              "reason": {
                "type": "string",
                "description": "Client-friendly reason for the error.",
                "example": "Resource not found."
              },
              "messageId": {
                "type": "string",
                "description": "This request's id, the same as the `CN-Message-Id` response header. Quote it to support.",
                "example": "01JD3Q5V8Y6W2K4N7R9T1B3C5E"
              },
              "docUrl": {
                "type": "string",
                "format": "uri",
                "description": "The `code`'s entry on the error reference page.",
                "example": "https://help.checknetworks.tools/api/errors/#not_found"
              },
              "carrierCode": {
                "type": "string",
                "description": "The upstream carrier's own error code, where the failure was a carrier rejection of the request (e.g. NBN's RJ002003 or 001013). Absent when the error did not originate at a carrier.",
                "example": "RJ002003"
              },
              "remainingRows": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "On a `sq_batch_allowance_exceeded` error, the rows your account may still qualify by batch today; null when the day has no row limit and the refusal is the hourly batch count. Absent on every other error.",
                "example": 120
              },
              "charge": {
                "type": "object",
                "description": "On a `charge_acknowledgement_required` error, the charge the request would incur. Repeat the request accepting it to go ahead. Absent on every other error.",
                "required": [
                  "amount",
                  "currency"
                ],
                "properties": {
                  "amount": {
                    "type": "string",
                    "deprecated": true,
                    "description": "The charge as a decimal dollar amount, without GST. Deprecated: read `amountExGst`, `amountGst` and `amountIncGst` instead.",
                    "example": "300.00"
                  },
                  "amountExGst": {
                    "type": "string",
                    "description": "The charge without GST, as a decimal dollar amount.",
                    "example": "300.00"
                  },
                  "amountGst": {
                    "type": "string",
                    "description": "The GST on the charge.",
                    "example": "30.00"
                  },
                  "amountIncGst": {
                    "type": "string",
                    "description": "The charge with GST, what the invoice will show.",
                    "example": "330.00"
                  },
                  "currency": {
                    "type": "string",
                    "example": "AUD"
                  },
                  "contractEndsOn": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date",
                    "description": "When the contract the charge comes from ends."
                  },
                  "period": {
                    "type": "string",
                    "enum": [
                      "month"
                    ],
                    "description": "On a recurring charge (call recording), how often it is billed: the amounts are per period."
                  }
                }
              },
              "consent": {
                "type": "string",
                "description": "On a `charge_acknowledgement_required` error for call recording, the consent you accept by sending `acknowledgeRecording: true`. Absent on every other error."
              },
              "holdId": {
                "type": "string",
                "description": "On a `POST /numbers` that bought a number from our supplier but could not place the order, a hold on the number bought, until `heldUntil`. Order again with this `holdId` (same `type`, `szu` and `blockSize`) and the number is taken without buying it again. Absent on every other error."
              },
              "heldUntil": {
                "type": "string",
                "format": "date-time",
                "description": "When the `holdId` beside it runs out. Absent on every other error."
              },
              "allowance": {
                "type": "object",
                "description": "On a `rate_limited` error from `POST /numbers/lookup`, the account's daily number lookup allowance: how many it allows, how many were used today, and how many the refused batch asked for. It resets at midnight Brisbane time; `Retry-After` gives the seconds until then. Absent on every other error.",
                "required": [
                  "used",
                  "limit",
                  "requested"
                ],
                "properties": {
                  "used": {
                    "type": "integer",
                    "example": 990
                  },
                  "limit": {
                    "type": "integer",
                    "example": 1000
                  },
                  "requested": {
                    "type": "integer",
                    "example": 25
                  }
                }
              },
              "resLines": {
                "type": "array",
                "description": "On a `res_line_needs_number` error, each Res Line the change would leave with no number, and the choices for it. Send the request again with `resLineResolutions` holding one choice per line. Absent on every other error.",
                "items": {
                  "type": "object",
                  "required": [
                    "username",
                    "name",
                    "choices"
                  ],
                  "properties": {
                    "username": {
                      "type": "string",
                      "description": "The line's SIP username, as `/residential-lines/{username}` names it.",
                      "example": "res-4821"
                    },
                    "name": {
                      "type": "string",
                      "example": "Smith Home Phone"
                    },
                    "choices": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "allocate_number",
                          "move_number",
                          "suspend",
                          "cancel"
                        ]
                      }
                    }
                  }
                }
              },
              "existingWebhookId": {
                "type": "string",
                "description": "On a `409` from `POST /webhooks`, the endpoint already registered at that URL. Absent on every other error.",
                "example": "12"
              },
              "fields": {
                "type": "array",
                "description": "On a `validation_failed` error, one entry per failed rule, naming the input it was about. Absent on every other error.",
                "items": {
                  "type": "object",
                  "required": [
                    "field",
                    "reason"
                  ],
                  "properties": {
                    "field": {
                      "type": "string",
                      "description": "The input's name; nested inputs use dots, e.g. `address.postcode`.",
                      "example": "locationId"
                    },
                    "reason": {
                      "type": "string",
                      "example": "The location id field is required."
                    }
                  }
                }
              }
            }
          }
        }
      },
      "AddressMatch": {
        "type": "object",
        "description": "An address from our copy of G-NAF.",
        "required": [
          "gnafId",
          "fullAddress",
          "shortAddress",
          "roadNumber1",
          "roadNumber2",
          "roadName",
          "roadTypeCode",
          "localityName",
          "stateTerritoryCode",
          "postcode",
          "latitude",
          "longitude",
          "confidence",
          "nbnLocId",
          "opticommOpcId"
        ],
        "properties": {
          "gnafId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The G-NAF address id (`address_detail_pid`). Pass it to `GET /nbn/address/search?gnaf=` to find the NBN location.",
            "example": "GANSW704508339"
          },
          "fullAddress": {
            "type": "string",
            "example": "12 SMITH STREET, PARRAMATTA NSW 2150"
          },
          "shortAddress": {
            "type": "string",
            "example": "12 SMITH ST, PARRAMATTA"
          },
          "roadNumber1": {
            "type": [
              "integer",
              "null"
            ],
            "example": 12
          },
          "roadNumber2": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The end of a number range, such as 14 in 12-14."
          },
          "roadName": {
            "type": [
              "string",
              "null"
            ],
            "example": "SMITH"
          },
          "roadTypeCode": {
            "type": [
              "string",
              "null"
            ],
            "example": "STREET"
          },
          "localityName": {
            "type": "string",
            "example": "PARRAMATTA"
          },
          "stateTerritoryCode": {
            "type": "string",
            "example": "NSW"
          },
          "postcode": {
            "type": [
              "string",
              "null"
            ],
            "example": "2150"
          },
          "latitude": {
            "type": [
              "number",
              "null"
            ]
          },
          "longitude": {
            "type": [
              "number",
              "null"
            ]
          },
          "confidence": {
            "type": [
              "integer",
              "null"
            ],
            "description": "G-NAF's confidence in the address, from -1 to 2. 2 means three or more contributing sources agree."
          },
          "nbnLocId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The NBN location id, when we already know it.",
            "example": "LOC000123456789"
          },
          "opticommOpcId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The Opticomm property id, when the address is on Opticomm's network."
          }
        }
      },
      "AccountBillingAddress": {
        "type": "object",
        "description": "The address printed on our invoices to you (#4891), in the same shape as the account's `address`. Each line is null when not on file.",
        "properties": {
          "address1": {
            "type": [
              "string",
              "null"
            ]
          },
          "address2": {
            "type": [
              "string",
              "null"
            ]
          },
          "address3": {
            "type": [
              "string",
              "null"
            ]
          },
          "locality": {
            "type": [
              "string",
              "null"
            ],
            "description": "The city or suburb."
          },
          "state": {
            "type": [
              "string",
              "null"
            ],
            "description": "The state or territory. A change by API must be one of ACT, NSW, NT, QLD, SA, TAS, VIC or WA; an address our staff entered may hold another."
          },
          "postcode": {
            "type": [
              "string",
              "null"
            ],
            "description": "Four digits when changed by API."
          },
          "country": {
            "type": [
              "string",
              "null"
            ],
            "description": "Australia when an address is saved without one."
          }
        }
      },
      "AccountBillingContact": {
        "type": "object",
        "description": "Your billing contact (#4891), where invoices and billing notices go. Each field is null when not on file.",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "maxLength": 255
          },
          "phone": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 50
          }
        }
      },
      "CreditPosition": {
        "type": "object",
        "description": "Where your account stands with us, with the same meaning on a prepaid and a postpaid account. `amountOwed` includes GST, as your invoices do. The credit line is read as credit control reads it and the portal dashboard shows it: without GST, and credit used is what you owe plus usage not yet invoiced. Your services are held when `availableCredit` reaches zero.",
        "properties": {
          "accountType": {
            "type": "string",
            "enum": [
              "prepaid",
              "postpaid"
            ]
          },
          "amountOwed": {
            "type": "string",
            "description": "What you owe us on invoices, less payments and credits, with GST. Positive when you owe us; negative when you hold credit with us.",
            "example": "125.00"
          },
          "creditLimit": {
            "type": "string",
            "description": "Your credit limit with us, without GST. Two decimals.",
            "example": "5000.00"
          },
          "creditUsed": {
            "type": "string",
            "description": "How much of the credit limit is used, without GST: what you owe plus usage not yet invoiced. Never below `0.00`.",
            "example": "1130.00"
          },
          "availableCredit": {
            "type": "string",
            "description": "The credit limit less credit used, without GST. Below zero when you are over your limit.",
            "example": "3870.00"
          },
          "creditUsedPercent": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100,
            "description": "Credit used as a whole percentage of the limit, the figure the credit warnings at 80, 90, 95 and 100% are sent on.",
            "example": 22
          }
        }
      },
      "Notice": {
        "type": "object",
        "description": "A notice we sent you or one of your end users, and what happened to it. No message body is kept, so a notice is told by its kind and what it was about.",
        "required": [
          "id",
          "createdAt",
          "kind",
          "kindLabel",
          "channel",
          "recipient",
          "endUser",
          "about",
          "status",
          "error",
          "attempts",
          "sentAt",
          "failedAt",
          "lastEventAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When we sent it (or tried to)."
          },
          "kind": {
            "type": "string",
            "description": "What the notice is, e.g. `invoice_issued`, `overdue_notice`, `outage_started`. New kinds may be added.",
            "example": "overdue_notice"
          },
          "kindLabel": {
            "type": "string",
            "example": "Overdue Notice"
          },
          "channel": {
            "type": "string",
            "example": "mail"
          },
          "recipient": {
            "type": "string",
            "description": "The address it went to. `Suppressed` for an end user whose contact details are withheld under a family violence record.",
            "example": "accounts@example.com.au"
          },
          "endUser": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number of the end user it went to, or null for a notice to you.",
            "example": "100042"
          },
          "about": {
            "type": [
              "object",
              "null"
            ],
            "description": "What the notice was about, or null.",
            "required": [
              "type",
              "reference"
            ],
            "properties": {
              "type": {
                "type": "string",
                "description": "`invoice`, `creditNote`, `outage` or `payment`; other notices name their own kind of record.",
                "example": "invoice"
              },
              "reference": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The invoice or credit note number, the outage reference, or the payment's amount and date.",
                "example": "INV-104233"
              }
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "sent",
              "failed",
              "delivered",
              "bounced",
              "suppressed"
            ],
            "description": "`suppressed` means not sent, because an earlier notice to the address bounced hard or was marked as spam."
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why it failed, bounced or was suppressed."
          },
          "attempts": {
            "type": "integer"
          },
          "sentAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "failedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "lastEventAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "The mail service's latest report on it (delivered, bounced)."
          }
        }
      },
      "BillingInvoice": {
        "type": "object",
        "description": "One of our invoices to your account, as List Invoices returns it. Money is a decimal dollar string in `currency`. A priced figure carries three fields: without GST, the GST, and with GST.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The invoice's id, as `GET /account/invoices/{invoiceId}` takes it. Opaque: compare it, never parse it.",
            "example": "01jd3z6r9k2m4n8p0q5s7t1v3w"
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the invoice was created, in UTC."
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the invoice last changed, in UTC."
          },
          "type": {
            "type": "string",
            "enum": [
              "invoice"
            ],
            "description": "Always `invoice`. An explicit discriminator matching the `type` field on /account/credit-notes rows."
          },
          "invoiceNumber": {
            "type": "string",
            "example": "INV-000123"
          },
          "status": {
            "type": "string",
            "enum": [
              "paid",
              "unpaid",
              "overdue",
              "void"
            ]
          },
          "total": {
            "type": "string",
            "deprecated": true,
            "description": "This invoice's new charges with GST. Deprecated: read `totalIncGst`.",
            "example": "110.00"
          },
          "totalExGst": {
            "type": "string",
            "description": "This invoice's new charges without GST.",
            "example": "100.00"
          },
          "totalGst": {
            "type": "string",
            "description": "The GST on this invoice's new charges.",
            "example": "10.00"
          },
          "totalIncGst": {
            "type": "string",
            "description": "This invoice's new charges with GST.",
            "example": "110.00"
          },
          "currency": {
            "type": "string",
            "description": "The currency of the invoice amounts.",
            "example": "AUD"
          },
          "periodStart": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The first day of the period the invoice bills."
          },
          "periodEnd": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The last day of the period the invoice bills."
          },
          "previousBalance": {
            "type": "string",
            "description": "The balance carried onto this invoice from before it, with GST, as the invoice prints it.",
            "example": "0.00"
          },
          "amountPaid": {
            "type": "string",
            "description": "The payments applied to this invoice so far, with GST, as the portal's invoice page lists them.",
            "example": "50.00"
          },
          "amountDue": {
            "type": "string",
            "description": "What is still owed on this invoice now, with GST. `0.00` once it is paid or void. A part-paid invoice shows what is left.",
            "example": "60.00"
          },
          "amountDisputed": {
            "type": "string",
            "description": "The part of `amountDue` an open dispute holds off collection and reminders, with GST. `0.00` when nothing is disputed.",
            "example": "0.00"
          },
          "dueDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "issuedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "paidAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "The date the invoice settled. `null` while any amount is still outstanding, and cleared again if a payment is later dishonoured and the invoice reopens. This is the settlement date of the payment that closed the invoice, not the time it was recorded.\n"
          }
        }
      },
      "PaymentCharge": {
        "type": "object",
        "description": "A card or direct debit charge we started on your account, from autopay or Pay Now in the portal. While `inFlight`, it has not reached your balance yet: do not pay the same invoice again.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The charge's public id."
          },
          "invoiceId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The invoice the charge pays, when it pays one."
          },
          "invoiceNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "methodType": {
            "type": "string",
            "enum": [
              "card",
              "direct_debit"
            ]
          },
          "methodLabel": {
            "type": [
              "string",
              "null"
            ],
            "description": "The stored method as the portal names it.",
            "example": "Visa ending 4242"
          },
          "amount": {
            "type": "string",
            "description": "The charge, with GST like the invoice it pays.",
            "example": "110.00"
          },
          "currency": {
            "type": "string",
            "example": "AUD"
          },
          "status": {
            "type": "string",
            "enum": [
              "initiated",
              "pending",
              "succeeded",
              "failed",
              "errored",
              "reversed"
            ],
            "description": "`initiated` and `pending` are in flight. `succeeded` moves to List Payments once it settles. `errored` means the provider's answer was lost; the charge is retried with the same key, so it cannot be taken twice."
          },
          "inFlight": {
            "type": "boolean"
          },
          "startedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "BillingLineDetailRow": {
        "type": "object",
        "description": "One row behind an invoice line. `kind` says which fields it has: a `call` (the calls a usage line charges) or a `burst_settlement` (the 95th percentile behind a transit burst line).",
        "required": [
          "kind"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "call",
              "burst_settlement"
            ]
          },
          "startAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the call started (`call`)."
          },
          "dialled": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number dialled, E.164 without the `+` (`call`).",
            "example": "61298765432"
          },
          "durationSeconds": {
            "type": "integer",
            "description": "The call's length in seconds (`call`)."
          },
          "included": {
            "type": "boolean",
            "description": "The call was inside an included allowance, so it charged nothing (`call`)."
          },
          "chargeExGst": {
            "type": "string",
            "description": "The call's charge without GST, to 4 decimal places as rated (`call`).",
            "example": "0.1250"
          },
          "periodStart": {
            "type": [
              "string",
              "null"
            ],
            "description": "The settlement's first day (`burst_settlement`)."
          },
          "periodEnd": {
            "type": [
              "string",
              "null"
            ],
            "description": "The settlement's last day (`burst_settlement`)."
          },
          "p95InMbps": {
            "type": [
              "number",
              "null"
            ]
          },
          "p95OutMbps": {
            "type": [
              "number",
              "null"
            ]
          },
          "commitMbps": {
            "type": [
              "number",
              "null"
            ]
          },
          "overageMbps": {
            "type": [
              "number",
              "null"
            ]
          },
          "billedMbps": {
            "type": [
              "number",
              "null"
            ],
            "description": "The whole Mbps above the commit that was billed."
          }
        }
      },
      "BillingInvoiceLine": {
        "type": "object",
        "description": "One line of an invoice: what it charges, the service, end user and period it bills, and the rows behind it.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The line's public id, for its detail route and a dispute's `lineId`."
          },
          "description": {
            "type": "string",
            "example": "NBN 100/20 — January 2024"
          },
          "product": {
            "type": [
              "string",
              "null"
            ],
            "description": "The product the line charges for, as the invoice names it.",
            "example": "NBN 100/20"
          },
          "quantity": {
            "type": "integer"
          },
          "unitPrice": {
            "type": "string",
            "deprecated": true,
            "description": "The unit price without GST, to up to 5 decimal places. Deprecated: read `unitPriceExGst`.",
            "example": "49.95"
          },
          "unitPriceExGst": {
            "type": "string",
            "description": "The unit price without GST, to up to 5 decimal places.",
            "example": "49.95"
          },
          "unitPriceGst": {
            "type": "string",
            "description": "The GST on one unit; `0.00` on a GST-free line.",
            "example": "4.995"
          },
          "unitPriceIncGst": {
            "type": "string",
            "description": "The unit price with GST.",
            "example": "54.945"
          },
          "total": {
            "type": "string",
            "deprecated": true,
            "description": "The line total with GST. Deprecated: read `totalIncGst`.",
            "example": "54.95"
          },
          "tax": {
            "type": "string",
            "deprecated": true,
            "description": "The GST on the line. Deprecated: read `totalGst`.",
            "example": "5.00"
          },
          "totalExGst": {
            "type": "string",
            "description": "The line total without GST.",
            "example": "49.95"
          },
          "totalGst": {
            "type": "string",
            "description": "The GST on the line, as the invoice charged it.",
            "example": "5.00"
          },
          "totalIncGst": {
            "type": "string",
            "description": "The line total with GST. Lines add up to the invoice's `totalIncGst`.",
            "example": "54.95"
          },
          "currency": {
            "type": "string",
            "example": "AUD"
          },
          "serviceType": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "data_service",
              "trunk",
              "fax_plan",
              "transit_service",
              "vpn_user",
              null
            ],
            "description": "The kind of service the line bills. Null for an account-level line, or a service the API does not read."
          },
          "serviceRef": {
            "type": [
              "string",
              "null"
            ],
            "description": "The service, named as its own routes name it: a data service's `GET /data/services/{ref}`, a trunk's SIP username, a fax plan's or VPN user's id, a transit service's number. Null for an account-level line.",
            "example": "AVC000123456789"
          },
          "serviceCategory": {
            "type": [
              "string",
              "null"
            ],
            "description": "The broad category the line bills under."
          },
          "endUser": {
            "type": [
              "string",
              "null"
            ],
            "description": "The end user's number when the service belongs to one of your end users.",
            "example": "E-100045"
          },
          "group": {
            "type": [
              "string",
              "null"
            ],
            "description": "The section of the invoice the line prints under.",
            "example": "voice"
          },
          "invoiceGroup": {
            "type": [
              "string",
              "null"
            ],
            "description": "The name of the invoice group you placed the line's service in, as it stood when the invoice was built. Null for a line in no group, which prints under Other.",
            "example": "Brisbane office"
          },
          "invoiceGroupId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The invoice group's public id, as GET /account/invoice-groups names it. Null once the group has been removed.",
            "example": "8d3f1a62-4c9e-4b07-a2d5-6e1b9c7f3a48"
          },
          "invoiceLabel": {
            "type": [
              "string",
              "null"
            ],
            "description": "The service's own billing label when the invoice was built.",
            "example": "Level 3 reception"
          },
          "poNumber": {
            "type": [
              "string",
              "null"
            ],
            "description": "The purchase order number in effect for the line, the service's own or else its group's.",
            "example": "PO-4471"
          },
          "costCentre": {
            "type": [
              "string",
              "null"
            ],
            "description": "The cost centre in effect for the line, the service's own or else its group's.",
            "example": "CC-210"
          },
          "periodStart": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The first day the line bills for. Null for a one-off charge."
          },
          "periodEnd": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The last day the line bills for."
          },
          "detail": {
            "type": "array",
            "description": "The rows behind the line, as the portal opens them: the calls a usage line charges, or a transit burst settlement. At most 50; `detailHref` pages the rest.",
            "items": {
              "$ref": "#/components/schemas/BillingLineDetailRow"
            }
          },
          "detailTotal": {
            "type": "integer",
            "description": "How many rows are behind the line in all."
          },
          "detailHref": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where to page every row when there are more than `detail` carries; null otherwise."
          }
        }
      },
      "InvoiceGroupSection": {
        "type": "object",
        "description": "One section of an issued invoice: an invoice group's lines and subtotal, as the group stood when the invoice was built. Lines in no group are the Other section, with a null `groupId`. Money is in dollars; the subtotal is split ex GST, GST and inc GST.",
        "required": [
          "groupId",
          "name",
          "lineIds",
          "subtotalExGst",
          "subtotalGst",
          "subtotalIncGst",
          "currency"
        ],
        "properties": {
          "groupId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The group's public id; null for Other.",
            "example": "8d3f1a62-4c9e-4b07-a2d5-6e1b9c7f3a48"
          },
          "name": {
            "type": "string",
            "example": "Brisbane office"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "example": "Level 3, 100 Eagle St"
          },
          "poNumber": {
            "type": [
              "string",
              "null"
            ],
            "example": "PO-4471"
          },
          "costCentre": {
            "type": [
              "string",
              "null"
            ],
            "example": "CC-210"
          },
          "lineIds": {
            "type": "array",
            "description": "The public ids of the section's lines, as `lineItems[].id`.",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "example": [
              "2f7c9b14-8a3e-4d61-b5f2-0c9e4a7d1b36"
            ]
          },
          "subtotalExGst": {
            "type": "string",
            "example": "120.00"
          },
          "subtotalGst": {
            "type": "string",
            "example": "12.00"
          },
          "subtotalIncGst": {
            "type": "string",
            "example": "132.00"
          },
          "currency": {
            "type": "string",
            "example": "AUD"
          }
        }
      },
      "BillingPayment": {
        "type": "object",
        "description": "A payment we received on your account, with the invoices it settled.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The payment's id, as the `payment.*` webhook events name it in `paymentId`. Opaque: compare it, never parse it."
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the payment was recorded, in UTC."
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the payment last changed (a reversal), in UTC."
          },
          "type": {
            "type": "string",
            "enum": [
              "payment"
            ],
            "description": "Always `payment`, the discriminator beside invoice rows (`type: invoice`) and credit-note rows (`type: credit_note`). `amount` is unsigned, so treat a payment as a credit by its `type`, not its sign."
          },
          "status": {
            "type": "string",
            "enum": [
              "applied",
              "reversed"
            ],
            "description": "`applied` once the payment is on your account; `reversed` when your bank later dishonoured it and the amount was taken back off."
          },
          "amount": {
            "type": "string",
            "description": "The payment in dollars, as a decimal string with two decimals. A payment has no GST of its own: it pays invoices whose totals include GST, so read it as GST-inclusive.",
            "example": "1250.00"
          },
          "currency": {
            "type": "string",
            "description": "The currency of the payment.",
            "example": "AUD"
          },
          "method": {
            "type": "string",
            "description": "How it was paid: `bank_transfer`, `bpay`, `cheque`, `cash`, `offset` or `other` for a payment our billing team recorded, otherwise the direct-debit gateway that reported it.",
            "example": "bank_transfer"
          },
          "reference": {
            "type": [
              "string",
              "null"
            ],
            "description": "The payment reference as it reached us, if any."
          },
          "paidAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "The payment's value date."
          },
          "invoices": {
            "type": "array",
            "description": "The invoices this payment settled, oldest first, and how much of each.",
            "items": {
              "type": "object",
              "properties": {
                "invoiceId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The invoice's `id`, as on List Invoices."
                },
                "invoiceNumber": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "example": "INV-000123"
                },
                "amount": {
                  "type": "string",
                  "description": "The part of this payment applied to that invoice, in dollars with GST.",
                  "example": "250.00"
                }
              }
            }
          },
          "receiptHref": {
            "type": "string",
            "description": "Our receipt for this payment as a PDF (Get Payment Receipt)."
          }
        }
      },
      "PricingItem": {
        "type": "object",
        "description": "One product at the price you pay us, as the portal's Pricing page shows it, with any volume tiers and the tier your current quantity sits in.",
        "properties": {
          "displayName": {
            "type": "string",
            "description": "The Friendly/Display Name of the Product/Service"
          },
          "setup": {
            "type": "string",
            "deprecated": true,
            "description": "The upfront price without GST. Deprecated: read `setupExGst`.",
            "example": "99.00"
          },
          "setupExGst": {
            "type": "string",
            "example": "99.00"
          },
          "setupGst": {
            "type": "string",
            "example": "9.90"
          },
          "setupIncGst": {
            "type": "string",
            "example": "108.90"
          },
          "rate": {
            "type": "string",
            "deprecated": true,
            "description": "The recurring price without GST. Deprecated: read `rateExGst`.",
            "example": "49.95"
          },
          "rateExGst": {
            "type": "string",
            "description": "The recurring price without GST. On a tiered product, the first tier's price; `tiers` has the rest.",
            "example": "49.95"
          },
          "rateGst": {
            "type": "string",
            "example": "5.00"
          },
          "rateIncGst": {
            "type": "string",
            "example": "54.95"
          },
          "increment": {
            "type": "string",
            "description": "The Billing Interval/Period for the Product/Service"
          },
          "currency": {
            "type": "string",
            "example": "AUD"
          },
          "tiers": {
            "type": "array",
            "description": "Volume tiers, lowest first. Empty for a flat price.",
            "items": {
              "type": "object",
              "properties": {
                "from": {
                  "type": "integer",
                  "description": "The first quantity this tier's price applies to."
                },
                "to": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "The last quantity, or null for the top tier."
                },
                "priceExGst": {
                  "type": "string"
                },
                "priceGst": {
                  "type": "string"
                },
                "priceIncGst": {
                  "type": "string"
                }
              }
            }
          },
          "heldQuantity": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many you hold now, on a tiered product; null otherwise."
          },
          "currentTier": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The tier `heldQuantity` sits in, counting from 1; null for a flat price."
          }
        }
      },
      "AccountUser": {
        "type": "object",
        "description": "A staff login on your wholesale account.",
        "required": [
          "id",
          "firstName",
          "lastName",
          "email",
          "role",
          "isActive",
          "twoFactorEnabled",
          "lastLoginAt",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The user's id, for the user's own routes."
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "role": {
            "type": "string",
            "description": "`owner`, `admin`, `billing` or `readonly`.",
            "example": "admin"
          },
          "isActive": {
            "type": "boolean"
          },
          "twoFactorEnabled": {
            "type": "boolean",
            "description": "Whether the user has a second factor set up."
          },
          "lastLoginAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the user last signed in to the portal, in UTC."
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the login was created, in UTC."
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the login last changed, in UTC."
          }
        }
      },
      "Layer2Destination": {
        "type": "object",
        "description": "A Layer 2 link destination — one of your active customer-interconnect outer VLANs (S-Tags), where a Layer 2 service can be handed off to you.",
        "properties": {
          "interconnectRef": {
            "type": "string",
            "description": "The customer interconnect this destination belongs to."
          },
          "outerVlan": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The POI's tag on the interconnect port, for a per-POI destination. Null for a `0NAT` destination: on a single-tag interconnect each service has its own tag on the port, given when the service is built."
          },
          "poiCode": {
            "type": "string",
            "description": "The Point of Interconnect code. `0NAT` is a reserved code for a single-tag interconnect — one outer VLAN carries all your services across every POI and carrier, rather than a separate tag per POI — and therefore serves both NBN and Opticomm."
          },
          "poiName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The Point of Interconnect name (null for a `0NAT` destination)."
          },
          "carriers": {
            "type": "array",
            "description": "The carrier network(s) this destination serves.",
            "items": {
              "type": "string",
              "enum": [
                "nbn",
                "opticomm"
              ]
            }
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether this is the default destination on its interconnect."
          },
          "portState": {
            "type": "string",
            "description": "The interconnect port's own state, read from our switch every minute. `waiting_for_link` until the port is first up, then `up`, or `down` if it drops. Services can be ordered while it waits for link.",
            "enum": [
              "waiting_for_link",
              "up",
              "down"
            ]
          },
          "lldpNeighbour": {
            "type": [
              "string",
              "null"
            ],
            "description": "The system name your device on the port sends over LLDP, while the port is up. Null when the port is not up or no name is sent."
          }
        }
      },
      "SuspensionTakesEffect": {
        "type": [
          "string",
          "null"
        ],
        "enum": [
          "within 15 minutes",
          "within 1 business day",
          null
        ],
        "description": "On a suspended data service, how soon the suspension takes effect: `within 15 minutes` for a service we cut, a service handed to you at layer 2 on your interconnect included, and `within 1 business day` for an Opticomm L3 service, which the carrier suspends for us. Null while the service is not suspended.",
        "example": "within 15 minutes"
      },
      "ExternalRef": {
        "type": [
          "string",
          "null"
        ],
        "minLength": 1,
        "maxLength": 64,
        "pattern": "^[A-Za-z0-9_.\\-]+$",
        "description": "Your own reference for this object, such as your customer or job id, so you need not keep a map from our ids to yours. Up to 64 letters, digits, `_`, `.` or `-`. Unique on your account for each kind of object (two trunks cannot share one, but a trunk and a ticket can); matched exactly by the list's `externalRef` filter. Set it on create or with PATCH; send null to clear it. Null when none is set.",
        "example": "CUST-1042"
      },
      "Metadata": {
        "type": "object",
        "maxProperties": 20,
        "propertyNames": {
          "minLength": 1,
          "maxLength": 40,
          "pattern": "^[A-Za-z0-9_.\\-]+$"
        },
        "additionalProperties": {
          "type": "string",
          "maxLength": 255
        },
        "description": "Your own key-value pairs on this object: at most 20 keys, each up to 40 letters, digits, `_`, `.` or `-`, each value text of up to 255 characters. We store them and send them back on reads and webhooks; we never act on them. A map you send replaces the one held; send `{}` or null to clear it. An empty object when none is set.",
        "example": {
          "costCentre": "BNE-04",
          "salesRep": "jlee"
        }
      },
      "BookedChangeRef": {
        "type": [
          "object",
          "null"
        ],
        "description": "The change booked on this service or trunk for a later date, as `GET /account/booked-changes` lists it in full, or null when none is. `DELETE /account/booked-changes/{id}` cancels it.",
        "required": [
          "id",
          "kind",
          "effectiveOn"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The booked change's id."
          },
          "kind": {
            "type": "string",
            "enum": [
              "disconnect",
              "planChange"
            ]
          },
          "effectiveOn": {
            "type": "string",
            "format": "date",
            "description": "The day it takes effect."
          }
        }
      },
      "DataService": {
        "description": "One of your data services, on any network, in one shape. Fields we do not hold for a service are null.",
        "type": "object",
        "required": [
          "id",
          "href",
          "network",
          "status",
          "speed"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The product reference: an NBN PRI, or an Opticomm product. Use it, or `serviceId`, to address the service.",
            "example": "PRI000123456789"
          },
          "href": {
            "type": "string",
            "description": "Link to this service on the Check Networks API.",
            "example": "https://api.checknetworks.com.au/data/services/PRI000123456789"
          },
          "network": {
            "type": "string",
            "enum": [
              "nbn",
              "opticomm"
            ],
            "description": "The network that delivers the service."
          },
          "serviceId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The service reference on the network, such as an NBN AVC.",
            "example": "AVC000248080281"
          },
          "status": {
            "type": "string",
            "enum": [
              "Live",
              "Suspended",
              "Cancelled"
            ],
            "description": "Where the service is. A connect still in flight is an order, not a service."
          },
          "suspensionTakesEffect": {
            "$ref": "#/components/schemas/SuspensionTakesEffect"
          },
          "technology": {
            "type": [
              "string",
              "null"
            ],
            "description": "The access technology.",
            "example": "FTTP"
          },
          "speed": {
            "type": "object",
            "description": "The speed of the service's plan, in Mbps.",
            "required": [
              "downMbps",
              "upMbps"
            ],
            "properties": {
              "downMbps": {
                "type": [
                  "integer",
                  "null"
                ],
                "example": 100
              },
              "upMbps": {
                "type": [
                  "integer",
                  "null"
                ],
                "example": 20
              }
            }
          },
          "address": {
            "type": [
              "string",
              "null"
            ],
            "description": "The service address.",
            "example": "1 Example Street, Brisbane QLD 4000"
          },
          "locationId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The premises the service is at, an NBN location id or an Opticomm one.",
            "example": "LOC000079427928"
          },
          "poi": {
            "type": [
              "object",
              "null"
            ],
            "description": "The NBN point of interconnect the service is carried through, where we hold it.",
            "required": [
              "code",
              "name"
            ],
            "properties": {
              "code": {
                "type": "string",
                "example": "4QBR"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "example": "Brisbane"
              }
            }
          },
          "plan": {
            "type": [
              "object",
              "null"
            ],
            "description": "The plan you are billed for, by our SKU and name; before the service has a plan, the SKU it was ordered on, with `name` null.",
            "required": [
              "sku",
              "name"
            ],
            "properties": {
              "sku": {
                "type": "string",
                "example": "CN-NBN-100-40"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "example": "NBN 100/40"
              }
            }
          },
          "customerReference": {
            "type": [
              "string",
              "null"
            ],
            "description": "Your own reference for the service.",
            "example": "CUST-0042"
          },
          "externalRef": {
            "$ref": "#/components/schemas/ExternalRef"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "tags": {
            "type": "array",
            "description": "Your own tags on the service, in the order you set them (PUT /data/services/{ref}/tags). A Connect's tags are carried to the service it builds.",
            "items": {
              "type": "string"
            },
            "example": [
              "Site 12"
            ]
          },
          "radiusUser": {
            "type": [
              "string",
              "null"
            ],
            "description": "The service's RADIUS user reference, for the RADIUS endpoints (GET /data/radius/{ref}).",
            "example": "USR123456789011"
          },
          "endUser": {
            "type": [
              "string",
              "null"
            ],
            "description": "The retail customer you assigned the service to, by its public number, or null.",
            "example": "100042"
          },
          "endUserName": {
            "type": [
              "string",
              "null"
            ],
            "description": "That end user's name, or null.",
            "example": "Acme Pty Ltd"
          },
          "endUserDetail": {
            "type": [
              "object",
              "null"
            ],
            "description": "Present only with `expand=endUser`: the end user in full, or null when the service has none.",
            "required": [
              "endUser",
              "name",
              "type",
              "status",
              "businessName",
              "tradingName",
              "email",
              "phone",
              "externalReference",
              "createdAt"
            ],
            "properties": {
              "endUser": {
                "type": "string",
                "description": "The end user's public number, as `endUser`.",
                "example": "100042"
              },
              "name": {
                "type": "string",
                "example": "Acme Pty Ltd"
              },
              "type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "businessName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tradingName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "externalReference": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Your own reference for the end user."
              },
              "createdAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            }
          },
          "requestedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the service was ordered. The list opens newest first on this."
          },
          "activatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the service went live."
          },
          "cancelledAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the service was disconnected."
          },
          "bookedChange": {
            "$ref": "#/components/schemas/BookedChangeRef"
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the service last changed."
          }
        }
      },
      "DataOrderSummary": {
        "description": "One order as a row of GET /data/orders: enough to act on without reading each order. The whole order is GET /data/orders/{orderId}, its `href`.",
        "type": "object",
        "required": [
          "id",
          "href",
          "type",
          "status",
          "statusReason",
          "network",
          "locationId",
          "orderReference",
          "serviceId",
          "endUser",
          "endUserName",
          "actionRequired",
          "tags",
          "orderedAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The order ID: the carrier's, or a Check Networks PND for an order the carrier does not have yet. The same ID the order read takes.",
            "example": "ORD010258996360"
          },
          "href": {
            "type": "string",
            "description": "Link to the whole order."
          },
          "type": {
            "type": "string",
            "enum": [
              "Connect",
              "Modify",
              "Disconnect"
            ]
          },
          "status": {
            "type": "string",
            "description": "\"InProgress\" covers everything still moving, including an order waiting for you.",
            "enum": [
              "InProgress",
              "Completed",
              "Failed"
            ]
          },
          "statusReason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why a failed order failed, or what an order waiting for you or for Check Networks needs. As on the order read."
          },
          "network": {
            "type": "string",
            "enum": [
              "nbn",
              "opticomm"
            ]
          },
          "locationId": {
            "type": "string",
            "description": "The premises the order is for (LOC",
            "example": "LOC000079427928"
          },
          "orderReference": {
            "type": [
              "string",
              "null"
            ],
            "description": "Your own reference, as supplied when the order was placed."
          },
          "salesReference": {
            "type": [
              "string",
              "null"
            ],
            "description": "The same value as `orderReference`, the order's sales reference."
          },
          "serviceId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The service the order produced (AVC"
          },
          "endUser": {
            "type": [
              "string",
              "null"
            ],
            "description": "The end user the order is for, by its public number, or null.",
            "example": "100042"
          },
          "endUserName": {
            "type": [
              "string",
              "null"
            ],
            "description": "That end user's name, or null.",
            "example": "Acme Pty Ltd"
          },
          "actionRequired": {
            "type": [
              "string",
              "null"
            ],
            "description": "What the order waits for from you, or null: `appointmentRequired` or `ntdFull`. The order read has the detail.",
            "enum": [
              "appointmentRequired",
              "ntdFull",
              null
            ]
          },
          "tags": {
            "type": "array",
            "description": "Your own tags on the order.",
            "items": {
              "type": "string"
            }
          },
          "orderedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the order was placed."
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the order last changed."
          },
          "service": {
            "description": "Present only with `expand=service`, the order's service in the shape of the service list, or null before there is one.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/DataService"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "MetadataInput": {
        "description": "Your own key-value pairs, as `Metadata` describes them. The map you send replaces the one held; `{}` or null clears it.",
        "anyOf": [
          {
            "$ref": "#/components/schemas/Metadata"
          },
          {
            "type": "null"
          }
        ]
      },
      "DataOrderCreate": {
        "type": "object",
        "description": "A Connect order for any data network. Take each value from the Service Qualification for the location (GET /data/sq/{locId}).",
        "required": [
          "locId",
          "bandwidthProductSku",
          "orderReference",
          "informedConsent"
        ],
        "not": {
          "required": [
            "endUser",
            "newEndUser"
          ]
        },
        "properties": {
          "locId": {
            "type": "string",
            "maxLength": 20,
            "description": "The premises: an NBN Location ID (LOC…) or an Opticomm Property ID (OPC…). The location decides which network and product the order is placed as.",
            "example": "LOC000079427928"
          },
          "bandwidthProductSku": {
            "type": "string",
            "maxLength": 64,
            "description": "One of the `availablePlans` SKUs from the Service Qualification.",
            "example": "NBN-BW-TC4-L3-100_20-FTP"
          },
          "orderReference": {
            "type": "string",
            "maxLength": 35,
            "pattern": "^[A-Za-z0-9._-]+$",
            "description": "Your own reference for the order. Sending the same reference again returns the order it already placed rather than placing a second one.",
            "example": "ACME-1042"
          },
          "tags": {
            "type": "array",
            "maxItems": 20,
            "description": "Your own tags on the order, carried to the service it builds (see PUT /data/services/{ref}/tags). Each is trimmed, at most 255 characters, matched ignoring case; at most 20. Checked before anything is sent to the carrier. A retry under the same `orderReference` keeps the tags the order was placed with.",
            "items": {
              "type": "string",
              "maxLength": 255
            },
            "example": [
              "Site 12"
            ]
          },
          "externalRef": {
            "$ref": "#/components/schemas/ExternalRef",
            "description": "Your own reference for the data service this order builds, held on the order and set on the service when it is built (see PATCH /data/services/{ref}). One another of your data services holds, or another open order holds for its service, is a 422 before anything is sent to the carrier. A retry under the same `orderReference` keeps the reference the order was placed with."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataInput",
            "description": "Your own metadata for the data service this order builds, set on it when it is built."
          },
          "informedConsent": {
            "type": "boolean",
            "const": true,
            "description": "Confirms the End User has given Informed Consent for the order."
          },
          "resourceId": {
            "type": "string",
            "maxLength": 32,
            "description": "(Optional) One of the `resources` from the Service Qualification: the NTD or OTD port, or the copper pair, the service runs on.\nLeave it out and we choose: the next free port on an installed NTD; on copper, the one spare pair, or a new line where there is none. Where no NTD is installed, the order waits for an appointment (`order.appointmentRequired`). Where every port is in use, it waits for you to choose a new NTD or a port to take over (`order.ntdFull`): we never order a second NTD unasked. Required on copper with more than one spare pair.",
            "example": "1-UNI-D2"
          },
          "appointmentId": {
            "type": "string",
            "maxLength": 48,
            "description": "(Optional) An appointment you reserved for this location, where the order needs a technician. Without one, such an order waits for it (see `order.appointmentRequired`).",
            "example": "APT000000000000"
          },
          "preferredAppointmentDate": {
            "type": "string",
            "format": "date",
            "description": "(Optional) The first day you would like a technician, should the order need one: today or later, on your account's time zone (or the one you sent in `CN-Time-Zone`). The order's timeslots read (GET /data/orders/{orderId}/timeslots) starts here.",
            "example": "2026-11-09"
          },
          "potsInterconnect": {
            "type": "string",
            "maxLength": 32,
            "description": "(Conditional, copper) The Full National Number (FNN) or Unconditioned Local Loop (ULL) of the phone service being transitioned. Required for an Active Service Class 12 pair, and must not be sent otherwise.",
            "example": "0755512345"
          },
          "priorityAssist": {
            "type": "boolean",
            "default": false,
            "description": "(Optional) Sent to the carrier as its priority assist flag. \"true\" is accepted only for an `endUser` on our Priority Assistance register, or with no `endUser` for your own account or your own end user (made when you register yourself), never another end user's; otherwise the order is refused with a 422 on `priorityAssist` before anything is drafted. A `newEndUser` is never on the register."
          },
          "endUser": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 64,
            "description": "(Optional) The end user the service is for, by its public number. The service, its charges and its usage are then theirs, as an order placed in the portal for them. One of your end users that is not archived; any other number is a 422 and no order is placed.",
            "example": "100042"
          },
          "occupancyDocumentId": {
            "type": "string",
            "format": "uuid",
            "description": "(Optional) On an NBN Connect Outstanding, the `id` of a proof of occupancy uploaded with `POST /data/occupancy-documents`, instead of the old service's id: evidence that the end user occupies the premises. It is kept with the order, and each one is used by one order: a retry with the same `orderReference` may name it again. A retry after a call that stopped before the order was sent keeps it with the order before sending it, unless the order already keeps one. Not with `serviceRef`; another account's, or one another order used, is a 422."
          },
          "bundleId": {
            "type": "string",
            "format": "uuid",
            "description": "(Optional) An open bundle to add the order to, as a draft that is placed when the bundle is submitted. A bundle that has been submitted, or is not yours, is a 422. A bundle that already holds 200 draft orders, the most one may, is a 422 with code `bundle_draft_limit`, and no draft is made."
          },
          "newEndUser": {
            "type": "object",
            "description": "(Optional) A new end user to make and order for in this one call, instead of `endUser`; never both. It takes the same fields and rules as creating an end user. Both parts are checked before anything is made; if the order is refused, the end user is not kept and the answer is the order's 422. The end user's welcome email goes only once the order is accepted. A retry with the same Idempotency-Key returns the same end user and order. The response's `endUser` is the new end user's number."
          },
          "endUserType": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "Residential",
              "Business",
              null
            ],
            "description": "(Optional) What the carrier is told the premises is. Left out, it is taken from the end user's own type, as the portal does."
          },
          "addons": {
            "description": "(Optional) The add-on products to sell with the service, each with a quantity. Only the add-ons the portal offers for the chosen plan may be sent; any other is a 422. Left out, the order carries the plan's default add-ons, as the portal ticks them; an empty list carries none. Each starts billing when the carrier accepts the order.",
            "anyOf": [
              {
                "type": "array",
                "maxItems": 50,
                "items": {
                  "type": "object",
                  "required": [
                    "productId"
                  ],
                  "properties": {
                    "productId": {
                      "type": "string",
                      "format": "uuid",
                      "description": "The add-on product's public id, as an order's `addons` show it (GET /data/orders/{orderId}).",
                      "example": "6f1c2a9e-4b7d-4e2a-9c1f-2d8b5e7a3c10"
                    },
                    "quantity": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 999,
                      "default": 1
                    }
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "restorationSlaSku": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 64,
            "description": "(Optional, NBN) The restoration SLA, one the chosen plan allows at this location; the standard SLA when left out. Refused on an Opticomm order.",
            "example": "NBN-RSLA-STANDARD"
          },
          "staticIp": {
            "type": "boolean",
            "default": false,
            "description": "(Optional) A static IPv4 address rather than one from the dynamic pool. A monthly charge applies."
          },
          "ipv6": {
            "type": "boolean",
            "default": true,
            "description": "(Optional) IPv6 (a framed /64 and a delegated prefix). Free, and on unless you turn it off."
          },
          "install": {
            "type": "string",
            "enum": [
              "existing",
              "new",
              "additional",
              "fibreUplift"
            ],
            "default": "existing",
            "description": "(Optional) How the service reaches the premises:\n\n- `existing`: on a port or pair already there (`resourceId`, or the one we choose).\n- `new`: a new NTD, OTD or copper pair, where the Service Qualification offers a new install.\n- `additional`: another NTD, OTD or pair beside the ones in use, where it offers an additional install.\n- `fibreUplift`: (NBN) a Fibre Uplift, where the Service Qualification says `upliftAvailable`: nbn replaces the premises' copper (FTTN, FTTB or FTTC) access with fibre, on a new NTD. A 12-month term applies.\n\nA `new` or `additional` install takes no `resourceId` and needs a\ntechnician appointment, on NBN and Opticomm alike: without an\n`appointmentId` the order waits for one (`order.appointmentRequired`).\nIt is a 422 where the location does not offer it.\n\nA `fibreUplift` takes no `resourceId`, `transferType` or `serviceRef`,\nand is ordered on an uplift plan: a `bandwidthProductSku` ending\n`-UPL`. Any other plan is a 422, and an uplift plan on any other order\nis too. nbn's own uplift qualification (GET\n/nbn/service_qualification/fibre_uplift) is read again before the\norder is drafted, and a location it no longer offers is a 422. A\ntechnician installs the NTD: without an `appointmentId` the order\nwaits for one (`order.appointmentRequired`). Its timeslots (GET\n/data/orders/{orderId}/timeslots) are the uplift's own; reserve one\nwith `alternativeTechnology` `Fibre` (POST /nbn/appointments/reserve).\n"
          },
          "transferType": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "Service Transfer",
              "Service Transfer Reversal",
              "Connect Outstanding",
              null
            ],
            "description": "(Optional) Take over a service another provider has at the premises, in this one call. On NBN, as the NBN order routes take it, with `serviceRef` and `customerAuthorityDate`. On Opticomm, `Service Transfer` or `Service Transfer Reversal` with `customerAuthorityDate` and no `serviceRef`."
          },
          "serviceRef": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 32,
            "description": "(Conditional, NBN transfer) The AVC of the service being taken over.",
            "example": "AVC000012345678"
          },
          "customerAuthorityDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "(Conditional, transfer) The day the end user authorised the transfer. Required with `transferType`. Today or earlier, on your account's time zone (or the one you sent in `CN-Time-Zone`).",
            "example": "2026-11-20"
          }
        }
      },
      "DataOrder": {
        "description": "An order for a data service, in carrier-agnostic form.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The order ID: the carrier's, or a Check Networks PND for an order the carrier does not have yet: one waiting for your appointment or port (see actionRequired), or an NBN order awaiting Check Networks validation (see statusReason). That PND keeps finding the order after the carrier gives it an ID.",
            "example": "ORD010258996360"
          },
          "href": {
            "type": "string",
            "description": "Link to this order on the Check Networks API."
          },
          "type": {
            "type": "string",
            "description": "What the order does.",
            "enum": [
              "Connect",
              "Modify",
              "Disconnect"
            ],
            "example": "Connect"
          },
          "status": {
            "type": "string",
            "description": "Where the order has got to. \"InProgress\" covers everything still moving, including an order awaiting an appointment.",
            "enum": [
              "InProgress",
              "Completed",
              "Failed"
            ],
            "example": "InProgress"
          },
          "statusReason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why a failed order failed. For an InProgress NBN order that NBN could not accept as Check Networks sent it, \"Awaiting Check Networks validation\": the fault is ours, nothing is needed from you, and Check Networks will correct and resubmit it; it ends Failed only if it cannot be placed. For an order waiting for you, what it needs (see actionRequired). Null otherwise."
          },
          "actionRequired": {
            "type": [
              "object",
              "null"
            ],
            "description": "What an order waiting for you needs, or null. Nothing has been sent to the carrier; answer it with PATCH /data/orders/{orderId}.",
            "required": [
              "reason",
              "timeslotsHref",
              "expiresAt"
            ],
            "properties": {
              "reason": {
                "type": "string",
                "description": "\"appointmentRequired\": a technician is needed; attach an appointment. \"ntdFull\": every port on the NTD is in use; attach an appointment for a new NTD, or name a port to take over.",
                "enum": [
                  "appointmentRequired",
                  "ntdFull"
                ]
              },
              "demandType": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The appointment type a technician visit for this order needs.",
                "example": "Standard Install"
              },
              "timeslotsHref": {
                "type": "string",
                "description": "The order's timeslots read."
              },
              "expiresAt": {
                "type": "string",
                "format": "date-time",
                "description": "When the order is cancelled if it is still waiting."
              }
            }
          },
          "preferredAppointmentDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The first day you would like a technician, as you placed the order."
          },
          "network": {
            "type": "string",
            "description": "The network delivering the service.",
            "enum": [
              "nbn",
              "opticomm"
            ],
            "example": "nbn"
          },
          "locationId": {
            "type": "string",
            "description": "The premises the order is for (LOC",
            "example": "LOC000079427928"
          },
          "orderReference": {
            "type": [
              "string",
              "null"
            ],
            "description": "Your own reference, as supplied when the order was placed."
          },
          "salesReference": {
            "type": [
              "string",
              "null"
            ],
            "description": "The same value as `orderReference`, the order's sales reference."
          },
          "bandwidthProductSku": {
            "type": [
              "string",
              "null"
            ],
            "description": "The bandwidth product ordered."
          },
          "serviceId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The service the order produced (AVC # or OVC #), once the carrier has assigned one."
          },
          "appointmentId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The appointment attached to this order, if any."
          },
          "tags": {
            "type": "array",
            "description": "Your own tags on the order, as placed with POST /data/orders. They are carried to the service it builds.",
            "items": {
              "type": "string"
            },
            "example": [
              "Site 12"
            ]
          },
          "orderedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the order was placed."
          },
          "completedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the order completed."
          },
          "endUser": {
            "type": [
              "string",
              "null"
            ],
            "description": "The end user the order is for, by its public number, or null.",
            "example": "100042"
          },
          "endUserName": {
            "type": [
              "string",
              "null"
            ],
            "description": "That end user's name, or null.",
            "example": "Acme Pty Ltd"
          },
          "endUserType": {
            "type": [
              "string",
              "null"
            ],
            "description": "What the carrier was told the premises is.",
            "example": "Residential"
          },
          "address": {
            "type": [
              "string",
              "null"
            ],
            "description": "The premises as qualified, or null where we hold no address for the location.",
            "example": "1 Example Street, Brisbane City QLD 4000"
          },
          "poi": {
            "type": [
              "string",
              "null"
            ],
            "description": "The Point of Interconnect the service is delivered through.",
            "example": "4BRS"
          },
          "plan": {
            "type": [
              "object",
              "null"
            ],
            "required": [
              "sku",
              "name"
            ],
            "properties": {
              "sku": {
                "type": "string",
                "example": "NBN-BW-TC4-L3-100_20-FTP"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Our product's name for the plan, as the portal names it; null where no product sells the SKU.",
                "example": "NBN 100/20"
              }
            }
          },
          "restorationSlaSku": {
            "type": [
              "string",
              "null"
            ],
            "description": "The restoration SLA ordered (NBN), or null for the standard one."
          },
          "addons": {
            "type": "array",
            "description": "The add-ons sold with the service.",
            "items": {
              "type": "object",
              "required": [
                "productId",
                "name",
                "quantity"
              ],
              "properties": {
                "productId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "The add-on product's public id.",
                  "example": "6f1c2a9e-4b7d-4e2a-9c1f-2d8b5e7a3c10"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "example": "Static IPv4"
                },
                "quantity": {
                  "type": "integer",
                  "minimum": 1,
                  "example": 1
                }
              }
            }
          },
          "staticIp": {
            "type": "boolean",
            "description": "Whether a static IPv4 address was ordered."
          },
          "ipv6": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether IPv6 was ordered; null where the order does not say."
          },
          "price": {
            "type": [
              "object",
              "null"
            ],
            "description": "The monthly charge and the one-off charges the order will start: the plan and each add-on times its quantity, at your prices. Null for a key without `billing:read`, or where the plan is not priced for you.",
            "required": [
              "currency",
              "monthlyExGst",
              "monthlyGst",
              "monthlyIncGst",
              "oneOffExGst",
              "oneOffGst",
              "oneOffIncGst"
            ],
            "properties": {
              "currency": {
                "type": "string",
                "example": "AUD"
              },
              "monthlyExGst": {
                "type": "string",
                "example": "79.00"
              },
              "monthlyGst": {
                "type": "string",
                "example": "7.90"
              },
              "monthlyIncGst": {
                "type": "string",
                "example": "86.90"
              },
              "oneOffExGst": {
                "type": "string",
                "example": "0.00"
              },
              "oneOffGst": {
                "type": "string",
                "example": "0.00"
              },
              "oneOffIncGst": {
                "type": "string",
                "example": "0.00"
              }
            }
          },
          "contacts": {
            "description": "The contacts given for the install; null where the order holds none.",
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "customerRequiredDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The carrier's customer required date, where it has one."
          },
          "events": {
            "type": "array",
            "description": "The order's timeline, oldest first: its state changes, the carrier's progress and appointment updates, and its notes.",
            "items": {
              "type": "object",
              "required": [
                "at",
                "kind",
                "description"
              ],
              "properties": {
                "at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "stateChange",
                    "carrierUpdate",
                    "appointment",
                    "note"
                  ]
                },
                "description": {
                  "type": "string",
                  "example": "Order Submitted"
                }
              }
            }
          },
          "createdBy": {
            "type": [
              "string",
              "null"
            ],
            "description": "Who placed the order: the portal user's name, or the name of the API\nkey that placed it through `POST /data/orders`. Null where we hold\nneither (an API order placed before 21 Nov 2026).\n"
          },
          "service": {
            "description": "Present only with `expand=service`: the service the order is for, in the shape of the service list (GET /data/services), or null before there is one.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/DataService"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "DraftOrderPrice": {
        "type": "object",
        "description": "A draft data order's price today: the monthly charge and the one-off charges it will start, at your prices, each ex GST, GST and inc GST, as a data order's `price`.",
        "required": [
          "currency",
          "monthlyExGst",
          "monthlyGst",
          "monthlyIncGst",
          "oneOffExGst",
          "oneOffGst",
          "oneOffIncGst"
        ],
        "properties": {
          "currency": {
            "type": "string",
            "example": "AUD"
          },
          "monthlyExGst": {
            "type": "string",
            "example": "79.00"
          },
          "monthlyGst": {
            "type": "string",
            "example": "7.90"
          },
          "monthlyIncGst": {
            "type": "string",
            "example": "86.90"
          },
          "oneOffExGst": {
            "type": "string",
            "example": "99.00"
          },
          "oneOffGst": {
            "type": "string",
            "example": "9.90"
          },
          "oneOffIncGst": {
            "type": "string",
            "example": "108.90"
          }
        }
      },
      "CheckoutBlockedReason": {
        "type": "string",
        "description": "Why a draft data order in a bundle cannot be checked out now, one of a closed set, the first that applies in this order: `refused_by_rules` (it is no longer a draft, the plan is no longer offered, your account cannot place orders, or another order is open at the location); `incomplete` (no plan, no NTD port, or no informed consent); `needs_appointment` (a technician is needed and no appointment is booked, or its reservation has lapsed); `qualification_expired` (the site was qualified too long ago: qualify it again and add a new draft); `price_changed` (the price today is above the price the draft was added at: accept it with `acceptNewPrice` on `PATCH /bundles/{id}/items/{itemId}`). A price that fell is not a block: the draft goes at the lower price.",
        "enum": [
          "refused_by_rules",
          "incomplete",
          "needs_appointment",
          "qualification_expired",
          "price_changed"
        ],
        "example": "price_changed"
      },
      "BundleItem": {
        "type": "object",
        "description": "One item of a bundle: a data order, a number order or a voice trunk, in the bundle's order.",
        "required": [
          "id",
          "kind",
          "href",
          "label",
          "position",
          "waitsForPrevious",
          "state",
          "waitingFor",
          "outcomeReason",
          "price",
          "canCheckout",
          "checkoutBlockedReason",
          "checkoutBlockedMessage",
          "draftRemoval"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The item's own id: a data order's carrier order id once placed, else its `PND` reference; a number order's `id`; a trunk's id in the bundle, which `POST /numbers` takes as `trunk` to put numbers on it.",
            "example": "PND000000000901"
          },
          "kind": {
            "type": "string",
            "enum": [
              "dataOrder",
              "numberOrder",
              "trunk"
            ]
          },
          "href": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "Where the item is read on its own: the data order once the carrier has it, the number order, or the trunk once it is set up. Null until then."
          },
          "label": {
            "type": "string",
            "description": "What the portal calls the item.",
            "example": "Data order PND000000000901"
          },
          "position": {
            "type": "integer",
            "minimum": 1,
            "description": "Its place in the bundle; 1 is first."
          },
          "waitsForPrevious": {
            "type": "boolean",
            "description": "Whether it starts only once every item above it has completed. Numbers on the bundle's own trunk always do."
          },
          "state": {
            "type": "string",
            "enum": [
              "draft",
              "inProgress",
              "completed",
              "failed"
            ],
            "description": "`draft` until it is released, `inProgress` once it has been sent (also while we resend an order the carrier asked us to try again), then `completed`, or `failed` when it ended without completing."
          },
          "waitingFor": {
            "type": "array",
            "description": "The ids of the items above it it is still waiting on.",
            "items": {
              "type": "string"
            }
          },
          "outcomeReason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why it ended without completing, or null."
          },
          "price": {
            "description": "A draft data order's price today. When `checkoutBlockedReason` is `price_changed`, this is the new price to accept. Null for any other item, for a draft with no plan or one your prices do not cover, and for a key without `billing:read`.",
            "anyOf": [
              {
                "$ref": "#/components/schemas/DraftOrderPrice"
              },
              {
                "type": "null"
              }
            ]
          },
          "canCheckout": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether this draft data order can be checked out now. Null for any item that is not a draft data order still to be sent."
          },
          "checkoutBlockedReason": {
            "description": "Why it cannot be checked out now, and the reason a submit that names it refuses it with. Null when it can, and for any item that is not a draft data order still to be sent.",
            "anyOf": [
              {
                "$ref": "#/components/schemas/CheckoutBlockedReason"
              },
              {
                "type": "null"
              }
            ]
          },
          "checkoutBlockedMessage": {
            "type": [
              "string",
              "null"
            ],
            "description": "What to do about `checkoutBlockedReason`, in words for this draft.",
            "example": "The price has gone up since this draft was added. Accept the new price to check it out."
          },
          "draftRemoval": {
            "type": [
              "object",
              "null"
            ],
            "description": "When this draft is removed if it is not checked out. Null for anything that is never removed: a delayed order, an order the carrier already has, a draft that has been checked out, a number order or a trunk.",
            "required": [
              "removesAt",
              "keepLimit",
              "canKeep"
            ],
            "properties": {
              "removesAt": {
                "type": "string",
                "format": "date-time"
              },
              "keepLimit": {
                "type": "string",
                "format": "date-time",
                "description": "The latest Keep (`POST /bundles/{id}/keep`) can take it to, 90 days from when it was made."
              },
              "canKeep": {
                "type": "boolean",
                "description": "Whether Keep would move `removesAt` later."
              }
            }
          }
        }
      },
      "DelayedOrderItem": {
        "properties": {
          "id": {
            "type": "string",
            "description": "The Check Networks Delayed Order Reference #"
          },
          "carrier": {
            "type": "string",
            "description": "The network the order will be placed on when it submits.",
            "example": "opticomm"
          },
          "status": {
            "type": "string",
            "description": "The status of the Delayed Order",
            "example": "Delayed",
            "enum": [
              "Delayed"
            ]
          },
          "submitDateTime": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When this Delayed Order submits; null while it is held for you: it was not sent at its time and needs you (see `heldForAction` on `order.delayed`). Submit it now, give it a new time, or cancel it."
          }
        },
        "type": "object"
      },
      "endUser": {
        "type": [
          "string",
          "null"
        ],
        "maxLength": 64,
        "description": "(Optional) The end user the service is for, by its public number. The service, its charges and its usage are then theirs, as an order placed in the portal for them. One of your end users that is not archived; any other number is a 422 and no order is placed.",
        "example": "100042"
      },
      "addons": {
        "description": "(Optional) The add-on products to sell with the service, each with a quantity. Only the add-ons the portal offers for the chosen plan may be sent; any other is a 422. Left out, the order carries the plan's default add-ons, as the portal ticks them; an empty list carries none. Each starts billing when the carrier accepts the order.",
        "anyOf": [
          {
            "type": "array",
            "maxItems": 50,
            "items": {
              "type": "object",
              "required": [
                "productId"
              ],
              "properties": {
                "productId": {
                  "type": "string",
                  "format": "uuid",
                  "description": "The add-on product's public id, as an order's `addons` show it (GET /data/orders/{orderId}).",
                  "example": "6f1c2a9e-4b7d-4e2a-9c1f-2d8b5e7a3c10"
                },
                "quantity": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 999,
                  "default": 1
                }
              }
            }
          },
          {
            "type": "null"
          }
        ]
      },
      "DataDelayedOrderCreate": {
        "type": "object",
        "required": [
          "opcId",
          "bandwidthProductSku",
          "orderReference"
        ],
        "properties": {
          "opcId": {
            "type": "string",
            "description": "The Opticomm Property ID (OPC #) for the premises the order is for. Use an \"/opticomm/address/search\" request to retrieve this for an address.",
            "example": "OPC000000016441"
          },
          "bandwidthProductSku": {
            "type": "string",
            "example": "Opt-WSL3-500-50",
            "description": "Product SKU of the Bandwidth Product being ordered.\nUse the `productAvailability` list from an Opticomm Service Qualification request to find selectable options for the property (OPC #).\n"
          },
          "orderReference": {
            "type": "string",
            "example": "PO-2026-04821",
            "maxLength": 45,
            "description": "Your Reference Number for this order. Max of 45 characters.\nOnly alphabetic characters (\"a-Z\"), numbers (\"0-9\"), underscores (\"_\"), hyphens (\"-\") and periods (\".\") are allowed.\n"
          },
          "portId": {
            "type": "string",
            "description": "(Optional) The NTD UNI-D port to deliver the service on. Use the Service Qualification response's `ntd.dataPorts` to find a Free port. When omitted, the first free port is selected.",
            "example": "1-UNI-D2"
          },
          "appointmentId": {
            "type": "string",
            "description": "(Conditional) A reserved installation appointment for the property. Required when the Service Qualification response indicates `appointmentRequired` (typically Service Class 2 premises)."
          },
          "transferType": {
            "type": "string",
            "description": "(Conditional) Set for a service-transfer (churn) order — taking over an active service at the property from another provider.",
            "enum": [
              "Service Transfer",
              "Service Transfer Reversal"
            ]
          },
          "customerAuthorityDate": {
            "type": "string",
            "format": "date-time",
            "description": "(Conditional) The date Customer Authority was obtained from the end user. Mandatory for, and only relevant to, Service Transfer orders. Must be less than 45 days old."
          },
          "plannedCompletionDate": {
            "type": "string",
            "format": "date",
            "description": "(Optional) The earliest date the order should complete. When omitted, the order completes as soon as possible."
          },
          "endUser": {
            "$ref": "#/components/schemas/endUser"
          },
          "endUserType": {
            "type": "string",
            "description": "(Optional) The end-user type for the service. Left out, it is taken from the end user's own type, as the portal does.",
            "enum": [
              "Residential",
              "Business"
            ]
          },
          "addons": {
            "$ref": "#/components/schemas/addons"
          },
          "priorityAssist": {
            "type": "boolean",
            "description": "(Optional) Sent to the carrier as its priority assist flag. Defaults to false. \"true\" is accepted only for a customer on our Priority Assistance register (the `endUser`, or when none is named your own account or your own end user, never another end user's); otherwise the order is refused with a 422 on `priorityAssist` before anything is held."
          }
        }
      },
      "DataDelayedOrder": {
        "type": "object",
        "description": "A held (Delayed) order in full — the create-time fields plus the scheduled submission time. The hold is Check Networks' own: nothing has been sent to any carrier, which is why the reference is a Check Networks pending reference rather than a carrier order id.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The Check Networks Delayed Order Reference #",
            "example": "PND000000000000"
          },
          "carrier": {
            "type": "string",
            "description": "The network the order will be placed on when it submits.",
            "example": "opticomm"
          },
          "orderType": {
            "type": "string",
            "enum": [
              "Connect",
              "Disconnect",
              "Modify"
            ]
          },
          "state": {
            "type": "string",
            "description": "Always Delayed while the order is held.",
            "enum": [
              "Delayed"
            ]
          },
          "orderReference": {
            "type": "string",
            "example": "PO-2026-04821",
            "description": "Your reference supplied when the order was created."
          },
          "salesReference": {
            "type": [
              "string",
              "null"
            ],
            "example": "PO-2026-04821",
            "description": "The same value as `orderReference`, the order's sales reference."
          },
          "propertyId": {
            "type": "string",
            "description": "The network's property reference the order is for — an Opticomm Property ID (OPC #) or an nbn Location ID (LOC #).",
            "example": "OPC000000016441"
          },
          "bandwidthProductSku": {
            "type": [
              "string",
              "null"
            ],
            "example": "Opt-WSL3-500-50",
            "description": "The Bandwidth Product SKU ordered."
          },
          "orderDate": {
            "type": "string",
            "format": "date-time",
            "description": "When the order was created."
          },
          "submitDateTime": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the order is scheduled to submit; null while it is held for you: it was not sent at its time and needs you. Submit it now, give it a new time, or cancel it."
          }
        }
      },
      "DataOrderAnswer": {
        "type": "object",
        "description": "What an order waiting for you needs: an appointment, or a port to take over. Send `appointmentId` or `resourceId`.",
        "properties": {
          "appointmentId": {
            "type": "string",
            "maxLength": 48,
            "description": "An appointment you reserved from the order's timeslots (GET /data/orders/{orderId}/timeslots). On an NTD with no free port, a technician installs another NTD on it.",
            "example": "APT000000000000"
          },
          "resourceId": {
            "type": "string",
            "maxLength": 32,
            "description": "On an NTD with no free port: the port to take over, from the Service Qualification's `resources`.",
            "example": "1-UNI-D2"
          },
          "serviceId": {
            "type": "string",
            "maxLength": 32,
            "description": "The service on that port, taken over by this order (the AVC on NBN).",
            "example": "AVC000123456789"
          },
          "customerAuthorityDate": {
            "type": "string",
            "format": "date",
            "description": "When the End User authorised taking the service over. Required with `serviceId`.",
            "example": "2026-10-28"
          }
        }
      },
      "DataProvisioningRecord": {
        "description": "A provisioning request: what was configured for a service, what we allocated for it, and whether it is live yet.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The provisioning request reference.",
            "example": "PRQ123456789011"
          },
          "href": {
            "type": "string",
            "description": "Link to this provisioning request on the Check Networks API."
          },
          "orderId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The order this provisioning belongs to.",
            "example": "ORD010258996360"
          },
          "status": {
            "type": "string",
            "enum": [
              "Pending",
              "Complete"
            ],
            "description": "Pending while the carrier is still working the order; Complete once the service is built and everything below is final."
          },
          "deliveryMode": {
            "type": "string",
            "enum": [
              "l2",
              "l3"
            ],
            "description": "How the service is handed to you."
          },
          "protocol": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "IPoE",
              "PPPoE"
            ],
            "description": "The Layer 3 session protocol. Null for Layer 2."
          },
          "staticIp": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the IPv4 address is held stable. Null for Layer 2."
          },
          "ipv6": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether IPv6 is provisioned. Null for Layer 2."
          },
          "handoff": {
            "type": [
              "string",
              "null"
            ],
            "description": "Layer 2 only — the interconnect this service hands off on."
          },
          "sTag": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Layer 2 only — the outer VLAN."
          },
          "cTag": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Layer 2 only — the inner VLAN. Your chosen one while pending, the allocated one once complete."
          },
          "pppoeUsername": {
            "type": [
              "string",
              "null"
            ],
            "description": "PPPoE only — the login the CPE dials with, once it exists."
          },
          "serviceId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The service this produced (AVC"
          }
        }
      },
      "DataProvisioningResult": {
        "type": "object",
        "required": [
          "result"
        ],
        "properties": {
          "result": {
            "type": "object",
            "properties": {
              "id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The provisioning request reference — track it on GET /data/provisioning/{ref}."
              },
              "orderNumber": {
                "type": "string",
                "description": "The order the configuration was applied to."
              },
              "deliveryMode": {
                "type": "string",
                "enum": [
                  "l2",
                  "l3"
                ],
                "description": "How the service will be handed to you."
              },
              "protocol": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "IPoE",
                  "PPPoE"
                ],
                "description": "The Layer 3 session protocol. Null for Layer 2."
              },
              "staticIp": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "Whether the IPv4 address is held stable. Null for Layer 2."
              },
              "ipv6": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "Whether IPv6 will be provisioned. Null for Layer 2."
              },
              "pppoeUsername": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "PPPoE only — the full login the CPE dials with, once it exists. Null until the carrier accepts the order and the service is built."
              },
              "pppoeRealm": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "PPPoE only — your account's realm."
              },
              "sTag": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Layer 2 only — the outer VLAN (S-Tag) your service is handed off on."
              },
              "cTag": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Layer 2 only — the inner VLAN (C-Tag) for this service. Null until it is allocated, unless you chose one."
              },
              "status": {
                "type": "string",
                "enum": [
                  "Pending",
                  "Complete"
                ],
                "description": "Whether the service is built. Pending while the carrier is still working the order; Complete once it is done and the tags are final."
              },
              "handoff": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Layer 2 only — the interconnect in use, or the string `accountDefault` when your default destination for the POI was chosen."
              }
            }
          }
        }
      },
      "DataServiceDetail": {
        "description": "One of your data services, with its live status.",
        "allOf": [
          {
            "$ref": "#/components/schemas/DataService"
          },
          {
            "type": "object",
            "required": [
              "session",
              "contract"
            ],
            "properties": {
              "contract": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "The service's contract term, as the portal's Contract Term card shows it: when it ends, and what disconnecting today would charge, the plan's and every add-on's together. Null for a service with no term. For another cease date, GET /data/services/{ref}/disconnect-quote.",
                "required": [
                  "termEndsOn",
                  "currency",
                  "earlyTerminationChargeExGst",
                  "earlyTerminationChargeGst",
                  "earlyTerminationChargeIncGst",
                  "earlyTerminationChargeWaived"
                ],
                "properties": {
                  "termEndsOn": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date",
                    "example": "2027-09-21"
                  },
                  "currency": {
                    "type": "string",
                    "example": "AUD"
                  },
                  "earlyTerminationChargeExGst": {
                    "type": "string",
                    "description": "Dollars, ex GST. `0.00` once the term has ended, or when the charge was waived.",
                    "example": "123.45"
                  },
                  "earlyTerminationChargeGst": {
                    "type": "string",
                    "example": "12.35"
                  },
                  "earlyTerminationChargeIncGst": {
                    "type": "string",
                    "example": "135.80"
                  },
                  "earlyTerminationChargeWaived": {
                    "type": "boolean",
                    "description": "True when we waived the early termination charge: the charge is `0.00` though the service is still in its term, and a disconnect charges nothing."
                  }
                }
              },
              "session": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "Whether the service is connected right now. Null for a service that is not Live.",
                "required": [
                  "status",
                  "online",
                  "source"
                ],
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "Available",
                      "Unavailable",
                      "OnRequest",
                      "NotOnOurRadius"
                    ],
                    "description": "`Available`: `online` answers. `Unavailable`: the network did not answer just now; try again. `OnRequest`: this network has no live status we can read without starting a test there; ask GET /data/radius/{ref}/online with the service's `radiusUser`. `NotOnOurRadius`: the service is handed to you at layer 2 on your interconnect and never logs on to our RADIUS, so it has no live status here."
                  },
                  "online": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "description": "Whether a session is up. Null unless `status` is Available."
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "checknetworks",
                      "kinetix",
                      "opticomm",
                      "carrier",
                      "handoff"
                    ],
                    "description": "Where the status was read."
                  }
                }
              }
            }
          }
        ]
      },
      "DataServiceUsage": {
        "description": "One month of a service's data usage, by day. Usage is reported, never charged.",
        "type": "object",
        "required": [
          "id",
          "period",
          "from",
          "to",
          "complete",
          "downloadBytes",
          "uploadBytes",
          "totalBytes",
          "allowanceBytes",
          "days"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The service's product reference.",
            "example": "PRI000123456789"
          },
          "period": {
            "type": "string",
            "description": "The month, `YYYY-MM`.",
            "example": "2026-10"
          },
          "from": {
            "type": "string",
            "format": "date-time",
            "description": "The start of the billing month, on your bill's time zone (or the one you sent in `CN-Time-Zone`), with its offset.",
            "example": "2026-10-01T00:00:00+10:00"
          },
          "to": {
            "type": "string",
            "format": "date-time",
            "description": "The end of the billing month, or now for the current month, on the same zone as `from`.",
            "example": "2026-10-31T23:59:59+10:00"
          },
          "complete": {
            "type": "boolean",
            "description": "False for the current month, which is still counting."
          },
          "downloadBytes": {
            "type": "integer",
            "description": "Bytes sent to the service."
          },
          "uploadBytes": {
            "type": "integer",
            "description": "Bytes sent from the service."
          },
          "totalBytes": {
            "type": "integer"
          },
          "allowanceBytes": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The plan's included data, if it has a figure; null for unlimited."
          },
          "days": {
            "type": "array",
            "description": "One entry per day with usage, oldest first.",
            "items": {
              "type": "object",
              "required": [
                "date",
                "downloadBytes",
                "uploadBytes"
              ],
              "properties": {
                "date": {
                  "type": "string",
                  "format": "date",
                  "description": "The day, on the same zone as `from`.",
                  "example": "2026-10-01"
                },
                "downloadBytes": {
                  "type": "integer"
                },
                "uploadBytes": {
                  "type": "integer"
                }
              }
            }
          }
        }
      },
      "NetworkOutage": {
        "description": "One entry from the Check Networks outage register, as published under the Telecommunications (Customer Communications for Outages) Industry Standard 2024 (Part 4), or a planned maintenance window you were sent notice of. Field values match the public register at https://status.checknetworks.tools. For a planned window, `startedAt` and `estimatedRestorationAt` are the window's start and end, and `additionalInfo` describes its impact.",
        "properties": {
          "reference": {
            "type": "string",
            "description": "The Check Networks outage reference",
            "example": "OUT-4K7P2M"
          },
          "title": {
            "type": "string",
            "description": "Short plain-English description of the outage",
            "example": "Fibre break affecting Ballarat exchange"
          },
          "type": {
            "type": "string",
            "description": "Whether the outage is planned maintenance or an unplanned outage",
            "enum": [
              "planned",
              "unplanned"
            ]
          },
          "severity": {
            "type": [
              "string",
              "null"
            ],
            "description": "For an unplanned outage, its class under the Standard: `major` (at least 100,000 services or a whole State, for more than 60 minutes) or `significant_local` (at least 1,000 regional or 250 remote services, for more than 6 or 3 hours). Null for planned maintenance.",
            "enum": [
              "major",
              "significant_local",
              null
            ]
          },
          "status": {
            "type": "string",
            "description": "Whether the outage is still in progress or has been resolved",
            "enum": [
              "open",
              "resolved"
            ]
          },
          "startedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the outage began, in UTC like every time the API returns"
          },
          "resolvedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When service was restored. Null while the outage is open."
          },
          "estimatedRestorationAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Current estimate for restoration. Null when no estimate is available yet — absence of an estimate is itself meaningful and is not a placeholder."
          },
          "timezone": {
            "type": "string",
            "description": "IANA timezone of the affected area, for showing the UTC times in local time",
            "example": "Australia/Sydney"
          },
          "affectedSuburbs": {
            "type": "array",
            "description": "Affected suburbs/towns",
            "items": {
              "type": "string"
            }
          },
          "affectedStates": {
            "type": "array",
            "description": "Affected States/Territories",
            "items": {
              "type": "string",
              "enum": [
                "ACT",
                "NSW",
                "NT",
                "QLD",
                "SA",
                "TAS",
                "VIC",
                "WA"
              ]
            }
          },
          "affectedPostcodes": {
            "type": "array",
            "description": "Affected postcodes",
            "items": {
              "type": "string"
            }
          },
          "affectedServiceTypes": {
            "type": "array",
            "description": "Types of service affected",
            "items": {
              "type": "string"
            }
          },
          "affectedSites": {
            "type": "array",
            "description": "Our own sites affected (a data centre or exchange), by name. Absent for planned maintenance.",
            "items": {
              "type": "string"
            }
          },
          "premisesAffected": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Number of premises affected. Null where Check Networks has no technical visibility of the count, and always null for planned maintenance."
          },
          "responsibleParty": {
            "type": [
              "string",
              "null"
            ],
            "description": "The carrier or carriage service provider responsible for resolving the outage. Null where Check Networks is itself responsible."
          },
          "cause": {
            "type": [
              "string",
              "null"
            ],
            "description": "High-level cause. The literal value `withheld` means a cause is known but has been withheld from publication; null means no cause is recorded yet."
          },
          "causeNatural": {
            "type": "boolean",
            "description": "Whether the cause relates to a natural event or weather"
          },
          "additionalInfo": {
            "type": [
              "string",
              "null"
            ],
            "description": "Any further published detail about the outage"
          },
          "firstPublishedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When this register entry was first published"
          },
          "lastRectifiedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When this register entry was last corrected, if it has been"
          },
          "yourAffectedServiceCount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many of your services this outage hit, from the footprint we recorded when it was published; 0 when it reaches your area but none of your services. Null for planned maintenance, where we do not record which services a window touches.",
            "example": 3
          },
          "yourAffectedServices": {
            "description": "Each of your services this outage hit, including those of your end users, so you can tell them. Null for planned maintenance.",
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "service",
                    "category",
                    "address",
                    "addressMasked",
                    "endUser"
                  ],
                  "properties": {
                    "service": {
                      "type": "string",
                      "description": "The service's reference (a data service id, trunk or number).",
                      "example": "PRI000012345678"
                    },
                    "category": {
                      "type": "string",
                      "description": "The kind of service.",
                      "enum": [
                        "data",
                        "voice",
                        "mobile",
                        "colocation",
                        "transit"
                      ]
                    },
                    "address": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The service address. Null when it is masked (`addressMasked`), or when we hold none.",
                      "example": "12 Sturt Street, Ballarat VIC 3350"
                    },
                    "addressMasked": {
                      "type": "boolean",
                      "description": "True when the address is withheld because the end user is protected by a family violence safety record, as the End Users list in the portal withholds their contact details."
                    },
                    "endUser": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The end user the service belongs to, by its public number. Null for a service you hold yourself.",
                      "example": "100042"
                    }
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "ServiceDegradation": {
        "type": "object",
        "description": "A Potential Service Degradation: the link at the service's point of interconnect is near capacity, so the service may be slower at peak, but is not down. It is not an outage under the Standard, so it carries no register fields.",
        "required": [
          "reference",
          "title",
          "type",
          "status",
          "startedAt",
          "resolvedAt",
          "estimatedRestorationAt",
          "timezone",
          "area",
          "additionalInfo",
          "url"
        ],
        "properties": {
          "reference": {
            "type": "string",
            "example": "SD-3KQ7ZP"
          },
          "title": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "degradation"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "resolved"
            ]
          },
          "startedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When we opened it, in UTC."
          },
          "resolvedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "estimatedRestorationAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When we expect the extra capacity to be in place; null until we have a date."
          },
          "timezone": {
            "type": "string",
            "example": "Australia/Sydney"
          },
          "area": {
            "type": "string",
            "description": "The affected points of interconnect, e.g. `Sandbox (0SND)`."
          },
          "additionalInfo": {
            "type": [
              "string",
              "null"
            ],
            "description": "What end users may notice until the capacity is added."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Where the status site lists it."
          }
        }
      },
      "DataDiagnosticTest": {
        "type": "object",
        "required": [
          "id",
          "href",
          "service",
          "test",
          "name",
          "status",
          "result",
          "requestedAt",
          "completedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The test's id, the carrier's reference for it.",
            "example": "WRI000000004846"
          },
          "href": {
            "type": "string",
            "format": "uri"
          },
          "service": {
            "type": "string",
            "description": "The service's product reference.",
            "example": "PRI000123456789"
          },
          "test": {
            "type": "string",
            "description": "The test's code, as `GET /data/services/{ref}/diagnostics/types` lists it.",
            "example": "NTD_STATUS"
          },
          "name": {
            "type": "string",
            "example": "NTD Status"
          },
          "status": {
            "type": "string",
            "description": "Where the test is, from either carrier's own states: `accepted` (asked for, not yet started), `in_progress`, `completed`, `cancelled` (also a test whose result never came) or `rejected` (the carrier refused it).",
            "enum": [
              "accepted",
              "in_progress",
              "completed",
              "cancelled",
              "rejected"
            ]
          },
          "result": {
            "type": "string",
            "description": "`passed` or `failed` once the carrier says; `none` until then, or for a test with no pass or fail.",
            "enum": [
              "passed",
              "failed",
              "none"
            ]
          },
          "requestedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "completedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "DataServiceHealthReport": {
        "type": "object",
        "description": "One health report on a data service, in the same shape on every network. `overall` is the result the portal's service page shows.",
        "required": [
          "id",
          "serviceId",
          "network",
          "status",
          "overall",
          "summary",
          "alertMessage",
          "requestedAt",
          "checks"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The report's id. Read it again on GET /data/health/{id}.",
            "example": "HRI000000004847"
          },
          "serviceId": {
            "type": "string",
            "description": "The service's product reference (PRI, Opticomm product).",
            "example": "PRI000123456789"
          },
          "network": {
            "type": "string",
            "enum": [
              "nbn",
              "opticomm"
            ],
            "description": "The access network the service is on."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "complete"
            ],
            "description": "`pending` until the carrier answers. The `serviceHealth.reportReady` webhook says when a report is complete."
          },
          "overall": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "green",
              "amber",
              "red",
              null
            ],
            "description": "The report's overall result, as the portal shows it. Null while pending, or when the carrier gave none.",
            "example": "green"
          },
          "summary": {
            "type": [
              "string",
              "null"
            ],
            "description": "The carrier's summary of the report, when it gives one."
          },
          "alertMessage": {
            "type": [
              "string",
              "null"
            ],
            "description": "The carrier's alert, when the report raised one."
          },
          "requestedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the report was asked for."
          },
          "checks": {
            "type": "array",
            "description": "Each measurement in the report, empty while pending. An NBN report lists its Connectivity, Performance and Stability roll-up first, under `Overview`.",
            "items": {
              "type": "object",
              "required": [
                "category",
                "name",
                "result",
                "value",
                "unit"
              ],
              "properties": {
                "category": {
                  "type": "string",
                  "description": "The group the measurement is in, as the carrier names it.",
                  "example": "Connectivity"
                },
                "name": {
                  "type": "string",
                  "description": "The measurement, as the carrier names it.",
                  "example": "Session Status"
                },
                "result": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "green",
                    "amber",
                    "red",
                    null
                  ],
                  "description": "The measurement's result; null when the carrier gave none."
                },
                "value": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The measured value, as text."
                },
                "unit": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The value's unit, when it has one."
                }
              }
            }
          }
        }
      },
      "DataRadiusUser": {
        "description": "A RADIUS user. There is one per service.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The RADIUS user reference.",
            "example": "USR123456789011"
          },
          "href": {
            "type": "string",
            "description": "Link to this user on the Check Networks API.",
            "example": "https://api.checknetworks.com.au/data/radius/USR123456789011"
          },
          "username": {
            "type": "string",
            "description": "The username the service authenticates with.",
            "example": "smith-family@example.net.au"
          },
          "realm": {
            "type": [
              "string",
              "null"
            ],
            "description": "The realm the username sits in. Null where the service authenticates on its access circuit rather than a login.",
            "example": "example.net.au"
          },
          "authentication": {
            "type": "string",
            "enum": [
              "PPPoE",
              "IPoE"
            ],
            "description": "How the service authenticates. An IPoE service has no password: the access circuit is the identity."
          },
          "serviceId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The service this user belongs to.",
            "example": "AVC000248080281"
          },
          "detailSource": {
            "type": "string",
            "enum": [
              "checknetworks",
              "kinetix",
              "carrier",
              "handoff"
            ],
            "description": "Whose RADIUS authenticates the service, and so where the detail below comes from. `checknetworks`: our own RADIUS, answered from what we hold. `kinetix`: Kinetix's RADIUS, read live from Kinetix on every request. `carrier`: another carrier's RADIUS, which cannot be read, so the detail is unavailable. `handoff`: the service is handed to you at layer 2 on your interconnect and never logs on to our RADIUS, so there is no detail and `online` is null."
          },
          "detailAvailable": {
            "type": "boolean",
            "description": "False when the detail could not be read (Kinetix did not answer, or the carrier's RADIUS cannot be read). The detail fields are then null; the rest of the record is still given."
          },
          "online": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the user has a session up right now. Null when the detail is unavailable."
          },
          "ipAddress": {
            "type": [
              "string",
              "null"
            ],
            "description": "The IPv4 address assigned to the service. Behind CGNAT this is the inner 100.64.0.0/10 address; see publicAddress.",
            "example": "100.67.16.96"
          },
          "staticIp": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the IPv4 address is static."
          },
          "publicAddress": {
            "type": [
              "string",
              "null"
            ],
            "description": "The shared public IPv4 address, when the service is behind CGNAT. Null for a service with its own public address.",
            "example": "103.133.55.96"
          },
          "publicPortRange": {
            "type": [
              "string",
              "null"
            ],
            "description": "The ports of publicAddress this service holds, when behind CGNAT.",
            "example": "16384-17407"
          },
          "ipv6Address": {
            "type": [
              "string",
              "null"
            ],
            "description": "The IPv6 WAN address. On our own RADIUS the service is given a WAN /64 instead, given here in CIDR form.",
            "example": "2405:e180:c001:d049::1"
          },
          "ipv6DelegatedPrefix": {
            "type": [
              "string",
              "null"
            ],
            "description": "The IPv6 prefix delegated to the service's router.",
            "example": "2405:e180:c1d0:4900::/56"
          },
          "lastAuthentication": {
            "type": [
              "object",
              "null"
            ],
            "description": "The latest authentication. Null when none is recorded.",
            "properties": {
              "result": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Accept or Reject.",
                "example": "Accept"
              },
              "at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "example": "2026-10-13T00:15:53Z"
              },
              "reason": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Why a reject happened (for example no_live_service or bad_credential), on our own RADIUS. Null on an accept, and from Kinetix."
              }
            }
          },
          "recentDropouts": {
            "type": [
              "object",
              "null"
            ],
            "description": "Sessions that ended within the recent window (five days).",
            "properties": {
              "count": {
                "type": "integer",
                "example": 0
              },
              "from": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "to": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            }
          }
        }
      },
      "DataRadiusNotChecked": {
        "type": "object",
        "description": "The service is on Opticomm's RADIUS and no session check is held for it. Reading never asks Opticomm: ask for a check with `POST /data/radius/{ref}/session-check`, then read again once it completes.",
        "required": [
          "id",
          "source",
          "status",
          "retrievedAt",
          "message"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "USR123456789011"
          },
          "source": {
            "type": "string",
            "enum": [
              "opticomm"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "NotChecked"
            ]
          },
          "retrievedAt": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              null
            ],
            "description": "Always null, as no check is held."
          },
          "message": {
            "type": "string",
            "example": "This session has not been checked at Opticomm recently. Ask for a check with POST /data/radius/{ref}/session-check, then read it here once it completes."
          }
        }
      },
      "DataRadiusNotOnOurRadius": {
        "type": "object",
        "description": "The service is handed to you at layer 2 on your interconnect and never logs on to our RADIUS, so there is no session here to read: neither online nor offline.",
        "required": [
          "id",
          "source",
          "status",
          "message"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "USR123456789011"
          },
          "source": {
            "type": "string",
            "enum": [
              "handoff"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "NotOnOurRadius"
            ]
          },
          "message": {
            "type": "string",
            "example": "This service is handed to you at layer 2 on your interconnect and never logs on to our RADIUS, so we hold no session for it."
          }
        }
      },
      "DataRadiusSession": {
        "description": "A live RADIUS session. Traffic is named from the end user's point of view: what they sent is the upload.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The RADIUS user reference this session belongs to.",
            "example": "USR123456789011"
          },
          "username": {
            "type": "string",
            "description": "The username the session authenticated with.",
            "example": "smith-family@example.net.au"
          },
          "source": {
            "type": "string",
            "enum": [
              "checknetworks",
              "kinetix",
              "opticomm"
            ],
            "description": "Where the session was read from. `checknetworks`: our own RADIUS accounting. `kinetix`: Kinetix's RADIUS, read live on this request. `opticomm`: Opticomm's session history from the latest session check, as at `lastSeenAt`."
          },
          "startedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the session came up. Null if the carrier does not give it."
          },
          "lastSeenAt": {
            "type": "string",
            "format": "date-time",
            "description": "When we last heard accounting for the session. For a `kinetix` session, the time of this read. For an `opticomm` session, when Opticomm reported it."
          },
          "durationSeconds": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How long the session has been up. For a `kinetix` session, counted from `startedAt`, and null when that is. For an `opticomm` session, as Opticomm reported it.",
            "example": 86400
          },
          "ipAddress": {
            "type": [
              "string",
              "null"
            ],
            "description": "The address assigned to the session.",
            "example": "100.64.12.19"
          },
          "uploadBytes": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Traffic sent by the end user. Kinetix reports traffic to two decimal places of a unit (27.38 GB), so a `kinetix` figure is that amount in bytes, with GB taken as 10^9. Null if the carrier gives no figure."
          },
          "downloadBytes": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Traffic sent to the end user, converted from Kinetix's figure the same way as `uploadBytes`."
          }
        }
      },
      "DataUsageRow": {
        "type": "object",
        "required": [
          "id",
          "network",
          "endUser",
          "downloadBytes",
          "uploadBytes",
          "totalBytes",
          "allowanceBytes",
          "percentUsed",
          "complete"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The service's product reference (PRI, Opticomm product).",
            "example": "PRI000123456789"
          },
          "network": {
            "type": "string",
            "enum": [
              "nbn",
              "opticomm"
            ]
          },
          "endUser": {
            "type": [
              "string",
              "null"
            ],
            "description": "The end user's public number, or null when none is assigned.",
            "example": "100042"
          },
          "downloadBytes": {
            "type": "integer",
            "description": "Bytes sent to the end user in the month."
          },
          "uploadBytes": {
            "type": "integer",
            "description": "Bytes the end user sent in the month."
          },
          "totalBytes": {
            "type": "integer"
          },
          "allowanceBytes": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The plan's monthly allowance, or null for an unlimited plan."
          },
          "percentUsed": {
            "type": [
              "number",
              "null"
            ],
            "description": "The total as a percentage of the allowance, to one decimal place; null with no allowance.",
            "example": 42.5
          },
          "complete": {
            "type": "boolean",
            "description": "False for the current month, which is counted up to now."
          }
        }
      },
      "DataServiceQualification": {
        "required": [
          "id",
          "href",
          "network",
          "serviceable",
          "status",
          "resources",
          "availablePlans"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The location ID as queried (LOC… or OPC…).",
            "example": "LOC000000000001"
          },
          "href": {
            "type": "string",
            "description": "URL of this qualification.",
            "example": "https://api.checknetworks.tools/v2/data/sq/LOC000000000001"
          },
          "network": {
            "type": "string",
            "enum": [
              "nbn",
              "opticomm"
            ],
            "description": "The access network the qualification ran against."
          },
          "locId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The premises' NBN Location ID — equal to `id` for NBN queries; resolved via the address crosswalk for Opticomm queries, null when the premises has no resolvable NBN footprint."
          },
          "serviceable": {
            "type": "boolean",
            "description": "Whether the premises can be served on the network."
          },
          "status": {
            "type": "string",
            "description": "The carrier's own serviceability status for the premises.",
            "example": "Serviceable"
          },
          "serviceClass": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The carrier's serviceability class, where reported."
          },
          "primaryAccessTech": {
            "type": [
              "string",
              "null"
            ],
            "description": "Primary access technology (e.g. FTTP, HFC, FTTC).",
            "example": "FTTP"
          },
          "alternativeTech": {
            "type": [
              "string",
              "null"
            ],
            "description": "(NBN) The alternative technology the carrier plans for the premises, where reported (e.g. Fibre at an upgrade-programme FTTN/FTTC premises)."
          },
          "upliftAvailable": {
            "type": "boolean",
            "description": "True when the premises is FTTN/FTTC with Fibre as the alternative technology AND the carrier confirms Fibre Uplift eligibility. The full uplift document is served by /nbn/service_qualification/fibre_uplift."
          },
          "additionalInstallAvailable": {
            "type": "boolean",
            "description": "True when every port or copper pair at the premises is in use and the carrier will install another device or pair for a further service. NBN: order a connect with `ntdId` (or `copperPairId`) set to `NEW` and a Standard Install appointment. Opticomm: order a connect naming no OTD, with an Additional Install appointment. The subsequent installation charge applies."
          },
          "newDevelopmentChargeApplies": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "(NBN) True when the carrier's New Development Charge applies at the premises. Null where the network does not report it."
          },
          "region": {
            "type": [
              "string",
              "null"
            ],
            "description": "(NBN) The carrier region, where reported."
          },
          "poi": {
            "type": [
              "string",
              "null"
            ],
            "description": "(NBN) The Point of Interconnect serving the premises."
          },
          "resources": {
            "type": "array",
            "description": "The in-ground access resources a service can be provisioned on — NTD/OTD ports and copper pairs. Empty when the technology needs no resource pick (e.g. a new-install fibre premises).",
            "items": {
              "type": "object",
              "required": [
                "type",
                "id",
                "status"
              ],
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "port",
                    "copperPair"
                  ]
                },
                "id": {
                  "type": "string",
                  "example": "1-UNI-D1"
                },
                "status": {
                  "type": "string",
                  "description": "A port is `Free` or `Used`. A copper pair is `Line In Use` (a service runs on it) or `Line Not In Use` (a spare pair), in nbn's own words.",
                  "example": "Used"
                },
                "installFeeApplies": {
                  "type": "boolean",
                  "description": "(Copper pairs) True when a subsequent installation charge applies to activating this pair."
                },
                "serviceIdMatch": {
                  "type": "boolean",
                  "description": "Present on NBN Service Transfer queries — true on the one resource carrying the supplied serviceRef."
                }
              }
            }
          },
          "siteRestrictionError": {
            "type": [
              "object",
              "null"
            ],
            "description": "(NBN Service Transfer) The carrier's rejection of the supplied serviceRef (RJ002003…), null when the transfer validated or no serviceRef was supplied.",
            "properties": {
              "code": {
                "type": "string",
                "example": "RJ002003"
              },
              "reason": {
                "type": "string"
              }
            }
          },
          "enterpriseEthernet": {
            "type": [
              "object",
              "null"
            ],
            "description": "The NBN Enterprise Ethernet check at the premises — null when no NBN footprint is resolvable or the check was unavailable.",
            "properties": {
              "available": {
                "type": "boolean"
              },
              "status": {
                "type": "string",
                "example": "Valid"
              },
              "region": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "zone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "poi": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "buildCategory": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "primaryAccessTechnology": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "availablePlans": {
            "type": "array",
            "description": "The carrier-sellable bandwidth products at the premises — the SKUs the order endpoints accept. Empty when the lookup is unavailable.",
            "items": {
              "type": "object",
              "required": [
                "sku",
                "name"
              ],
              "properties": {
                "sku": {
                  "type": "string",
                  "example": "NBN-BW-TC4-L2-100_20-FTP"
                },
                "name": {
                  "type": "string",
                  "example": "100/20 Mbps"
                }
              }
            }
          },
          "otherNetwork": {
            "description": "The same premises on the other network, where both NBN and Opticomm serve it: that network's qualification exactly as `/data/sq/{locId}` answers for its own ID (without an `otherNetwork` of its own). Null when the premises is on one network only, when that network does not answer, or on a transfer check (`serviceRef`), which is about the asked network only. Order on whichever network is serviceable with the plan you want.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/DataServiceQualification"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "GeographicAddress": {
        "description": "An nbn address as Kinetix returns it: each field only when nbn holds it, coordinates as strings.",
        "properties": {
          "id": {
            "type": "string",
            "description": "NBN Location ID"
          },
          "href": {
            "type": "string",
            "description": "Link to this address, `/nbn/address/{locId}`, on this API. Present only when the carrier sent a link."
          },
          "formattedAddress": {
            "type": "string",
            "description": "Human-readable single-line form of the address.",
            "example": "Lot 708 16 De Vecchi Cl, Edmonton, QLD"
          },
          "lotNumber": {
            "type": "string",
            "description": "The Lot number is a reference number allocated to a property for subdivision administration purposes prior to road numbering.\n\nUsage: Where an official Road number has not been assigned, this field may be used for postal purposes as well as the physical identification of an address site."
          },
          "planNumber": {
            "type": "string",
            "description": "The deposited plan number allocated to a property for subdivision administration purposes prior to road numbering in addition to the Lot number."
          },
          "roadNumber1": {
            "type": "string",
            "description": "Identifies the number of the address in the road or thoroughfare and for a ranged address is the start number.\nThe data element may include an alphabetic prefix. The data element may include an alphabetic suffix."
          },
          "roadNumber2": {
            "type": "string",
            "description": "Identifies the last number for a ranged address in the road or thoroughfare.\nThe data element may include an alphabetic prefix. The data element may include an alphabetic suffix.\nThis data element is used for ranged street numbers otherwise it is left blank."
          },
          "roadName": {
            "type": "string",
            "description": "The name of the road/thoroughfare applicable to the address site or complex.\nOnly the road name should be stored in this data element."
          },
          "roadTypeCode": {
            "type": "string",
            "description": "The abbreviation code used to distinguish the type of road/thoroughfare applicable to the address site/complex."
          },
          "roadSuffixCode": {
            "type": "string",
            "description": "The abbreviation code used to represent the suffix of road/thoroughfare applicable to the address site/complex."
          },
          "localityName": {
            "type": "string",
            "description": "The name of the locality/suburb of the address."
          },
          "postcode": {
            "type": "string",
            "description": "The Australian numeric descriptor for a postal delivery area, aligned with locality, suburb or place\n\n*Mandatory if stateTerritoryCode not provided"
          },
          "stateTerritoryCode": {
            "type": "string",
            "description": "The State or Territory code of the address.\n\n*Mandatory if postcode not provided"
          },
          "gnafId": {
            "type": "string",
            "description": "Geocoded National Address File (GNAF) ID"
          },
          "country": {
            "type": "string",
            "description": "Country of the address. Always \"Australia\"."
          },
          "secondaryComplexName": {
            "type": "string",
            "description": "Name associated with a building or area within a complex site.\nThis data element may represent the name given to an entire building within an address site that has its own separate address."
          },
          "unitTypeCode": {
            "type": "string",
            "description": "Sub dwelling unit type code.\nWithin a complex, an abbreviation used to distinguish the type of an address found within a building / sub-complex or marina."
          },
          "unitNumber": {
            "type": "string",
            "description": "Sub-dwelling unit number.\nWithin a complex, a number used to distinguish an address found within a building / sub-complex or marina.\nThe data element may include a leading alphabetic prefix. The data element may include a trailing alphabetic suffix."
          },
          "levelTypeCode": {
            "type": "string",
            "description": "Within a complex, an abbreviation used to distinguish the floor or level of a multi-storey building/sub-complex."
          },
          "levelNumber": {
            "type": "string",
            "description": "Within a complex, the number of the floor or level of a multi-storey building/ sub-complex.\nThe data element may include a leading alphabetic prefix. The data element may include a trailing alphabetic suffix."
          },
          "addressSiteName": {
            "type": "string",
            "description": "Synonyms: Building property name, Primary Complex name\n\nThe official place name or culturally accepted common usage name for an address site, including the name of a building, homestead, building complex, agricultural property, park or unbounded address site. This data element represents the name given to an entire building or address site"
          },
          "complexRoadNumber1": {
            "type": "string",
            "description": "Within a complex, identifies the number of the address in the road or thoroughfare and for a ranged address is the start number."
          },
          "complexRoadNumber2": {
            "type": "string",
            "description": "Within a complex, identifies the last number for a ranged address in the road or thoroughfare."
          },
          "complexRoadName": {
            "type": "string",
            "description": "Within a complex, the name of the road /thoroughfare of the address. Within a Road name it is possible to find what appears to be a Road type (eg. The Boulevard).\nIt is also possible to have a null Road type."
          },
          "complexRoadTypeCode": {
            "type": "string",
            "description": "Within a complex, an abbreviation used to distinguish the type of road / thoroughfare of the address."
          },
          "complexRoadSuffixCode": {
            "type": "string",
            "description": "Within a complex, an abbreviation representing the suffix of the road/ thoroughfare of the address."
          },
          "locationDescriptor": {
            "type": "string",
            "description": "Additional descriptor that further identifies the location."
          },
          "geographicDatum": {
            "type": "string",
            "description": "Geographic datum of the address."
          },
          "latitude": {
            "type": "string",
            "description": "Geographic latitude coordinate of the address, as a decimal string.",
            "example": "-17.02266881"
          },
          "longitude": {
            "type": "string",
            "description": "Geographic longitude coordinate of the address, as a decimal string.",
            "example": "145.72657907"
          }
        },
        "type": "object"
      },
      "LocationRef": {
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique NBN Reference for the location",
            "example": "LOC000000000000",
            "minLength": 15,
            "maxLength": 15,
            "pattern": "LOC[0-9]{12}"
          }
        },
        "type": "object"
      },
      "AddressService": {
        "required": [
          "pri",
          "avc",
          "bandwidth",
          "reference"
        ],
        "properties": {
          "pri": {
            "type": "string",
            "description": "The Primary Reference Identifier for the NBN Service",
            "example": "PRI000000000000",
            "minLength": 15,
            "maxLength": 15,
            "pattern": "(PRI)[0-9]{12}"
          },
          "avc": {
            "type": "string",
            "description": "The AVC Reference Identifier for the NBN Service",
            "example": "AVC000000000000",
            "minLength": 15,
            "maxLength": 15,
            "pattern": "(AVC)[0-9]{12}"
          },
          "bandwidth": {
            "type": [
              "string",
              "null"
            ],
            "description": "The bandwidth of the NBN Service; null when the service carries no plan.",
            "example": "D25-100_U5-40_Mbps_TC4_P"
          },
          "reference": {
            "type": [
              "string",
              "null"
            ],
            "description": "Your reference for the NBN Service; null when you have not set one."
          }
        },
        "type": "object"
      },
      "AddressServices": {
        "properties": {
          "requestDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "Date and time that this request was received",
            "example": "2021-06-07T06:48:52.474155Z"
          },
          "location": {
            "$ref": "#/components/schemas/LocationRef"
          },
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AddressService"
            }
          }
        },
        "type": "object"
      },
      "TimePeriod": {
        "properties": {
          "startDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "Date and Time the period starts"
          },
          "endDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "Date and Time the period ends"
          }
        },
        "type": "object"
      },
      "ReasonCode": {
        "properties": {
          "code": {
            "type": "string",
            "description": "Code identifier"
          },
          "reason": {
            "type": "string",
            "description": "The reason provided as a string"
          }
        },
        "type": "object"
      },
      "SiteAccess": {
        "properties": {
          "tradingName": {
            "type": "string",
            "description": "The name that the organization trades under.",
            "example": "Business Name Inc.",
            "minLength": 1,
            "maxLength": 40
          },
          "inductionRequired": {
            "type": "boolean",
            "description": "Is site induction required to access the site?"
          },
          "securityRequired": {
            "type": "boolean",
            "description": "Is security required to access the site?"
          },
          "currentWhiteCard": {
            "type": "boolean",
            "description": "Is a white card required to access the site?"
          },
          "securityClearance": {
            "type": "boolean",
            "description": "Is security clearance required to access the site?"
          },
          "siteAccessClearance": {
            "type": "boolean",
            "description": "Is site access clearance required to access the site?"
          },
          "additionalDetails": {
            "type": "string",
            "description": "Additional details that may be required for on site.",
            "example": "Enter through the door at the end of the rainbow. Knock four times.",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "type": "object"
      },
      "RelatedEntity": {
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the related entity"
          },
          "role": {
            "type": "string",
            "description": "The role this entity plays in relation to this record.",
            "example": "Account Manager"
          },
          "@referredType": {
            "type": "string",
            "description": "The type of this Related Entity"
          }
        },
        "type": "object"
      },
      "AccessSeekerContact": {
        "properties": {
          "contactName": {
            "type": "string",
            "description": "Name of Access Seeker contact person"
          },
          "phoneNumber": {
            "type": "string",
            "description": "Phone Number for Access Seeker contact"
          },
          "emailAddress": {
            "type": "string",
            "description": "Email Address of Access Seeker contact"
          }
        },
        "type": "object"
      },
      "EndUserContact": {
        "properties": {
          "contactName": {
            "type": "string",
            "description": "Name of the Contact Person"
          },
          "contactPhone": {
            "type": "string",
            "description": "Contact Phone Number"
          },
          "emailAddress": {
            "type": "string",
            "description": "Contact Email Address"
          }
        },
        "type": "object"
      },
      "TimeSlot": {
        "properties": {
          "validFor": {
            "description": "Time period for the appointment time slot",
            "allOf": [
              {
                "$ref": "#/components/schemas/TimePeriod"
              }
            ]
          },
          "appointmentSlotType": {
            "type": "string",
            "description": "Appointment Slot Type.\n- AM - Morning\n- PM - Afternoon\n- AHA - After-Hours Appointment\n- CA - Customer Appointment\n",
            "example": "AM",
            "enum": [
              "AM",
              "PM",
              "AHA",
              "CA"
            ]
          },
          "withinTimeWindow": {
            "type": "string",
            "description": "Is the timeslot is within the Order/Incident SLA period?.\nOnly reliable for FTTN, FTTB, and Satellite technologies with Demand Types other than 'Service Restoration'. Otherwise, this information is deprecated and should be ignored.",
            "example": "true",
            "enum": [
              "true",
              "false"
            ]
          }
        },
        "type": "object"
      },
      "AppointmentHistoryItem": {
        "properties": {
          "type": {
            "type": "string",
            "description": "The Type of History Item",
            "example": "BOOKED",
            "enum": [
              "BOOKED",
              "CANCELLATION",
              "CANCELLED",
              "COMPLETED",
              "CONTACT UPDATED",
              "INCOMPLETE",
              "NBN INVESTIGATION REQUIRED",
              "RESCHEDULE REQUIRED",
              "RESCHEDULED",
              "RESERVED",
              "TECH ON SITE"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "When the History Event was recorded"
          },
          "reasonCode": {
            "$ref": "#/components/schemas/ReasonCode"
          },
          "party": {
            "type": "string",
            "description": "The party responsible for the History Event",
            "example": "NBN",
            "enum": [
              "NBN",
              "CHECK-NETWORKS",
              "WHOLESALE-PARTNER",
              "END-USER",
              "OTHER"
            ]
          }
        },
        "type": "object"
      },
      "AppointmentHistory": {
        "properties": {
          "id": {
            "type": "string",
            "description": "NBN Reference ID for the appointment"
          },
          "queryDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "When the query request was received"
          },
          "history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AppointmentHistoryItem"
            }
          }
        },
        "type": "object"
      },
      "Appointment": {
        "properties": {
          "id": {
            "type": "string",
            "description": "NBN Appointment ID"
          },
          "href": {
            "type": "string",
            "description": "Link to get appointment details from NBN"
          },
          "externalId": {
            "type": "string",
            "description": "RSP Reference ID provided in the request"
          },
          "creationDate": {
            "type": "string",
            "format": "date-time",
            "description": "Date the appointment record was created"
          },
          "lastUpdate": {
            "type": "string",
            "format": "date-time",
            "description": "Date the appointment record was last updated"
          },
          "status": {
            "type": "string",
            "description": "The status of the appointment"
          },
          "firstAvailableAppointment": {
            "$ref": "#/components/schemas/TimePeriod"
          },
          "reasonCode": {
            "$ref": "#/components/schemas/ReasonCode"
          },
          "priorityAssist": {
            "type": "string",
            "description": "Priority Assistance required for appointment?",
            "example": "No",
            "enum": [
              "No",
              "Yes"
            ]
          },
          "appointmentSLA": {
            "type": "string",
            "description": "SLA for the appointment.",
            "example": "Accelerated",
            "enum": [
              "Accelerated",
              "Reduced Lead Time",
              "Standard"
            ]
          },
          "appointmentType": {
            "type": "string",
            "description": "Appointment Type",
            "example": "Appointment",
            "enum": [
              "Appointment",
              "Commitment"
            ]
          },
          "endUserType": {
            "type": "string",
            "description": "Type of End User",
            "example": "Business",
            "enum": [
              "Business",
              "Residential"
            ]
          },
          "demandType": {
            "type": "string",
            "description": "Value of Demand Type",
            "example": "Additional Install",
            "enum": [
              "Additional Install",
              "Install - Deinstall",
              "Non EU Jumper Only",
              "Non Standard Install",
              "Service Restoration",
              "Standard Install"
            ]
          },
          "siteAccess": {
            "$ref": "#/components/schemas/SiteAccess"
          },
          "relatedEntity": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RelatedEntity"
            }
          },
          "accessSeekerContact": {
            "$ref": "#/components/schemas/AccessSeekerContact"
          },
          "endUserContact": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EndUserContact"
            }
          },
          "appointmentSlot": {
            "description": "Current active appointment slot",
            "allOf": [
              {
                "$ref": "#/components/schemas/TimeSlot"
              }
            ]
          },
          "appointmentHistory": {
            "type": "array",
            "description": "History of changes to the appointment slot",
            "items": {
              "$ref": "#/components/schemas/AppointmentHistory"
            }
          }
        },
        "type": "object"
      },
      "CreateAppointmentResponse": {
        "properties": {
          "id": {
            "type": "string",
            "description": "NBN Appointment ID"
          },
          "href": {
            "type": "string",
            "description": "Link to get appointment details from NBN"
          },
          "externalId": {
            "type": "string",
            "description": "RSP Reference ID provided in the request"
          },
          "status": {
            "type": "string",
            "description": "The status of the appointment"
          },
          "reasonCode": {
            "description": "Reason Code",
            "allOf": [
              {
                "$ref": "#/components/schemas/ReasonCode"
              }
            ]
          },
          "relatedEntity": {
            "type": "array",
            "description": "Related Entities for this Appointment",
            "items": {
              "$ref": "#/components/schemas/RelatedEntity"
            }
          }
        },
        "type": "object"
      },
      "RelatedPlace": {
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique Identifier for the nbn Location",
            "example": "LOC000000000001",
            "minLength": 15,
            "maxLength": 15,
            "pattern": "^LOC[0-9]{12}$"
          },
          "@referredType": {
            "type": "string",
            "description": "Indicates the type of resource",
            "default": "GeographicAddress",
            "example": "GeographicAddress"
          }
        },
        "type": "object"
      },
      "WorkZone": {
        "properties": {
          "primaryAccessTechnology": {
            "type": "string",
            "description": "Primary Access Technology",
            "example": "Fibre",
            "enum": [
              "Fibre",
              "Fibre To The Building",
              "Fibre To The Curb",
              "Fibre To The Node",
              "HFC",
              "Satellite",
              "Wireless"
            ]
          },
          "serviceabilityClass": {
            "type": "string",
            "description": "Service Class",
            "example": "1",
            "enum": [
              "1",
              "12",
              "13",
              "2",
              "21",
              "22",
              "23",
              "24",
              "3",
              "31",
              "32",
              "33",
              "34",
              "4",
              "5",
              "6",
              "7",
              "8",
              "9"
            ]
          },
          "csaID": {
            "type": "string",
            "description": "CSA ID"
          },
          "region": {
            "type": "string",
            "description": "Region the zone is located in",
            "example": "Isolated",
            "enum": [
              "Isolated",
              "Limited Access",
              "Major Rural",
              "Minor Rural",
              "Remote",
              "Urban"
            ]
          }
        },
        "type": "object"
      },
      "AvailableTimeSlot": {
        "properties": {
          "appointmentSlotType": {
            "type": "string",
            "description": "Appointment Slot Type.\n- AM - Morning\n- PM - Afternoon\n- AHA - After-Hours Appointment\n- CA - Customer Appointment\n",
            "example": "AM",
            "enum": [
              "AM",
              "PM",
              "AHA",
              "CA"
            ]
          },
          "validFor": {
            "description": "Time period for the appointment time slot",
            "allOf": [
              {
                "$ref": "#/components/schemas/TimePeriod"
              }
            ]
          },
          "withinTimeWindow": {
            "type": "string",
            "description": "Is the timeslot is within the Order/Incident SLA period?.\nOnly reliable for FTTN, FTTB, and Satellite technologies with Demand Types other than 'Service Restoration'. Otherwise, this information is deprecated and should be ignored.",
            "example": "true",
            "enum": [
              "true",
              "false"
            ]
          },
          "appointmentLeadTime": {
            "type": "string",
            "description": "Lead Time for the Time Slot listed as a result of looking for available slots",
            "example": "Standard",
            "enum": [
              "Standard",
              ""
            ]
          }
        },
        "type": "object"
      },
      "SearchTimeSlot": {
        "properties": {
          "demandType": {
            "type": "string",
            "description": "Value for Demand Type"
          },
          "searchDate": {
            "type": "string",
            "description": "Date Time of the search"
          },
          "priorityAssist": {
            "type": "string",
            "description": "Priority Assistance requested for Appointment?"
          },
          "appointmentSLA": {
            "type": "string",
            "description": "Appointment SLA"
          },
          "appointment": {
            "$ref": "#/components/schemas/Appointment"
          },
          "place": {
            "description": "Place for the Appointment",
            "allOf": [
              {
                "$ref": "#/components/schemas/RelatedPlace"
              }
            ]
          },
          "workZone": {
            "description": "Work Zone",
            "allOf": [
              {
                "$ref": "#/components/schemas/WorkZone"
              }
            ]
          },
          "relatedEntity": {
            "type": "array",
            "description": "Related Entities for the Appointment",
            "items": {
              "$ref": "#/components/schemas/RelatedEntity"
            }
          },
          "requestedTimeSlot": {
            "description": "The time slot requested",
            "allOf": [
              {
                "$ref": "#/components/schemas/TimeSlot"
              }
            ]
          },
          "availableTimeSlot": {
            "type": "array",
            "description": "List of available time slots",
            "items": {
              "$ref": "#/components/schemas/AvailableTimeSlot"
            }
          }
        },
        "type": "object"
      },
      "TimeslotItem": {
        "properties": {
          "slotType": {
            "type": "string",
            "description": "The type of timeslot"
          },
          "startDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "When the timeslot started"
          },
          "endDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "When the timeslot ended"
          }
        },
        "type": "object"
      },
      "AppointmentItem": {
        "properties": {
          "id": {
            "type": "string",
            "description": "The nbn Reference for the Appointment"
          },
          "demandtype": {
            "type": "string",
            "description": "The Demand Type of the Appointment"
          },
          "status": {
            "type": "string",
            "default": "The Status of the Appointment"
          },
          "timeslot": {
            "$ref": "#/components/schemas/TimeslotItem"
          }
        },
        "type": "object"
      },
      "ServiceAppointments": {
        "properties": {
          "serviceRef": {
            "type": "string",
            "description": "The Service to find the Appointments for"
          },
          "queryDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "When this query request was received"
          },
          "count": {
            "type": "integer",
            "description": "The number of results"
          },
          "appointments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AppointmentItem"
            }
          }
        },
        "type": "object"
      },
      "ServiceReference": {
        "required": [
          "type"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The network service ID (e.g. AVC ID) on which to perform the diagnostic test.",
            "example": "AVC000000000000",
            "pattern": "(AVC|NNL)[0-9]{12}"
          },
          "type": {
            "type": "string",
            "description": "Type of the resource to perform the test on. Refer to 'NPIS Test Specification Documentation' for values.",
            "example": "AVC",
            "enum": [
              "AVC",
              "NNL"
            ]
          }
        },
        "type": "object"
      },
      "ResourceReference": {
        "required": [
          "type"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The network resource ID (e.g. NTD ID) on which to perform the diagnostic test.",
            "example": "NTD000000000000",
            "pattern": "(NTD)[0-9]{12}"
          },
          "type": {
            "type": "string",
            "description": "Type of the resource to perform the test on. Refer to 'NPIS Test Specification Documentation' for values.",
            "example": "NTD",
            "enum": [
              "NTD"
            ]
          }
        },
        "type": "object"
      },
      "DiagnosticsTestParameters": {
        "properties": {
          "parameter_name": {
            "type": "string",
            "description": "Value of the parameter"
          }
        },
        "type": "object"
      },
      "DiagnosticsTestSpecificationRef": {
        "required": [
          "id",
          "version"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier for the Diagnostic Template to be invoked.",
            "example": "TST000000000000",
            "pattern": "TST[0-9]{12}"
          },
          "version": {
            "type": "string",
            "description": "The version for the Diagnostic Template to be invoked. Format is Major.Minor.",
            "example": "1.0",
            "pattern": "^\\d*\\.\\d*"
          }
        },
        "type": "object"
      },
      "ExecutionDate": {
        "properties": {
          "startDateTime": {
            "type": "string",
            "description": "Timestamp when the test execution started"
          },
          "endDateTime": {
            "type": "string",
            "description": "Timestamp when the test execution completed"
          }
        },
        "type": "object"
      },
      "DiagnosticsTestMeasure": {
        "properties": {
          "parameterName": {
            "type": "string",
            "description": "Refer to the 'NPIS Test Specification Documentation' to know more about the test-specific metrics sent."
          }
        },
        "type": "object"
      },
      "DiagnosticsTestResultError": {
        "properties": {
          "code": {
            "type": "string",
            "description": "Unique code representing a specific error scenario."
          },
          "reason": {
            "type": "string",
            "description": "Short description of the error scenario."
          }
        },
        "type": "object"
      },
      "DiagnosticsTestResult": {
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the test for which results are sent"
          },
          "status": {
            "type": "string",
            "description": "Status of the test executed",
            "example": "Accepted",
            "enum": [
              "Accepted",
              "InProgress",
              "Cancelled",
              "Rejected",
              "Completed"
            ]
          },
          "result": {
            "type": "string",
            "description": "Outcome of the test executed",
            "example": "Passed",
            "enum": [
              "Passed",
              "Failed"
            ]
          },
          "testMeasure": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiagnosticsTestMeasure"
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiagnosticsTestResultError"
            }
          }
        },
        "type": "object"
      },
      "DiagnosticsTest": {
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique nbn identifier for this diagnostic test process",
            "example": "WRI000000000000",
            "pattern": "WRI[0-9]{12}"
          },
          "status": {
            "type": "string",
            "description": "Status of the request",
            "example": "Acknowledged",
            "enum": [
              "Acknowledged"
            ]
          },
          "externalId": {
            "type": "string",
            "description": "RSP Reference ID. Will be echoed back in notifications if supplied.",
            "example": "ABC12345678910-001"
          },
          "serviceRef": {
            "$ref": "#/components/schemas/ServiceReference"
          },
          "resourceRef": {
            "$ref": "#/components/schemas/ResourceReference"
          },
          "testParameters": {
            "$ref": "#/components/schemas/DiagnosticsTestParameters"
          },
          "testSpecificationRef": {
            "$ref": "#/components/schemas/DiagnosticsTestSpecificationRef"
          },
          "executionDate": {
            "$ref": "#/components/schemas/ExecutionDate"
          },
          "serviceTestResults": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiagnosticsTestResult"
            }
          }
        },
        "type": "object"
      },
      "FWLocation": {
        "required": [
          "serviceabilityClass"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique ID assigned by NBN to a particular address"
          },
          "serviceabilityClass": {
            "type": "integer",
            "description": "Numerical value that indicates the serviceability of an address."
          }
        },
        "type": "object"
      },
      "FWRelatedResource": {
        "required": [
          "@type"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique ID for the resource"
          },
          "@type": {
            "type": "string",
            "description": "",
            "example": "NTD",
            "enum": [
              "NTD"
            ]
          },
          "hardwareVersion": {
            "type": "string",
            "description": "The hardware version of the resource"
          }
        },
        "type": "object"
      },
      "FWCellUpgradeInfo": {
        "properties": {
          "forecastDate": {
            "type": "string",
            "description": "Forecast date on which nbn is likely to undertake the physical/technical upgrade to the Cell."
          },
          "priorityForecastDate": {
            "type": "string",
            "description": "Forecast date that the Wireless Network cell is expected to become a Priority Upgrade Cell during the next six months."
          },
          "comments": {
            "type": "string",
            "description": "Comments are provided when no forecast upgrade date is provided."
          }
        },
        "type": "object"
      },
      "FWBackhaulUpgradeInfo": {
        "properties": {
          "forecastDate": {
            "type": "string",
            "description": "Forecast date on which nbn is likely to undertake the physical/technical upgrade to the backhaul link. Note: this date indicates whether the LOC ID is served via a Priority Upgrade Link. Average 28 Day Busy Hour Link Packet Loss of 0.25% or greater. Not provided when priorityLink is No."
          },
          "comments": {
            "type": "string",
            "description": "Comments are provided when no backhaul forecast date is available. Not provided when priorityLink is No."
          }
        },
        "type": "object"
      },
      "FWService": {
        "properties": {
          "id": {
            "type": "string",
            "description": "Access Virtual Circuit ID. The Access Virtual Circuit is an Ethernet based Layer 2 virtual connection provided by the 1:1 Unicast data service construct across the nbn™ network that carries customer traffic between a single UNI and E-NNI. Only returned when queried by AVC ID. Not returned when queried by Location ID."
          }
        },
        "type": "object"
      },
      "RelatedCellGroup": {
        "properties": {
          "overallStatus": {
            "type": "string",
            "description": "Provides an indication of the performance of cells on the tower that the Network Termination Device (NTD) is provisioned to, measured across a rolling 7 days. Valid values: No Issue Detected, Potential Issue Detected, Issue Detected.",
            "example": "No Issue Detected",
            "enum": [
              "No Issue Detected",
              "Potential Issue Detected",
              "Issue Detected"
            ]
          }
        },
        "type": "object"
      },
      "FWCellInformation": {
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique Cell ID assigned by NBN. For Service Class 5 locations this will be the predicted Cell ID."
          },
          "siteName": {
            "type": "string",
            "description": "Site name for the base station. For Service Class 5 locations this will be the predicted site name."
          },
          "category": {
            "type": "string",
            "description": "The type of cell.\nValid values:\n- \"Predicted\" (service class 5).\n- \"Serving\" (service class 6)."
          },
          "wirelessServingArea": {
            "type": "string",
            "description": "This is the Fixed Wireless Network nodes in a specific area connected via a backhaul network to a fibre access node. This field is only applicable for service class 6."
          },
          "averageBusyHourThroughputCategory": {
            "type": "string",
            "description": "Identifies the Average 30 Day Downlink Throughput category of the cells during busy hour. When the value is 'less than 3Mbps' or '3 Mbps to less than 6 Mbps', then either a Forecast Date or Comment will be provided. When the value is 'Above 6 Mbps', then no Forecast Date or Comment will be provided."
          },
          "priorityLink": {
            "type": "string",
            "description": "Indicated whether the cell is connected via a priority upgrade link. Valid values: Yes, No, Upgrade. When the value is No, forecastDate and comment is not required. However, when the link is an upgrade, the upgrade has been completed but the link is still reporting an Average 28 Day Busy Hour Link Packet Loss of 0.25% or greater (typically due to the 28 day average not yet reflecting the post-upgrade link performance)."
          },
          "cellUpgradeInfo": {
            "$ref": "#/components/schemas/FWCellUpgradeInfo"
          },
          "backhaulUpgradeInfo": {
            "$ref": "#/components/schemas/FWBackhaulUpgradeInfo"
          },
          "service": {
            "$ref": "#/components/schemas/FWService"
          },
          "relatedCellGroup": {
            "$ref": "#/components/schemas/RelatedCellGroup"
          }
        },
        "type": "object"
      },
      "FWCellPerformanceReport": {
        "required": [
          "location"
        ],
        "properties": {
          "location": {
            "description": "The Location ID and Service Class of the premises.",
            "allOf": [
              {
                "$ref": "#/components/schemas/FWLocation"
              }
            ]
          },
          "relatedResource": {
            "description": "The related resources for the location",
            "allOf": [
              {
                "$ref": "#/components/schemas/FWRelatedResource"
              }
            ]
          },
          "cellInformation": {
            "type": "array",
            "description": "",
            "items": {
              "$ref": "#/components/schemas/FWCellInformation"
            }
          }
        },
        "type": "object"
      },
      "DiagnosticTestListing": {
        "properties": {
          "id": {
            "type": "string",
            "description": "The ID of the Diagnostic Test"
          },
          "type": {
            "type": "string",
            "description": "The Type of Test that was run"
          },
          "status": {
            "type": "string",
            "description": "The Status of Diagnostic Test"
          },
          "result": {
            "type": "string",
            "description": "The Result of the Diagnostic Test"
          },
          "requestDateTime": {
            "type": "string",
            "description": "When the Diagnostic Test was requested."
          }
        },
        "type": "object"
      },
      "TestsForService": {
        "required": [
          "serviceRef"
        ],
        "properties": {
          "serviceRef": {
            "$ref": "#/components/schemas/ServiceReference"
          },
          "queryDateTime": {
            "type": "string",
            "description": "When the query was received"
          },
          "count": {
            "type": "integer",
            "description": "How many tests are included in this result"
          },
          "serviceTests": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiagnosticTestListing"
            }
          }
        },
        "type": "object"
      },
      "TestTypesForService": {
        "required": [
          "serviceRef"
        ],
        "properties": {
          "serviceRef": {
            "$ref": "#/components/schemas/ServiceReference"
          },
          "queryDateTime": {
            "type": "string",
            "description": "When the query was received"
          },
          "testTypes": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "The names of the Test Types eligible to run for this service"
            }
          }
        },
        "type": "object"
      },
      "Contact": {
        "properties": {
          "contactType": {
            "type": "string",
            "description": "Type of contact",
            "example": "Technician",
            "enum": [
              "Technician"
            ]
          },
          "contactName": {
            "type": "string",
            "description": "Full Name of the contact person"
          },
          "firstName": {
            "type": "string",
            "description": "A displayable first name for the contact",
            "example": "Joe",
            "minLength": 1,
            "maxLength": 40
          },
          "lastName": {
            "type": "string",
            "description": "A displayable last name for the contact",
            "example": "Bloggs",
            "minLength": 1,
            "maxLength": 40
          },
          "phoneNumber": {
            "type": "string",
            "description": "Phone Number for end-user contact",
            "example": "+6400000000",
            "minLength": 1,
            "maxLength": 12
          },
          "emailAddress": {
            "type": "string",
            "description": "Email Address of end-user contact",
            "example": "joe.bloggs@example.invalid"
          },
          "notes": {
            "type": "string",
            "description": "Any notes regarding communicating with this contact"
          }
        },
        "type": "object"
      },
      "DeliveryAddress": {
        "properties": {
          "addressLine1": {
            "type": "string",
            "description": "Unstructured address line 1"
          },
          "addressLine2": {
            "type": "string",
            "description": "Unstructured address line 2"
          },
          "addressLine3": {
            "type": "string",
            "description": "Unstructured address line 3"
          },
          "localityName": {
            "type": "string",
            "description": "Town / Suburb / Village / Locality"
          },
          "stateTerritoryCode": {
            "type": "string",
            "description": "State / Territory Code"
          },
          "postCode": {
            "type": "string",
            "description": "Postal Code"
          }
        },
        "type": "object"
      },
      "DispatchDetails": {
        "properties": {
          "authorityToLeave": {
            "type": "boolean",
            "description": "Authority to leave parcel if no-one is home"
          },
          "deliveryInstructions": {
            "type": "string"
          },
          "deliveryContact": {
            "$ref": "#/components/schemas/Contact"
          },
          "deliveryToAddress": {
            "$ref": "#/components/schemas/DeliveryAddress"
          },
          "trackingId": {
            "type": "string",
            "description": "A tracking ID issued by Australia Post if they accept the delivery request"
          },
          "deliveryStatus": {
            "type": "string",
            "description": ""
          },
          "latestEventDate": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Note": {
        "properties": {
          "text": {
            "type": "string",
            "description": "Text of the note"
          },
          "date": {
            "type": "string",
            "description": "Date of the note"
          },
          "author": {
            "type": "string",
            "description": "Author of the note"
          },
          "authorId": {
            "type": "string",
            "description": "UserID of the author of the note"
          },
          "role": {
            "type": "string",
            "description": "Role of the user adding the comment."
          }
        },
        "type": "object"
      },
      "AppointmentReference": {
        "properties": {
          "href": {
            "type": "string",
            "description": "Hyperlink to access the appointment"
          },
          "id": {
            "type": "string",
            "description": "NBN ID for the appointment."
          },
          "@referredType": {
            "type": "string",
            "description": "Indicates the (class) type of resource."
          }
        },
        "type": "object"
      },
      "QuoteReference": {
        "properties": {
          "href": {
            "type": "string",
            "description": "Hyperlink to access the quote."
          },
          "id": {
            "type": "string",
            "description": "NBN ID for the quote."
          },
          "@referredType": {
            "type": "string",
            "description": "Indicates the (class) type of resource."
          }
        },
        "type": "object"
      },
      "ProductSpecificationReference": {
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the product specification."
          },
          "name": {
            "type": "string",
            "description": "Name of the product specification"
          },
          "version": {
            "type": "string",
            "description": "Version of the product specification."
          },
          "specificationType": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "BaseProductReferenceOrValue": {
        "description": "A product, resource or service on an order. The identifier is always present; the remaining fields are those nbn returns for the kind of thing it is (a Product Instance, an NTD, a UNI-D port, or an AVC), so a given record carries the subset that applies to it.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the product"
          },
          "@referredType": {
            "type": "string",
            "description": ""
          },
          "productSpecification": {
            "$ref": "#/components/schemas/ProductSpecificationReference"
          },
          "accessServiceTechnologyType": {
            "type": "string",
            "description": "The access technology delivering the service.",
            "example": "Fixed Wireless"
          },
          "orderSla": {
            "type": "string",
            "description": "The Order SLA applied to the order."
          },
          "serviceRestorationSla": {
            "type": "string",
            "description": "The Service Restoration SLA applied to the service."
          },
          "priorityAssist": {
            "type": "string",
            "description": "Whether the service carries Priority Assistance.",
            "example": "No"
          },
          "informedConsent": {
            "type": "string",
            "description": "Whether Informed Consent was recorded for the order.",
            "example": "Yes"
          },
          "location": {
            "type": "string",
            "description": "Where the NTD is installed.",
            "example": "Indoor"
          },
          "ntdType": {
            "type": "string",
            "description": "The NTD type.",
            "example": "Internal"
          },
          "region": {
            "type": "string",
            "description": "The nbn region the premises sits in.",
            "example": "Remote"
          },
          "csaId": {
            "type": "string",
            "description": "The nbn Connectivity Serving Area the premises belongs to."
          },
          "uniType": {
            "type": "string",
            "description": "The UNI type of the port.",
            "example": "UNI-D"
          },
          "uniTransientId": {
            "type": "string",
            "description": "The port's label at the premises.",
            "example": "UNI-D1"
          },
          "portId": {
            "type": "string",
            "description": "The UNI-D Port number.",
            "example": "1"
          },
          "interfaceType": {
            "type": "string",
            "description": "The physical interface of the UNI-D port.",
            "example": "10/100/1000BASE-T"
          },
          "speedAndDuplex": {
            "type": "string",
            "description": "The negotiated speed and duplex of the UNI-D port."
          },
          "vlanMode": {
            "type": "string",
            "description": "The VLAN mode the service was provisioned with.",
            "example": "Default-Mapped"
          },
          "avcType": {
            "type": "string",
            "description": "The AVC type.",
            "example": "1:1"
          },
          "avcTransientId": {
            "type": "string",
            "description": "The AVC's label at the premises.",
            "example": "AVC-D1"
          },
          "bandwidthProfile": {
            "type": "string",
            "description": "The bandwidth profile provisioned on the AVC.",
            "example": "D25_U10_Mbps_TC4_P"
          },
          "accessLoopIdentification": {
            "type": "string",
            "description": "Whether Access Loop Identification is active on the service."
          },
          "connectedToUni": {
            "type": "string",
            "description": "The UNI-D resource this service is delivered over."
          }
        },
        "type": "object"
      },
      "OrderItem": {
        "properties": {
          "id": {
            "type": "string",
            "description": "Identifier of the line item (generally it is a sequence number 01, 02, 03, ...). Default is \"01\""
          },
          "action": {
            "type": "string",
            "description": "The action to be carried out on the Product.",
            "example": "ADD",
            "enum": [
              "ADD",
              "MODIFY",
              "DELETE",
              "NO CHANGE"
            ]
          },
          "product": {
            "$ref": "#/components/schemas/BaseProductReferenceOrValue"
          }
        },
        "type": "object"
      },
      "ProductOrder": {
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique NBN Order ID, or a Check Networks PND while nbn does not hold the order (Acknowledged before it reaches nbn, or PendingReview)."
          },
          "href": {
            "type": "string",
            "description": "Link to this Order on the Check Networks API."
          },
          "orderType": {
            "type": "string",
            "description": "The type of order: Connect a new service, Modify an existing service, or Disconnect an existing service",
            "example": "Connect",
            "enum": [
              "Connect",
              "Disconnect",
              "Modify"
            ]
          },
          "state": {
            "type": "string",
            "description": "The current state of the order as per the nbn Product Order state model, plus one Check Networks state. PendingReview: the order passed Check Networks' checks but nbn could not accept it as Check Networks sent it. The fault is ours and nothing is needed from you: Check Networks will correct and resubmit it. Until nbn gives it an Order ID its id is a Check Networks PND, which GET /nbn/orders/product/{orderId} accepts and keeps accepting afterwards. It ends Cancelled if it cannot be placed. A genuine refusal (for example informed consent not evidenced, or no NTD capacity) is never PendingReview: the order is refused with a 422.",
            "example": "Acknowledged",
            "enum": [
              "Acknowledged",
              "InProgress",
              "PendingReview",
              "Rejected",
              "Cancelled",
              "Complete"
            ]
          },
          "subState": {
            "type": "string",
            "description": "The current substate of the order as per the nbn Product Order state model.",
            "example": "Held",
            "enum": [
              "Held",
              "Pending"
            ]
          },
          "orderDate": {
            "type": "string",
            "format": "date-time",
            "description": "Date when the order was created"
          },
          "completionDate": {
            "type": "string",
            "format": "date-time",
            "description": "Date when the order was completed"
          },
          "plannedCompletionDate": {
            "type": "string",
            "format": "date-time",
            "description": "Date when all appointments and the order expected to be completed"
          },
          "plannedExpiryDate": {
            "type": "string",
            "format": "date-time",
            "description": "When time to complete the assistance requested is required by"
          },
          "dispatchDetails": {
            "$ref": "#/components/schemas/DispatchDetails"
          },
          "interactionCount": {
            "type": "integer",
            "description": "Contains the number of Request More Time extensions successfully requested to date."
          },
          "reasonCode": {
            "$ref": "#/components/schemas/ReasonCode"
          },
          "note": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Note"
            }
          },
          "infrastructurePlannedDate": {
            "type": "string",
            "format": "date-time",
            "description": "Date when the infrastructure will be available"
          },
          "appointment": {
            "$ref": "#/components/schemas/AppointmentReference"
          },
          "relatedPlace": {
            "$ref": "#/components/schemas/RelatedPlace"
          },
          "quote": {
            "$ref": "#/components/schemas/QuoteReference"
          },
          "orderItem": {
            "$ref": "#/components/schemas/OrderItem"
          },
          "realizedResource": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderItem"
            }
          },
          "realizedService": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderItem"
            }
          }
        },
        "type": "object"
      },
      "DelayedOrders": {
        "properties": {
          "queryDateTime": {
            "type": "string",
            "description": "When this query was received"
          },
          "count": {
            "type": "integer",
            "description": "Number of Delayed Orders in the results"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DelayedOrderItem"
            }
          }
        },
        "type": "object"
      },
      "NfasProductOrderRequest": {
        "type": "object",
        "required": [
          "locId",
          "bandwidthProductSku",
          "orderReference",
          "ntdId",
          "informedConsent"
        ],
        "dependentRequired": {
          "transferType": [
            "customerAuthorityDate",
            "unidPortId"
          ],
          "serviceRef": [
            "transferType"
          ],
          "uniVlanId": [
            "vlanMode"
          ],
          "fromPortId": [
            "overlapPeriod"
          ]
        },
        "dependentSchemas": {
          "ntdId": {
            "if": {
              "properties": {
                "ntdId": {
                  "const": "NEW"
                }
              }
            },
            "then": {
              "required": [
                "appointmentId"
              ]
            },
            "else": {
              "not": {
                "required": [
                  "appointmentId"
                ]
              }
            }
          },
          "transferType": {
            "if": {
              "properties": {
                "transferType": {
                  "const": "Service Transfer"
                }
              }
            },
            "then": {
              "required": [
                "serviceRef"
              ]
            },
            "else": {
              "not": {
                "required": [
                  "serviceRef"
                ]
              }
            }
          },
          "vlanMode": {
            "if": {
              "properties": {
                "vlanMode": {
                  "const": "Tagged"
                }
              }
            },
            "then": {
              "required": [
                "uniVlanId"
              ]
            }
          },
          "overlapPeriod": {
            "allOf": [
              {
                "required": [
                  "transferType"
                ],
                "properties": {
                  "transferType": {
                    "const": "Service Transfer"
                  }
                }
              },
              {
                "if": {
                  "properties": {
                    "overlapPeriod": {
                      "const": "4"
                    }
                  }
                },
                "then": {
                  "required": [
                    "fromPortId",
                    "unidPortId"
                  ]
                }
              }
            ]
          }
        },
        "properties": {
          "locId": {
            "type": "string",
            "pattern": "^LOC\\d{12}$",
            "description": "The NBN Location ID for the premises the order is for."
          },
          "bandwidthProductSku": {
            "type": "string",
            "maxLength": 64,
            "description": "Product SKU of the Bandwidth Product being ordered.\nThis controls which Service Layer (Layer 2 or Layer 3) this Order can be Provisioned with.\nUse the Product Qualification > Eligible Bandwidth Products API to find selectable options for the Location (LOC #)\n"
          },
          "restorationSlaSku": {
            "type": "string",
            "maxLength": 64,
            "description": "(Optional) Product SKU of the Service Restoration SLA.\nIf omitted, the Standard SLA (\"NBN-SLA-TC4-STD\") is applied.\nIndicates how quick NBN responds should this service be affected by an issue, depending upon the SLA Region.\nResponse times are Business Hours unless a (24/7) SLA is selected.\nEnhanced or Premium SLAs may incur an additional monthly cost.\nBundled SLA Product SKUs will only be accepted when provided with an eligible Bandwidth Product SKU.\nUse the Product Qualification > Eligible Restoration SLA Products API to find selectable options for the Location (LOC #).\n"
          },
          "orderReference": {
            "type": "string",
            "maxLength": 35,
            "pattern": "^[A-Za-z0-9._-]+$",
            "description": "Your Reference Number for this order. Max of 35 characters.\nOnly alphabetic characters (\"a-Z\"), numbers (\"0-9\"), underscores (\"_\"), hyphens (\"-\") and periods (\".\") are allowed.\n\nEXAMPLES:\n - \"New.Foo_BAR-2020-09-20\"\n - \"ExampleCompanyName\"\n - \"JaneCitizen-123456\"\n - \"Reseller.EndUser.123456\"\n"
          },
          "endUserRef": {
            "type": "string",
            "description": "NOT ACCEPTED: supplying this field returns 422. The platform assigns the End User; this API has no End User (Party) records.\nThe Reference (EUP #) of the End User to associate this Order to.\n\nEXAMPLES:\n - \"EUP000000000000\"\n"
          },
          "priorityAssist": {
            "type": "boolean",
            "default": false,
            "description": "(Optional) Whether Priority Assistance is required.\nDefaults to \"false\" if value not set.\nOnly specify \"true\" where the end user is eligible for a Downstream Priority Assistance Service in accordance with NBN Co's Wholesale Broadband Agreement.\n\"true\" is accepted only for a customer on our Priority Assistance register (the end user named in `endUser`, or when none is named the account or your own end user, never another end user's); otherwise the order is refused with a 422 on `priorityAssist` before anything is drafted."
          },
          "endUser": {
            "type": "string",
            "maxLength": 64,
            "description": "(Optional) Ours, not the carrier's `endUserRef`: the number of the end user the order is for, as `POST /data/orders` takes it. The order and its service are that end user's. With `priorityAssist` true it is that end user's registration that counts; an end user that is not this account's is refused with a 422 on `priorityAssist`, or on `endUser` without the flag."
          },
          "ntdId": {
            "type": "string",
            "maxLength": 32,
            "description": "The Reference Number of the Network Termination Device (NTD) to place the order against.\nSpecify \"NEW\" in this field to order a New NTD, but only if there are no free ports on any existing NTDs at the premises.\n"
          },
          "appointmentId": {
            "type": "string",
            "maxLength": 48,
            "description": "(Conditional) NBN Appointment ID to attach to this order.\nAn Appointment with Demand Type \"Standard Install\" is required\nwhen `ntdId` is \"NEW\" — a technician attends to install the NTD.\nTaking a port on an NTD that is already installed requires no\nappointment.\n"
          },
          "unidPortId": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "1",
              "2",
              "3",
              "4",
              null
            ],
            "description": "(Conditional) The Port ID for the UNI-D Resource. Required for Service Transfers or where you want to specify an exact port.\nNBN will assign the next available port where this field is not supplied or is `null`."
          },
          "transferType": {
            "type": "string",
            "maxLength": 32,
            "enum": [
              "Service Transfer",
              "Service Transfer Reversal",
              "Connect Outstanding"
            ],
            "description": "(Conditional) Service Transfer Type.\nOnly applicable to, and is mandatory for Service Transfers.\n - \"Service Transfer\" - transfer an existing nbn service from another provider to you.\n - \"Service Transfer Reversal\" - recover an existing service that was incorrectly transferred away from you.\n - \"Connect Outstanding\" - connect a new service over a line that still has an existing active service not controlled by the End User.  This requires time to legally cancel the existing service.\n"
          },
          "occupancyDocumentId": {
            "type": "string",
            "format": "uuid",
            "description": "(Optional, ours) On a Connect Outstanding, the `id` of a proof of occupancy uploaded with `POST /data/occupancy-documents`: evidence that the End User occupies the premises. It is kept with the order and used by that order only: a retry with the same `orderReference` may name it again. Another account's, or one another order used, is a 422."
          },
          "serviceRef": {
            "type": "string",
            "maxLength": 32,
            "description": "(Conditional) Service ID (AVC #) for Service Transfer.\nOnly applicable to, and is mandatory for, Service Transfers.\n\nIMPORTANT > Validate the AVC # against the CPI # or NTD + UNI Port using the SQ Single Site API first."
          },
          "customerAuthorityDate": {
            "type": "string",
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "string",
                "format": "date-time"
              }
            ],
            "description": "(Conditional) Date the Customer authorised this order, as `YYYY-MM-DD` (a date-time is read as its date). Must be within the last 45 calendar days only.\nThis is only applicable to Service Transfers and required if `transferType` is \"Service Transfer\" or \"Connect Outstanding\"."
          },
          "informedConsent": {
            "type": "boolean",
            "description": "Verification that the End User has provided Informed Consent for this order to be placed."
          },
          "overlapPeriod": {
            "type": "string",
            "enum": [
              "0",
              "4"
            ],
            "description": "(Optional) The overlap period for Service Transfers.\nFor use when transferring a service to a new UNI-D Port.  The number of hours after Order Completion during which the service will be active on both the old and new ports.  The End User infrastructure should be updated during this period.\nOnly applicable to Service Transfers."
          },
          "fromPortId": {
            "type": "string",
            "enum": [
              "1",
              "2",
              "3",
              "4"
            ],
            "description": "(Conditional) The UNI-D Port ID of the existing service. Specify the new Port ID via `unidPortId`.\nOnly applicable to Service Transfers and is mandatory if the `overlapPeriod` value is \"4\"."
          },
          "vlanMode": {
            "type": "string",
            "enum": [
              "Default-Mapped",
              "Tagged"
            ],
            "description": "(Optional) The VLAN Mode determines which Product Template will be used when ordering this connection.\n\nIMPORTANT> Do not specify unless explicitly needed.\n\nWhen this field is not specified, \"Default-Mapped\" will be the assumed value.\nIntended mainly for transitioning existing \"Tagged\" PPPoE services without needing to change the client CPE configuration.\n\nIMPORTANT> You cannot change this value with a Modify Order. Instead, the service must be cancelled and reordered, potentially bringing the service down for 24-48 hours.\n"
          },
          "uniVlanId": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4094,
            "description": "(Conditional) Required if `vlanMode` is \"Tagged\"\nThe UNI VLAN ID # used to tag the service traffic.\nThe value should be between 1 and 4094."
          }
        }
      },
      "schema": {
        "type": "object",
        "required": [
          "locId",
          "bandwidthProductSku",
          "orderReference",
          "ntdId",
          "informedConsent"
        ],
        "dependentRequired": {
          "transferType": [
            "customerAuthorityDate"
          ],
          "serviceRef": [
            "transferType"
          ],
          "uniVlanId": [
            "vlanMode"
          ],
          "deliverToLocation": [
            "deliveryContactType",
            "deliveryContactName",
            "deliveryContactPhone",
            "authorisedToLeave",
            "installationWorkforce"
          ]
        },
        "dependentSchemas": {
          "ntdId": {
            "if": {
              "properties": {
                "ntdId": {
                  "const": "NEW"
                }
              }
            },
            "then": {
              "required": [
                "appointmentId"
              ]
            },
            "else": {
              "not": {
                "required": [
                  "appointmentId"
                ]
              }
            }
          },
          "transferType": {
            "if": {
              "properties": {
                "transferType": {
                  "const": "Service Transfer"
                }
              }
            },
            "then": {
              "required": [
                "serviceRef"
              ]
            },
            "else": {
              "not": {
                "required": [
                  "serviceRef"
                ]
              }
            }
          },
          "vlanMode": {
            "if": {
              "properties": {
                "vlanMode": {
                  "const": "Tagged"
                }
              }
            },
            "then": {
              "required": [
                "uniVlanId"
              ]
            }
          },
          "deliveryAddressLine1": {
            "required": [
              "deliverToLocation"
            ]
          },
          "installationWorkforce": {
            "if": {
              "properties": {
                "installationWorkforce": {
                  "const": "NBN Co Install End User"
                }
              }
            },
            "else": {
              "not": {
                "required": [
                  "deliverToLocation"
                ]
              }
            }
          },
          "deliverToLocation": {
            "allOf": [
              {
                "if": {
                  "properties": {
                    "deliverToLocation": {
                      "const": true
                    }
                  }
                },
                "then": {
                  "allOf": [
                    {
                      "not": {
                        "required": [
                          "deliveryAddressLine1"
                        ]
                      }
                    },
                    {
                      "not": {
                        "required": [
                          "deliveryAddressLine2"
                        ]
                      }
                    },
                    {
                      "not": {
                        "required": [
                          "deliveryLocalityName"
                        ]
                      }
                    },
                    {
                      "not": {
                        "required": [
                          "deliveryStateTerritoryCode"
                        ]
                      }
                    },
                    {
                      "not": {
                        "required": [
                          "deliveryPostcode"
                        ]
                      }
                    }
                  ]
                }
              },
              {
                "if": {
                  "properties": {
                    "deliverToLocation": {
                      "const": false
                    }
                  }
                },
                "then": {
                  "required": [
                    "deliveryAddressLine1",
                    "deliveryLocalityName",
                    "deliveryStateTerritoryCode",
                    "deliveryPostcode"
                  ]
                }
              }
            ]
          }
        },
        "properties": {
          "locId": {
            "type": "string",
            "pattern": "^LOC\\d{12}$",
            "description": "The NBN Location ID for the premises the order is for."
          },
          "bandwidthProductSku": {
            "type": "string",
            "maxLength": 64,
            "description": "Product SKU of the Bandwidth Product being ordered.\nThis controls which Service Layer (Layer 2 or Layer 3) this Order can be Provisioned with.\nUse the Product Qualification > Eligible Bandwidth Products API to find selectable options for the Location (LOC #)\n"
          },
          "restorationSlaSku": {
            "type": "string",
            "maxLength": 64,
            "description": "(Optional) Product SKU of the Service Restoration SLA.\nIf omitted, the Standard SLA (\"NBN-SLA-TC4-STD\") is applied.\nIndicates how quick NBN responds should this service be affected by an issue, depending upon the SLA Region.\nResponse times are Business Hours unless a (24/7) SLA is selected.\nEnhanced or Premium SLAs may incur an additional monthly cost.\nBundled SLA Product SKUs will only be accepted when provided with an eligible Bandwidth Product SKU.\nUse the Product Qualification > Eligible Restoration SLA Products API to find selectable options for the Location (LOC #).\n"
          },
          "orderReference": {
            "type": "string",
            "maxLength": 35,
            "pattern": "^[A-Za-z0-9._-]+$",
            "description": "Your Reference Number for this order. Max of 35 characters.\nOnly alphabetic characters (\"a-Z\"), numbers (\"0-9\"), underscores (\"_\"), hyphens (\"-\") and periods (\".\") are allowed.\n\nEXAMPLES:\n - \"New.Foo_BAR-2020-09-20\"\n - \"ExampleCompanyName\"\n - \"JaneCitizen-123456\"\n - \"Reseller.EndUser.123456\"\n"
          },
          "endUserRef": {
            "type": "string",
            "description": "NOT ACCEPTED: supplying this field returns 422. The platform assigns the End User; this API has no End User (Party) records.\nThe Reference (EUP #) of the End User to associate this Order to.\n\nEXAMPLES:\n - \"EUP000000000000\"\n"
          },
          "priorityAssist": {
            "type": "boolean",
            "default": false,
            "description": "(Optional) Whether Priority Assistance is required.\nDefaults to \"false\" if value not set.\nOnly specify \"true\" where the end user is eligible for a Downstream Priority Assistance Service in accordance with NBN Co's Wholesale Broadband Agreement.\n\"true\" is accepted only for a customer on our Priority Assistance register (the end user named in `endUser`, or when none is named the account or your own end user, never another end user's); otherwise the order is refused with a 422 on `priorityAssist` before anything is drafted."
          },
          "endUser": {
            "type": "string",
            "maxLength": 64,
            "description": "(Optional) Ours, not the carrier's `endUserRef`: the number of the end user the order is for, as `POST /data/orders` takes it. The order and its service are that end user's. With `priorityAssist` true it is that end user's registration that counts; an end user that is not this account's is refused with a 422 on `priorityAssist`, or on `endUser` without the flag."
          },
          "ntdId": {
            "type": "string",
            "maxLength": 32,
            "description": "The Reference Number of the Network Termination Device (NTD) to place the order against.\nSpecify \"NEW\" in this field to order against a new NTD.\n"
          },
          "appointmentId": {
            "type": "string",
            "maxLength": 48,
            "description": "(Conditional) NBN Appointment ID to attach to this order.\nAn Appointment with Demand Type \"Standard Install\" is required for premises with:\n - Service Class 21\n - Service Class 22\n - Service Class 23\n - Service Class 24 when ordering a new NTD\n"
          },
          "transferType": {
            "type": "string",
            "maxLength": 32,
            "enum": [
              "Service Transfer",
              "Service Transfer Reversal",
              "Connect Outstanding"
            ],
            "description": "(Conditional) Service Transfer Type.\nOnly applicable to, and is mandatory for Service Transfers.\n - \"Service Transfer\" - transfer an existing nbn service from another provider to you.\n - \"Service Transfer Reversal\" - recover an existing service that was incorrectly transferred away from you.\n - \"Connect Outstanding\" - connect a new service over a line that still has an existing active service not controlled by the End User.  This requires time to legally cancel the existing service.\n"
          },
          "occupancyDocumentId": {
            "type": "string",
            "format": "uuid",
            "description": "(Optional, ours) On a Connect Outstanding, the `id` of a proof of occupancy uploaded with `POST /data/occupancy-documents`: evidence that the End User occupies the premises. It is kept with the order and used by that order only: a retry with the same `orderReference` may name it again. Another account's, or one another order used, is a 422."
          },
          "serviceRef": {
            "type": "string",
            "maxLength": 32,
            "description": "(Conditional) Service ID (AVC #) for Service Transfer.\nOnly applicable to, and is mandatory for, Service Transfers.\n\nIMPORTANT > Validate the AVC # against the CPI # or NTD + UNI Port using the SQ Single Site API first."
          },
          "customerAuthorityDate": {
            "type": "string",
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "string",
                "format": "date-time"
              }
            ],
            "description": "(Conditional) Date the Customer authorised this order, as `YYYY-MM-DD` (a date-time is read as its date). Must be within the last 45 calendar days only.\nThis is only applicable to Service Transfers and required if `transferType` is \"Service Transfer\" or \"Connect Outstanding\"."
          },
          "informedConsent": {
            "type": "boolean",
            "description": "Verification that the End User has provided Informed Consent for this order to be placed."
          },
          "installationWorkforce": {
            "type": "string",
            "enum": [
              "NBN Co Install",
              "NBN Co Install End User"
            ],
            "description": "(Conditional) Who installs the NTD.\n\nService Class 21 and 22: \"NBN Co Install\" — a technician\nattends.\n\nService Class 23: \"NBN Co Install\" for a technician, or\n\"NBN Co Install End User\" for a self-install, where nbn\ndelivers the NTD and the delivery fields below apply.\n\nService Class 24: must NOT be supplied unless the order also\nrequests a new NTD — there is nothing to install.\n"
          },
          "deliveryContactType": {
            "type": "string",
            "maxLength": 32,
            "description": "(Conditional) The type of contact to receive the NTD delivery.\nRequired for Service Class 23 locations that are awaiting the delivery of the NTD."
          },
          "deliveryContactName": {
            "type": "string",
            "maxLength": 64,
            "description": "(Conditional) The name of the contact person to receive the NTD delivery.\nRequired for Service Class 23 locations that are awaiting the delivery of the NTD."
          },
          "deliveryContactPhone": {
            "type": "string",
            "maxLength": 32,
            "description": "(Conditional) The phone number of the contact person to receive the NTD delivery.\nRequired for Service Class 23 locations that are awaiting the delivery of the NTD."
          },
          "deliveryContactEmail": {
            "type": "string",
            "format": "email",
            "maxLength": 128,
            "description": "(Optional) The email address of the contact person to receive the NTD delivery.\nSpecify for Service Class 23 locations that are awaiting the delivery of the NTD."
          },
          "deliveryInstructions": {
            "type": "string",
            "maxLength": 255,
            "description": "(Optional) Custom instructions for the delivery of the NTD.\nOnly specify for Service Class 23 locations that are awaiting the delivery of the NTD."
          },
          "authorisedToLeave": {
            "type": "boolean",
            "description": "(Optional) Is the delivery agent authorised to leave the NTD at the Delivery Address if the Delivery Contact is not present at the time?\nOnly specify for Service Class 23 locations that are awaiting the delivery of the NTD."
          },
          "deliverToLocation": {
            "type": "boolean",
            "description": "(Conditional) Deliver the NTD to the premises being connected.\n\nSet false to have it delivered somewhere else, in which case\nthe delivery address fields are required.\n"
          },
          "deliveryAddressLine1": {
            "type": "string",
            "maxLength": 80,
            "description": "(Optional) First line of the delivery street address.\nSpecify for Service Class 23 locations that are awaiting the delivery of the NTD where `deliverToLocation` is \"false\"."
          },
          "deliveryAddressLine2": {
            "type": "string",
            "maxLength": 80,
            "description": "(Optional) Second line of the delivery street address.\nSpecify for Service Class 23 locations that are awaiting the delivery of the NTD where `deliverToLocation` is \"false\"."
          },
          "deliveryLocalityName": {
            "type": "string",
            "maxLength": 64,
            "description": "(Optional) Town / Suburb / Locality name for the delivery address.\nSpecify for Service Class 23 locations that are awaiting the delivery of the NTD where `deliverToLocation` is \"false\"."
          },
          "deliveryStateTerritoryCode": {
            "type": "string",
            "maxLength": 3,
            "description": "(Optional) State / Territory code for the delivery address.\nSpecify for Service Class 23 locations that are awaiting the delivery of the NTD where `deliverToLocation` is \"false\"."
          },
          "deliveryPostcode": {
            "type": "string",
            "maxLength": 4,
            "description": "(Optional) Postal Code for the delivery address.\nSpecify for Service Class 23 locations that are awaiting the delivery of the NTD where `deliverToLocation` is \"false\"."
          },
          "vlanMode": {
            "type": "string",
            "enum": [
              "Default-Mapped",
              "Tagged"
            ],
            "description": "(Optional) The VLAN Mode determines which Product Template will be used when ordering this connection.\n\nIMPORTANT> Do not specify unless explicitly needed.\n\nWhen this field is not specified, \"Default-Mapped\" will be the assumed value.\nIntended mainly for transitioning existing \"Tagged\" PPPoE services without needing to change the client CPE configuration.\n\nIMPORTANT> You cannot change this value with a Modify Order. Instead, the service must be cancelled and reordered, potentially bringing the service down for 24-48 hours.\n"
          },
          "uniVlanId": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4094,
            "description": "(Conditional) Required if `vlanMode` is \"Tagged\"\nThe UNI VLAN ID # used to tag the service traffic.\nThe value should be between 1 and 4094."
          }
        }
      },
      "schema-2": {
        "type": "object",
        "required": [
          "locId",
          "bandwidthProductSku",
          "orderReference",
          "copperPairId",
          "informedConsent"
        ],
        "dependentRequired": {
          "transferType": [
            "customerAuthorityDate"
          ],
          "serviceRef": [
            "transferType"
          ],
          "uniVlanId": [
            "vlanMode"
          ]
        },
        "dependentSchemas": {
          "transferType": {
            "if": {
              "properties": {
                "transferType": {
                  "const": "Service Transfer"
                }
              }
            },
            "then": {
              "required": [
                "serviceRef"
              ]
            },
            "else": {
              "not": {
                "required": [
                  "serviceRef"
                ]
              }
            }
          },
          "vlanMode": {
            "if": {
              "properties": {
                "vlanMode": {
                  "const": "Tagged"
                }
              }
            },
            "then": {
              "required": [
                "uniVlanId"
              ]
            }
          }
        },
        "properties": {
          "locId": {
            "type": "string",
            "pattern": "^LOC\\d{12}$",
            "description": "The NBN Location ID for the premises the order is for."
          },
          "bandwidthProductSku": {
            "type": "string",
            "maxLength": 64,
            "description": "Product SKU of the Bandwidth Product being ordered.\nThis controls which Service Layer (Layer 2 or Layer 3) this Order can be Provisioned with.\nUse the Product Qualification > Eligible Bandwidth Products API to find selectable options for the Location (LOC #)\n"
          },
          "restorationSlaSku": {
            "type": "string",
            "maxLength": 64,
            "description": "(Optional) Product SKU of the Service Restoration SLA.\nIf omitted, the Standard SLA (\"NBN-SLA-TC4-STD\") is applied.\nIndicates how quick NBN responds should this service be affected by an issue, depending upon the SLA Region.\nResponse times are Business Hours unless a (24/7) SLA is selected.\nEnhanced or Premium SLAs may incur an additional monthly cost.\nBundled SLA Product SKUs will only be accepted when provided with an eligible Bandwidth Product SKU.\nUse the Product Qualification > Eligible Restoration SLA Products API to find selectable options for the Location (LOC #).\n"
          },
          "orderReference": {
            "type": "string",
            "maxLength": 35,
            "pattern": "^[A-Za-z0-9._-]+$",
            "description": "Your Reference Number for this order. Max of 35 characters.\nOnly alphabetic characters (\"a-Z\"), numbers (\"0-9\"), underscores (\"_\"), hyphens (\"-\") and periods (\".\") are allowed.\n\nEXAMPLES:\n - \"New.Foo_BAR-2020-09-20\"\n - \"ExampleCompanyName\"\n - \"JaneCitizen-123456\"\n - \"Reseller.EndUser.123456\"\n"
          },
          "endUserRef": {
            "type": "string",
            "description": "NOT ACCEPTED: supplying this field returns 422. The platform assigns the End User; this API has no End User (Party) records.\nThe Reference (EUP #) of the End User to associate this Order to.\n\nEXAMPLES:\n - \"EUP000000000000\"\n"
          },
          "priorityAssist": {
            "type": "boolean",
            "default": false,
            "description": "(Optional) Whether Priority Assistance is required.\nDefaults to \"false\" if value not set.\nOnly specify \"true\" where the end user is eligible for a Downstream Priority Assistance Service in accordance with NBN Co's Wholesale Broadband Agreement.\n\"true\" is accepted only for a customer on our Priority Assistance register (the end user named in `endUser`, or when none is named the account or your own end user, never another end user's); otherwise the order is refused with a 422 on `priorityAssist` before anything is drafted."
          },
          "endUser": {
            "type": "string",
            "maxLength": 64,
            "description": "(Optional) Ours, not the carrier's `endUserRef`: the number of the end user the order is for, as `POST /data/orders` takes it. The order and its service are that end user's. With `priorityAssist` true it is that end user's registration that counts; an end user that is not this account's is refused with a 422 on `priorityAssist`, or on `endUser` without the flag."
          },
          "copperPairId": {
            "type": "string",
            "maxLength": 32,
            "description": "The copper pair (CPI #) this order runs over, or \"NEW\" to\norder a new line.\n\nUse the Service Qualification API to see the pairs at the\npremises. \"NEW\" is not accepted where the premises already has\na spare pair — the existing one must be used.\n"
          },
          "appointmentId": {
            "type": "string",
            "maxLength": 48,
            "description": "(Conditional) NBN Appointment ID to attach to this order.\n\nService Class 13 and 33: no appointment — unless you are\nordering a new line (\"NEW\") because every pair at the premises\nis in use.\n\nService Class 12 Active without a central splitter: an\nappointment with Demand Type \"Non EU Jumper Only\" — the work is\nat the exchange, not the premises.\n\nEvery other case: an appointment with Demand Type\n\"Standard Install\".\n"
          },
          "informedConsent": {
            "type": "boolean",
            "description": "Verification that the End User has provided Informed Consent for this order to be placed."
          },
          "transferType": {
            "type": "string",
            "maxLength": 32,
            "enum": [
              "Service Transfer",
              "Service Transfer Reversal",
              "Connect Outstanding"
            ],
            "description": "(Conditional) Service Transfer Type.\nOnly applicable to, and is mandatory for Service Transfers.\n - \"Service Transfer\" - transfer an existing nbn service from another provider to you.\n - \"Service Transfer Reversal\" - recover an existing service that was incorrectly transferred away from you.\n - \"Connect Outstanding\" - connect a new service over a line that still has an existing active service not controlled by the End User.  This requires time to legally cancel the existing service.\n"
          },
          "occupancyDocumentId": {
            "type": "string",
            "format": "uuid",
            "description": "(Optional, ours) On a Connect Outstanding, the `id` of a proof of occupancy uploaded with `POST /data/occupancy-documents`: evidence that the End User occupies the premises. It is kept with the order and used by that order only: a retry with the same `orderReference` may name it again. Another account's, or one another order used, is a 422."
          },
          "serviceRef": {
            "type": "string",
            "maxLength": 32,
            "description": "(Conditional) Service ID (AVC #) for Service Transfer.\nOnly applicable to, and is mandatory for, Service Transfers.\n\nIMPORTANT > Validate the AVC # against the CPI # or NTD + UNI Port using the SQ Single Site API first."
          },
          "customerAuthorityDate": {
            "type": "string",
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "string",
                "format": "date-time"
              }
            ],
            "description": "(Conditional) Date the Customer authorised this order, as `YYYY-MM-DD` (a date-time is read as its date). Must be within the last 45 calendar days only.\nThis is only applicable to Service Transfers and required if `transferType` is \"Service Transfer\" or \"Connect Outstanding\"."
          },
          "potsInterconnect": {
            "type": "string",
            "maxLength": 32,
            "description": "(Conditional) The Full National Number (FNN) or Unconditioned\nLocal Loop (ULL) of the phone service being transitioned, also\ncalled the Transition Service Identifier.\n\nRequired for a Service Class 12 Active line. Must NOT be\nsupplied for a Service Class 13 or 34 line, or for an Inactive\nService Class 12, 31, 32 or 33 line.\n"
          },
          "installationWorkforce": {
            "type": "string",
            "enum": [
              "NBN Co Install",
              "NBN Co Install End User"
            ],
            "description": "(Conditional) Who performs the installation.\n\n\"NBN Co Install End User\" is only available at a Service Class\n33 premises. Everywhere else an installation is required, it\nis \"NBN Co Install\" — a technician attends.\n"
          },
          "installOptionCentralSplitter": {
            "type": "boolean",
            "default": false,
            "description": "(Optional) Install a central splitter.\n\nOnly applicable to a Service Class 12 line, and rare even\nthere. Defaults to false.\n"
          },
          "vlanMode": {
            "type": "string",
            "enum": [
              "Default-Mapped",
              "Tagged"
            ],
            "description": "(Optional) The VLAN Mode determines which Product Template will be used when ordering this connection.\n\nIMPORTANT> Do not specify unless explicitly needed.\n\nWhen this field is not specified, \"Default-Mapped\" will be the assumed value.\nIntended mainly for transitioning existing \"Tagged\" PPPoE services without needing to change the client CPE configuration.\n\nIMPORTANT> You cannot change this value with a Modify Order. Instead, the service must be cancelled and reordered, potentially bringing the service down for 24-48 hours.\n"
          },
          "uniVlanId": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4094,
            "description": "(Conditional) Required if `vlanMode` is \"Tagged\"\nThe UNI VLAN ID # used to tag the service traffic.\nThe value should be between 1 and 4094."
          }
        }
      },
      "schema-3": {
        "type": "object",
        "required": [
          "locId",
          "bandwidthProductSku",
          "orderReference",
          "ntdId",
          "informedConsent"
        ],
        "dependentRequired": {
          "transferType": [
            "customerAuthorityDate",
            "unidPortId"
          ],
          "serviceRef": [
            "transferType"
          ],
          "uniVlanId": [
            "vlanMode"
          ],
          "fromPortId": [
            "overlapPeriod"
          ]
        },
        "dependentSchemas": {
          "ntdId": {
            "if": {
              "properties": {
                "ntdId": {
                  "const": "NEW"
                }
              }
            },
            "then": {
              "required": [
                "appointmentId"
              ]
            },
            "else": {
              "allOf": [
                {
                  "not": {
                    "required": [
                      "appointmentId"
                    ]
                  }
                },
                {
                  "not": {
                    "required": [
                      "installationWorkforce"
                    ]
                  }
                }
              ]
            }
          },
          "transferType": {
            "if": {
              "properties": {
                "transferType": {
                  "const": "Service Transfer"
                }
              }
            },
            "then": {
              "required": [
                "serviceRef"
              ]
            },
            "else": {
              "not": {
                "required": [
                  "serviceRef"
                ]
              }
            }
          },
          "vlanMode": {
            "if": {
              "properties": {
                "vlanMode": {
                  "const": "Tagged"
                }
              }
            },
            "then": {
              "required": [
                "uniVlanId"
              ]
            }
          },
          "overlapPeriod": {
            "allOf": [
              {
                "required": [
                  "transferType"
                ],
                "properties": {
                  "transferType": {
                    "const": "Service Transfer"
                  }
                }
              },
              {
                "if": {
                  "properties": {
                    "overlapPeriod": {
                      "const": "4"
                    }
                  }
                },
                "then": {
                  "required": [
                    "fromPortId",
                    "unidPortId"
                  ]
                }
              }
            ]
          }
        },
        "properties": {
          "locId": {
            "type": "string",
            "pattern": "^LOC\\d{12}$",
            "description": "The NBN Location ID for the premises the order is for."
          },
          "bandwidthProductSku": {
            "type": "string",
            "maxLength": 64,
            "description": "Product SKU of the Bandwidth Product being ordered.\nThis controls which Service Layer (Layer 2 or Layer 3) this Order can be Provisioned with.\nUse the Product Qualification > Eligible Bandwidth Products API to find selectable options for the Location (LOC #)\n"
          },
          "restorationSlaSku": {
            "type": "string",
            "maxLength": 64,
            "description": "(Optional) Product SKU of the Service Restoration SLA.\nIf omitted, the Standard SLA (\"NBN-SLA-TC4-STD\") is applied.\nIndicates how quick NBN responds should this service be affected by an issue, depending upon the SLA Region.\nResponse times are Business Hours unless a (24/7) SLA is selected.\nEnhanced or Premium SLAs may incur an additional monthly cost.\nBundled SLA Product SKUs will only be accepted when provided with an eligible Bandwidth Product SKU.\nUse the Product Qualification > Eligible Restoration SLA Products API to find selectable options for the Location (LOC #).\n"
          },
          "orderReference": {
            "type": "string",
            "maxLength": 35,
            "pattern": "^[A-Za-z0-9._-]+$",
            "description": "Your Reference Number for this order. Max of 35 characters.\nOnly alphabetic characters (\"a-Z\"), numbers (\"0-9\"), underscores (\"_\"), hyphens (\"-\") and periods (\".\") are allowed.\n\nEXAMPLES:\n - \"New.Foo_BAR-2020-09-20\"\n - \"ExampleCompanyName\"\n - \"JaneCitizen-123456\"\n - \"Reseller.EndUser.123456\"\n"
          },
          "endUserRef": {
            "type": "string",
            "description": "NOT ACCEPTED: supplying this field returns 422. The platform assigns the End User; this API has no End User (Party) records.\nThe Reference (EUP #) of the End User to associate this Order to.\n\nEXAMPLES:\n - \"EUP000000000000\"\n"
          },
          "priorityAssist": {
            "type": "boolean",
            "default": false,
            "description": "(Optional) Whether Priority Assistance is required.\nDefaults to \"false\" if value not set.\nOnly specify \"true\" where the end user is eligible for a Downstream Priority Assistance Service in accordance with NBN Co's Wholesale Broadband Agreement.\n\"true\" is accepted only for a customer on our Priority Assistance register (the end user named in `endUser`, or when none is named the account or your own end user, never another end user's); otherwise the order is refused with a 422 on `priorityAssist` before anything is drafted."
          },
          "endUser": {
            "type": "string",
            "maxLength": 64,
            "description": "(Optional) Ours, not the carrier's `endUserRef`: the number of the end user the order is for, as `POST /data/orders` takes it. The order and its service are that end user's. With `priorityAssist` true it is that end user's registration that counts; an end user that is not this account's is refused with a 422 on `priorityAssist`, or on `endUser` without the flag."
          },
          "appointmentId": {
            "type": "string",
            "maxLength": 48,
            "description": "(Conditional) NBN Appointment ID to attach to this order.\nAn Appointment with Demand Type \"Standard Install\" is required\nwhen `ntdId` is \"NEW\" — a technician attends to install the NTD\nand antenna. Taking a port on an NTD that is already installed\nrequires no appointment.\n"
          },
          "ntdId": {
            "type": "string",
            "maxLength": 32,
            "description": "The Reference Number of the Network Termination Device (NTD) to place the order against.\nSpecify \"NEW\" in this field to order against a new NTD.\n"
          },
          "unidPortId": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "1",
              "2",
              "3",
              "4",
              null
            ],
            "description": "(Conditional) The Port ID for the UNI-D Resource. Required for Service Transfers or where you want to specify an exact port.\nNBN will assign the next available port where this field is not supplied or is `null`."
          },
          "transferType": {
            "type": "string",
            "maxLength": 32,
            "enum": [
              "Service Transfer",
              "Service Transfer Reversal",
              "Connect Outstanding"
            ],
            "description": "(Conditional) Service Transfer Type.\nOnly applicable to, and is mandatory for Service Transfers.\n - \"Service Transfer\" - transfer an existing nbn service from another provider to you.\n - \"Service Transfer Reversal\" - recover an existing service that was incorrectly transferred away from you.\n - \"Connect Outstanding\" - connect a new service over a line that still has an existing active service not controlled by the End User.  This requires time to legally cancel the existing service.\n"
          },
          "occupancyDocumentId": {
            "type": "string",
            "format": "uuid",
            "description": "(Optional, ours) On a Connect Outstanding, the `id` of a proof of occupancy uploaded with `POST /data/occupancy-documents`: evidence that the End User occupies the premises. It is kept with the order and used by that order only: a retry with the same `orderReference` may name it again. Another account's, or one another order used, is a 422."
          },
          "serviceRef": {
            "type": "string",
            "maxLength": 32,
            "description": "(Conditional) Service ID (AVC #) for Service Transfer.\nOnly applicable to, and is mandatory for, Service Transfers.\n\nIMPORTANT > Validate the AVC # against the CPI # or NTD + UNI Port using the SQ Single Site API first."
          },
          "customerAuthorityDate": {
            "type": "string",
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "string",
                "format": "date-time"
              }
            ],
            "description": "(Conditional) Date the Customer authorised this order, as `YYYY-MM-DD` (a date-time is read as its date). Must be within the last 45 calendar days only.\nThis is only applicable to Service Transfers and required if `transferType` is \"Service Transfer\" or \"Connect Outstanding\"."
          },
          "informedConsent": {
            "type": "boolean",
            "description": "Verification that the End User has provided Informed Consent for this order to be placed."
          },
          "overlapPeriod": {
            "type": "string",
            "enum": [
              "0",
              "4"
            ],
            "description": "(Optional) The overlap period for Service Transfers.\nFor use when transferring a service to a new UNI-D Port.  The number of hours after Order Completion during which the service will be active on both the old and new ports.  The End User infrastructure should be updated during this period.\nOnly applicable to Service Transfers."
          },
          "fromPortId": {
            "type": "string",
            "enum": [
              "1",
              "2",
              "3",
              "4"
            ],
            "description": "(Conditional) The UNI-D Port ID of the existing service. Specify the new Port ID via `unidPortId`.\nOnly applicable to Service Transfers and is mandatory if the `overlapPeriod` value is \"4\"."
          },
          "installationWorkforce": {
            "type": "string",
            "enum": [
              "NBN Co Install",
              "NBN Co Install End User",
              "RSP Install",
              "RSP Install End User"
            ],
            "description": "(Conditional) Installation Workforce for the NTD and/or antenna\ndevice. Only applicable where `ntdId` is \"NEW\" — an installed\nNTD needs no installation.\n\nDefaults to \"NBN Co Install\" when not supplied.\n"
          },
          "vlanMode": {
            "type": "string",
            "enum": [
              "Default-Mapped",
              "Tagged"
            ],
            "description": "(Optional) The VLAN Mode determines which Product Template will be used when ordering this connection.\n\nIMPORTANT> Do not specify unless explicitly needed.\n\nWhen this field is not specified, \"Default-Mapped\" will be the assumed value.\nIntended mainly for transitioning existing \"Tagged\" PPPoE services without needing to change the client CPE configuration.\n\nIMPORTANT> You cannot change this value with a Modify Order. Instead, the service must be cancelled and reordered, potentially bringing the service down for 24-48 hours.\n"
          },
          "uniVlanId": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4094,
            "description": "(Conditional) Required if `vlanMode` is \"Tagged\"\nThe UNI VLAN ID # used to tag the service traffic.\nThe value should be between 1 and 4094."
          }
        }
      },
      "locId": {
        "type": "string",
        "pattern": "^LOC\\d{12}$",
        "description": "The NBN Location ID for the premises the order is for."
      },
      "bandwidthProductSku": {
        "type": "string",
        "maxLength": 64,
        "description": "Product SKU of the Bandwidth Product being ordered.\nThis controls which Service Layer (Layer 2 or Layer 3) this Order can be Provisioned with.\nUse the Product Qualification > Eligible Bandwidth Products API to find selectable options for the Location (LOC #)\n"
      },
      "orderReference": {
        "type": "string",
        "maxLength": 35,
        "pattern": "^[A-Za-z0-9._-]+$",
        "description": "Your Reference Number for this order. Max of 35 characters.\nOnly alphabetic characters (\"a-Z\"), numbers (\"0-9\"), underscores (\"_\"), hyphens (\"-\") and periods (\".\") are allowed.\n\nEXAMPLES:\n - \"New.Foo_BAR-2020-09-20\"\n - \"ExampleCompanyName\"\n - \"JaneCitizen-123456\"\n - \"Reseller.EndUser.123456\"\n"
      },
      "informedConsent": {
        "type": "boolean",
        "description": "Verification that the End User has provided Informed Consent for this order to be placed."
      },
      "appointmentId": {
        "type": "string",
        "maxLength": 48,
        "description": "(Conditional) NBN Appointment ID to attach to this order.\nAn Appointment with Demand Type \"Standard Install\" is required\nwhen `ntdId` is \"NEW\" — a technician attends to install the NTD.\nTaking a port on an NTD that is already installed requires no\nappointment.\n"
      },
      "endUserType": {
        "type": [
          "string",
          "null"
        ],
        "enum": [
          "Residential",
          "Business",
          null
        ],
        "description": "(Optional) What the carrier is told the premises is. Left out, it is taken from the end user's own type, as the portal does."
      },
      "Success": {
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Was the request successful?"
          },
          "reference": {
            "type": "string",
            "description": "Reference of the Related item."
          }
        },
        "type": "object"
      },
      "OrderStateEvent": {
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique NBN identifier for the Product Order"
          },
          "href": {
            "type": "string",
            "description": "Hyperlink to access the order"
          },
          "notificationType": {
            "type": "string",
            "description": "Type of notification for the event",
            "example": "OrderAcknowledged",
            "enum": [
              "OrderAcknowledged",
              "OrderAccepted",
              "OrderRejected",
              "OrderScheduled",
              "LocationChanged",
              "SiteSurveyComplete",
              "RSPActionRequired",
              "InformationRequiredReminder",
              "RSPActionCompleted",
              "OrderCancelled",
              "ConstructionStarted",
              "AppointmentScheduled",
              "AppointmentRescheduled",
              "OrderOnSchedule",
              "OrderRescheduled",
              "ConstructionCompleted",
              "ServiceTestCompleted",
              "OrderCompleted",
              "ConstructionStarted"
            ]
          },
          "objectType": {
            "type": "string",
            "description": "Unique identifier specific to a reason"
          },
          "externalID": {
            "type": "string",
            "description": "RSP Reference ID"
          },
          "state": {
            "type": "string",
            "description": "State of the Event",
            "example": "Acknowledged",
            "enum": [
              "Acknowledged",
              "InProgress",
              "Rejected",
              "Cancelled",
              "Complete"
            ]
          },
          "subState": {
            "type": "string",
            "description": "Tracks the lifecycle sub status of the product order",
            "example": "Held",
            "enum": [
              "Held",
              "Pending"
            ]
          }
        },
        "type": "object"
      },
      "OrderHistory": {
        "properties": {
          "eventId": {
            "type": "string",
            "description": "Unique ID identifying this event."
          },
          "eventTime": {
            "type": "string",
            "description": "Timestamp of the response"
          },
          "eventType": {
            "type": "string",
            "description": "Type of event. Matches the callback Event Type.",
            "example": "OrderStateChangeNotification",
            "enum": [
              "OrderStateChangeNotification"
            ]
          },
          "eventNote": {
            "$ref": "#/components/schemas/ReasonCode"
          },
          "event": {
            "$ref": "#/components/schemas/OrderStateEvent"
          }
        },
        "type": "object"
      },
      "OutageWindow": {
        "properties": {
          "startDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "The estimated start of the Outage Window"
          },
          "endDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "The estimated end of the Outage Window"
          }
        },
        "type": "object"
      },
      "OutageDetails": {
        "properties": {
          "type": {
            "type": "string",
            "description": "The Type of Outage that occurred",
            "example": "Planned Network Maintenance",
            "enum": [
              "Planned Network Maintenance",
              "Network Maintenance",
              "Planned Network Upgrade",
              "Network Restoration",
              "Planned Emergency Interruption",
              "Emergency Interruption",
              "Unexpected Interruption"
            ]
          },
          "severity": {
            "type": "string",
            "description": "The estimated severity of the Outage",
            "example": "Minor",
            "enum": [
              "Minor",
              "Low",
              "Intermediate",
              "Moderate",
              "High",
              "Severe",
              "Critical"
            ]
          },
          "duration": {
            "type": "string",
            "description": "The estimated duration of the Outage"
          },
          "cause": {
            "type": "string",
            "description": "A brief description on the cause of the Outage"
          },
          "comment": {
            "type": "string",
            "description": "Additional comment on the Outage"
          },
          "window": {
            "$ref": "#/components/schemas/OutageWindow"
          }
        },
        "type": "object"
      },
      "ImpactedFeatures": {
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the impacted feature"
          },
          "description": {
            "type": "string",
            "description": "A brief description of the impacted feature"
          }
        },
        "type": "object"
      },
      "ImpactedServices": {
        "properties": {
          "reference": {
            "type": "string",
            "description": "The reference string of the impacted service"
          },
          "type": {
            "type": "string",
            "description": "The type of service e.g., AVC, POI, LOC"
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The full name of the impacted service; null when the carrier has none"
          }
        },
        "type": "object"
      },
      "Interruptions": {
        "properties": {
          "duration": {
            "type": "string",
            "description": "The duration of the interruption"
          },
          "startDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "Start timestamp of the interruption"
          },
          "endDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "End timestamp of the interruption"
          }
        },
        "type": "object"
      },
      "Outage": {
        "properties": {
          "id": {
            "type": "string",
            "description": "The Outage Reference Number",
            "pattern": "OUT[0-9]{12}"
          },
          "status": {
            "type": "string",
            "description": "The status of the Outage"
          },
          "queryDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "When this query was received"
          },
          "outage": {
            "$ref": "#/components/schemas/OutageDetails"
          },
          "impactedFeatures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ImpactedFeatures"
            }
          },
          "impactedServices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ImpactedServices"
            }
          },
          "interruptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Interruptions"
            }
          }
        },
        "type": "object"
      },
      "Outages": {
        "properties": {
          "reference": {
            "type": "string",
            "description": "The Reference # to find Outages for"
          },
          "type": {
            "type": "string",
            "description": "What type of record to find the Outages for",
            "example": "AVC",
            "enum": [
              "AVC",
              "OVC",
              "POI"
            ]
          },
          "queryDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "When this query was received"
          },
          "currentOutages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Outage"
            }
          },
          "plannedOutages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Outage"
            }
          },
          "recentOutages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Outage"
            }
          }
        },
        "type": "object"
      },
      "FibreUpliftFilters": {
        "properties": {
          "postcode": {
            "type": "string",
            "description": "Postcode"
          },
          "localityName": {
            "type": "string",
            "description": "Suburb"
          }
        },
        "type": "object"
      },
      "FibreUpliftAddress": {
        "properties": {
          "lotNumber": {
            "type": [
              "string",
              "null"
            ],
            "description": "Lot Number"
          },
          "roadNumber1": {
            "type": [
              "string",
              "null"
            ],
            "description": "Road Number 1"
          },
          "roadNumber2": {
            "type": [
              "string",
              "null"
            ],
            "description": "Road Number 2"
          },
          "roadName": {
            "type": "string",
            "description": "Road Name"
          },
          "roadTypeCode": {
            "type": "string",
            "description": "Road Type Code"
          },
          "roadSuffixCode": {
            "type": [
              "string",
              "null"
            ],
            "description": "Road Suffix Code"
          },
          "localityName": {
            "type": "string",
            "description": "Locality Name"
          },
          "postcode": {
            "type": "string",
            "description": "Postcode"
          },
          "stateTerritoryCode": {
            "type": "string",
            "description": "State Territory Code"
          },
          "unitTypeCode": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unit Type Code"
          },
          "unitNumber": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unit Number"
          },
          "levelTypeCode": {
            "type": [
              "string",
              "null"
            ],
            "description": "Level Type Code"
          },
          "levelNumber": {
            "type": [
              "string",
              "null"
            ],
            "description": "Level Number"
          },
          "addressSiteName": {
            "type": [
              "string",
              "null"
            ],
            "description": "Address Site Name"
          },
          "formattedAddressString": {
            "type": [
              "string",
              "null"
            ],
            "description": "Formatted Address String"
          }
        },
        "type": "object"
      },
      "FibreUpliftSQ": {
        "properties": {
          "serviceabilityClass": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Serviceability Class"
          },
          "serviceLevelRegion": {
            "type": [
              "string",
              "null"
            ],
            "description": "Service Level Region"
          },
          "serviceType": {
            "type": [
              "string",
              "null"
            ],
            "description": "Service Type"
          },
          "technology": {
            "type": [
              "string",
              "null"
            ],
            "description": "Technology"
          },
          "poiId": {
            "type": [
              "string",
              "null"
            ],
            "description": "POI ID"
          },
          "poiName": {
            "type": [
              "string",
              "null"
            ],
            "description": "POI Name"
          }
        },
        "type": "object"
      },
      "TechnologyChange": {
        "properties": {
          "status": {
            "type": "string",
            "description": "Status"
          },
          "plannedTechnology": {
            "type": "string",
            "description": "Planned Technology"
          },
          "reason": {
            "type": "string",
            "description": "Reason"
          },
          "rtcDate": {
            "type": "string",
            "description": "RTC Date"
          }
        },
        "type": "object"
      },
      "FibreUpliftLocations": {
        "properties": {
          "locationRef": {
            "type": "string",
            "description": "NBN Location reference"
          },
          "address": {
            "description": "Address components of this location",
            "allOf": [
              {
                "$ref": "#/components/schemas/FibreUpliftAddress"
              }
            ]
          },
          "serviceQualification": {
            "description": "Service qualification fields relating to this location",
            "allOf": [
              {
                "$ref": "#/components/schemas/FibreUpliftSQ"
              }
            ]
          },
          "technologyChange": {
            "description": "Fibre uplift status and related items for this location",
            "allOf": [
              {
                "$ref": "#/components/schemas/TechnologyChange"
              }
            ]
          },
          "listingType": {
            "type": [
              "string",
              "null"
            ],
            "description": "Listing Type"
          }
        },
        "type": "object"
      },
      "FibreUpliftResponse": {
        "properties": {
          "queryDateTime": {
            "type": "string",
            "description": "Time the query was processed by the server."
          },
          "filter": {
            "description": "Filters applied to the query.",
            "allOf": [
              {
                "$ref": "#/components/schemas/FibreUpliftFilters"
              }
            ]
          },
          "locations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FibreUpliftLocations"
            }
          }
        },
        "type": "object"
      },
      "ResourcePlanning": {
        "description": "Change of Access Technology (COAT) status for an nbn™ location — the current access technology, the planned technology flip, and related planning data.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "nbn™ Location reference (LOC…) this report is for."
          },
          "changeDate": {
            "type": "string",
            "description": "Date the access-technology change took (or will take) effect."
          },
          "changeoverEndDate": {
            "type": "string",
            "description": "End date of the technology changeover window."
          },
          "currentAccessTechnology": {
            "type": "string",
            "description": "The access technology currently in place at the location (e.g. Fibre)."
          },
          "lastUpdated": {
            "type": "string",
            "format": "date-time",
            "description": "Time this planning record was last updated by nbn™."
          },
          "locationConnectionDetails": {
            "type": "object",
            "description": "Connection status and key service dates for the location.",
            "properties": {
              "locationStatus": {
                "type": "string",
                "description": "Current status of the location (e.g. Active)."
              },
              "RFSDate": {
                "type": "string",
                "description": "Ready-For-Service date."
              },
              "RTCDate": {
                "type": "string",
                "description": "Ready-To-Connect date."
              }
            }
          },
          "nbnIdentifiers": {
            "type": "array",
            "description": "nbn™ network identifiers associated with the location (CSA, POI, GNAF, etc.).",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Identifier value."
                },
                "name": {
                  "type": "string",
                  "description": "Human-readable name for the identifier, when available."
                },
                "@type": {
                  "type": "string",
                  "description": "Identifier kind (e.g. CurrentCSA, CurrentPOI, GNAFPersistentId)."
                }
              }
            }
          },
          "relatedPlace": {
            "type": "object",
            "description": "The geographic address / place the location resolves to.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Location reference."
              },
              "formattedAddress": {
                "type": "string",
                "description": "Full formatted address string."
              },
              "geographicDatum": {
                "type": "string",
                "description": "Geodetic datum for the coordinates (e.g. GDA94)."
              },
              "latitude": {
                "type": "string",
                "description": "Latitude of the location."
              },
              "longitude": {
                "type": "string",
                "description": "Longitude of the location."
              },
              "localityName": {
                "type": "string",
                "description": "Suburb / locality."
              },
              "lotNumber": {
                "type": "string",
                "description": "Lot number."
              },
              "postcode": {
                "type": "string",
                "description": "Postcode."
              },
              "roadName": {
                "type": "string",
                "description": "Road name."
              },
              "roadNumber1": {
                "type": "string",
                "description": "Road number."
              },
              "roadTypeCode": {
                "type": "string",
                "description": "Road-type code (e.g. ST)."
              },
              "stateTerritoryCode": {
                "type": "string",
                "description": "State / territory code."
              },
              "@referredType": {
                "type": "string",
                "description": "Referred type of the related place (e.g. GeographicAddress)."
              }
            }
          },
          "serviceClass": {
            "type": "string",
            "description": "nbn™ service class for the location."
          },
          "serviceClassDescription": {
            "type": "string",
            "description": "Human-readable description of the service class."
          },
          "serviceLevelRegion": {
            "type": "string",
            "description": "Service-level region (e.g. MAJOR RURAL)."
          },
          "serviceType": {
            "type": "string",
            "description": "Service type (e.g. Brownfields FIBRE)."
          },
          "speedEquipmentUpgrade": {
            "type": "object",
            "description": "Speed Equipment Upgrade (SEU) eligibility and maximum speed tier.",
            "properties": {
              "eligibilityStatus": {
                "type": "object",
                "description": "SEU eligibility status.",
                "properties": {
                  "code": {
                    "type": "string",
                    "description": "Eligibility status code."
                  },
                  "description": {
                    "type": "string",
                    "description": "Eligibility status description."
                  }
                }
              },
              "maxSpeedTier": {
                "type": "string",
                "description": "Maximum speed tier the location can be offered (e.g. 2000/500 Mbps)."
              },
              "RTODate": {
                "type": "string",
                "description": "Ready-To-Order date for the upgrade."
              }
            }
          },
          "status": {
            "type": "string",
            "description": "Overall COAT status (e.g. TechnologyChangeCompleted)."
          },
          "supportingRelatedLocationFeatures": {
            "type": "object",
            "description": "Location attributes relevant to planning (premise type, land use, flags).",
            "properties": {
              "isBusinessLocation": {
                "type": "boolean",
                "description": "Whether the location is a business premise."
              },
              "isComplexPremise": {
                "type": "boolean",
                "description": "Whether the premise is complex (e.g. MDU)."
              },
              "isCriticalService": {
                "type": "boolean",
                "description": "Whether a critical service is present."
              },
              "isEarlyAccessAvailable": {
                "type": "boolean",
                "description": "Whether early access is available."
              },
              "landUse": {
                "type": "string",
                "description": "Land-use classification (e.g. RESIDENTIAL)."
              },
              "listingType": {
                "type": "string",
                "description": "Listing type."
              },
              "newDevelopmentsChargeApplies": {
                "type": "boolean",
                "description": "Whether a new-developments charge applies."
              },
              "propertyType": {
                "type": "string",
                "description": "Property type (e.g. SDU1)."
              },
              "SABoundary": {
                "type": "string",
                "description": "Service-area boundary classification."
              }
            }
          },
          "supportingResource": {
            "type": "object",
            "description": "The NTD / supporting resource at the location.",
            "properties": {
              "currentNTD": {
                "type": "string",
                "description": "Current NTD version."
              },
              "disconnectionDate": {
                "type": "string",
                "description": "Disconnection date of the resource, when applicable."
              },
              "isCoExistence": {
                "type": "boolean",
                "description": "Whether the resource is in a co-existence state."
              },
              "@type": {
                "type": "string",
                "description": "Resource type (e.g. NTD)."
              }
            }
          },
          "technologyFlipDescriptor": {
            "type": "string",
            "description": "Descriptor of the technology-flip activity driving the change."
          },
          "COATName": {
            "type": "string",
            "description": "COAT programme name (e.g. nbn-initiated)."
          },
          "EEFeatures": {
            "type": "object",
            "description": "Enterprise Ethernet fibre-build features for the location.",
            "properties": {
              "fibreBuildCategory": {
                "type": "string",
                "description": "Fibre-build category (e.g. A)."
              },
              "isBusinessFibreZone": {
                "type": "boolean",
                "description": "Whether the location is within a Business Fibre Zone."
              },
              "isZeroDollarFBC": {
                "type": "boolean",
                "description": "Whether the fibre-build cost is zero-dollar."
              },
              "zone": {
                "type": "string",
                "description": "EE zone (e.g. Zone 1)."
              }
            }
          },
          "TC2CALR": {
            "type": "string",
            "description": "TC2 Committed Access Line Rate (e.g. 20/20)."
          },
          "TC4CALR": {
            "type": "string",
            "description": "TC4 Committed Access Line Rate (e.g. 50/20)."
          }
        }
      },
      "BandwidthProductSKU": {
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the Product"
          },
          "sku": {
            "type": "string",
            "description": "The unique SKU of the Product"
          },
          "@type": {
            "type": "string",
            "description": "The type of the Product"
          }
        },
        "type": "object"
      },
      "BandwidthProductSKUs": {
        "properties": {
          "queryDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "When this query was run"
          },
          "action": {
            "type": "string",
            "description": "The action taken by this query"
          },
          "locationRef": {
            "type": "string",
            "description": "The Address LOC # used for the query"
          },
          "serviceType": {
            "type": "string",
            "description": "The Service Type used for the query"
          },
          "cpiRef": {
            "type": "string",
            "description": "The Copper Line CPI # used for the query"
          },
          "count": {
            "type": "integer",
            "description": "The number of returned items"
          },
          "bandwidthProductSKUs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BandwidthProductSKU"
            }
          }
        },
        "type": "object"
      },
      "RestorationSLAProduct": {
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the Restoration SLA Product"
          },
          "sku": {
            "type": "string",
            "description": "The unique SKU of the Restoration SLA Product"
          },
          "@type": {
            "type": "string",
            "description": "The type of the Product"
          }
        },
        "type": "object"
      },
      "RestorationSLAProductSKUs": {
        "properties": {
          "queryDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "When this query was run"
          },
          "action": {
            "type": "string",
            "description": "The action taken by this query"
          },
          "locationRef": {
            "type": "string",
            "description": "The Address LOC # used for the query"
          },
          "bandwidthProductSKU": {
            "type": "string",
            "description": "The Bandwidth Product SKU used for the query"
          },
          "count": {
            "type": "integer",
            "description": "The number of returned items"
          },
          "restorationSLAProductSKUs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RestorationSLAProduct"
            }
          }
        },
        "type": "object"
      },
      "ServiceType": {
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the Service Type, as Kinetix names it.",
            "example": "Layer 3 - IPoE",
            "enum": [
              "Layer 2 - TC4",
              "Layer 3 - IPoE",
              "Layer 3 - PPPoE (Mapped)",
              "Layer 3 - PPPoE (Tagged)",
              "Layer 2 - Enterprise Ethernet",
              "Layer 3 - Enterprise Ethernet"
            ]
          },
          "layer": {
            "type": "string",
            "description": "OSI Layer the Service operates on",
            "enum": [
              "2",
              "3"
            ]
          },
          "protocol": {
            "type": "string",
            "description": "Session protocol of the Service Type.",
            "enum": [
              "IPoE",
              "PPPoE"
            ]
          },
          "productType": {
            "type": "string",
            "description": "Product Type of the Service",
            "enum": [
              "TC4",
              "EE"
            ]
          },
          "vlanMode": {
            "type": "string",
            "description": "How the service's VLAN is presented at the NTD.",
            "example": "Default-Mapped",
            "enum": [
              "Default-Mapped",
              "Tagged",
              "PCP"
            ]
          },
          "requiresVlan": {
            "type": "boolean",
            "description": "Whether an order of this type must give a VLAN."
          },
          "requiresReview": {
            "type": "boolean",
            "description": "Whether an order of this type is reviewed before it is placed."
          }
        },
        "type": "object"
      },
      "ServiceTypes": {
        "description": "Kinetix's Qualify Service Types document.",
        "properties": {
          "queryDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "When this query was run"
          },
          "action": {
            "type": "string",
            "description": "The action taken by this query",
            "example": "Qualify Service Types"
          },
          "locationRef": {
            "type": "string",
            "description": "The Address LOC # used in the query"
          },
          "count": {
            "type": "integer",
            "description": "The number of returned items"
          },
          "serviceTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServiceType"
            }
          }
        },
        "type": "object"
      },
      "ListProductsFilter": {
        "properties": {
          "product_type": {
            "type": "string",
            "description": "The product type used to filter the response to",
            "example": "TC1",
            "enum": [
              "TC1",
              "TC2",
              "TC4",
              "EE"
            ]
          }
        },
        "type": "object"
      },
      "RelatedProductSKU": {
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the Product"
          },
          "sku": {
            "type": "string",
            "description": "The unique SKU of the Product"
          },
          "@type": {
            "type": "string",
            "description": "The type of the Product"
          }
        },
        "type": "object"
      },
      "ProductCustomer": {
        "properties": {
          "accountRef": {
            "type": "string",
            "description": "The Check Networks Reference # of the Customer Account managing this record"
          },
          "name": {
            "type": "string",
            "description": "The display name of the Customer Account managing this record"
          }
        },
        "type": "object"
      },
      "ProductEndUser": {
        "properties": {
          "reference": {
            "type": "string",
            "description": "Unique Reference (EUP#) for this End User Party record"
          },
          "type": {
            "type": "string",
            "description": "The type of End User Party record",
            "example": "Residential",
            "enum": [
              "Residential",
              "Business",
              "Unknown"
            ]
          },
          "name": {
            "type": "string",
            "description": "The name of the End User Party"
          }
        },
        "type": "object"
      },
      "ServiceResult": {
        "properties": {
          "id": {
            "type": "string",
            "description": "The NBN Reference # for the service"
          },
          "type": {
            "type": "string",
            "description": "The type of Service. e.g., 'AVCD'"
          }
        },
        "type": "object"
      },
      "ProductResultDeletion": {
        "properties": {
          "deletedDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "When the Product Instance was Deleted"
          },
          "deletedMethod": {
            "type": "string",
            "description": "Why/How this Product Instance was Deleted.",
            "example": "Disconnect",
            "enum": [
              "Disconnect",
              "Cancellation",
              "Rejection",
              "Service Transfer",
              "Service Transfer Reversal",
              "Unknown"
            ]
          },
          "gainingAccessSeeker": {
            "type": "string",
            "description": "The nbn Reference of the Access Seeker that this service transferred to. Associated with the EPID MNP Allocated Value 4-Character reference.\nFor 'Service Transfer' and 'Service Transfer Reversal'.",
            "pattern": "[0-9]{4}"
          }
        },
        "type": "object"
      },
      "ProductResult": {
        "properties": {
          "id": {
            "type": "string",
            "description": "The NBN Reference # for the product instance"
          },
          "productType": {
            "type": "string",
            "description": "The Product Type of the Product Instance",
            "example": "TC1",
            "enum": [
              "TC1",
              "TC2",
              "TC4",
              "EE"
            ]
          },
          "status": {
            "type": "string",
            "description": "The Status of the Product Instance",
            "example": "Active",
            "enum": [
              "Active",
              "Deleted",
              "New",
              "InProgress",
              "Held",
              "Pending"
            ]
          },
          "suspensionTakesEffect": {
            "type": "string",
            "enum": [
              "within 15 minutes",
              "within 1 business day"
            ],
            "description": "Check Networks' own field, present only while we hold the service suspended (the carrier's product stays Active): how soon the suspension takes effect. Absent otherwise.",
            "example": "within 15 minutes"
          },
          "customerRef": {
            "type": "string",
            "description": "The Reseller Customer Account # of the Product Instance"
          },
          "technology": {
            "type": "string",
            "description": "The Technology of the Product Instance",
            "example": "NFAS",
            "enum": [
              "NFAS",
              "NWAS",
              "NCAS",
              "NHAS",
              "NSAS",
              "EEAS"
            ]
          },
          "primaryAccessTechnology": {
            "type": "string",
            "description": "The Primary Access Technology of the Product Instance",
            "example": "Fibre",
            "enum": [
              "Fibre",
              "Fixed Wireless",
              "Fibre To The Node",
              "Fibre To The Building",
              "Fibre To The Curb",
              "HFC",
              "Satellite",
              "Enterprise Ethernet"
            ]
          },
          "locationRef": {
            "type": "string",
            "description": "The Address Location # of the Product Instance"
          },
          "restorationSla": {
            "$ref": "#/components/schemas/RelatedProductSKU"
          },
          "bandwidthProduct": {
            "$ref": "#/components/schemas/RelatedProductSKU"
          },
          "customer": {
            "$ref": "#/components/schemas/ProductCustomer"
          },
          "endUser": {
            "$ref": "#/components/schemas/ProductEndUser"
          },
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServiceResult"
            }
          },
          "deletion": {
            "$ref": "#/components/schemas/ProductResultDeletion"
          }
        },
        "type": "object"
      },
      "ListProducts": {
        "properties": {
          "queryDateTime": {
            "type": "string",
            "description": "Date/Time that the query was made"
          },
          "queryFilter": {
            "$ref": "#/components/schemas/ListProductsFilter"
          },
          "count": {
            "type": "integer",
            "description": "The number of products listed in the results"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductResult"
            }
          }
        },
        "type": "object"
      },
      "ProductInstanceReference": {
        "properties": {
          "id": {
            "type": "string",
            "description": "The Product Instance reference.",
            "example": "PRI000000000000",
            "pattern": "^(PRI|BPI)[0-9]{12}$"
          },
          "productType": {
            "type": "string",
            "description": "The type of Product",
            "example": "TC4",
            "enum": [
              "TC4",
              "EE"
            ]
          }
        },
        "type": "object"
      },
      "ProductRelatedOrder": {
        "properties": {
          "id": {
            "type": "string",
            "description": "The nbn reference of the Related Order, or a Check Networks PND while the status is PendingReview.",
            "pattern": "^(ORD|BCO|PND)[0-9]{12}$"
          },
          "status": {
            "type": "string",
            "description": "The status of the Related Order. PendingReview: nbn could not accept the order as Check Networks sent it, and Check Networks will correct and resubmit it, as on the Product Order.",
            "example": "Acknowledged",
            "enum": [
              "Acknowledged",
              "Accepted",
              "InProgress",
              "PendingReview",
              "Complete",
              "Rejected",
              "Cancelled",
              "Error"
            ]
          },
          "subStatus": {
            "type": "string",
            "description": "The substatus of the Related Order"
          },
          "requestDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "When the Related Order was created"
          }
        },
        "type": "object"
      },
      "ProductRelatedOrders": {
        "properties": {
          "reference": {
            "type": "string",
            "description": "The Product Instance or Product Service reference to query."
          },
          "queryDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time this query was made"
          },
          "productInstance": {
            "$ref": "#/components/schemas/ProductInstanceReference"
          },
          "connectOrder": {
            "$ref": "#/components/schemas/ProductRelatedOrder"
          },
          "disconnectOrders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductRelatedOrder"
            }
          },
          "modifyOrders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductRelatedOrder"
            }
          }
        },
        "type": "object"
      },
      "BillingAccount": {
        "properties": {
          "id": {
            "type": "string",
            "description": "Billing Account ID"
          }
        },
        "type": "object"
      },
      "RelatedParty": {
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the related entity"
          },
          "role": {
            "type": "string",
            "description": "The role this entity plays in relation to this record.",
            "example": "Account Manager"
          },
          "@referredType": {
            "type": "string",
            "description": "The type of this Related Entity"
          }
        },
        "type": "object"
      },
      "ProductSpecification": {
        "properties": {
          "id": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "specificationType": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Product": {
        "properties": {
          "id": {
            "type": "string"
          },
          "avcType": {
            "type": "string"
          },
          "avcTransientId": {
            "type": "string"
          },
          "bandwidthProfile": {
            "type": "string"
          },
          "accessLoopIdentification": {
            "type": "string"
          },
          "connectedToUni": {
            "type": "string"
          },
          "accessTechnologyType": {
            "type": "string"
          },
          "productSpecification": {
            "$ref": "#/components/schemas/ProductSpecification"
          },
          "@type": {
            "type": "string"
          },
          "@baseType": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "ProductInventory": {
        "properties": {
          "id": {
            "type": "string",
            "description": "Product ID"
          },
          "href": {
            "type": "string",
            "description": "URL to NBN Product Record"
          },
          "firstActivationDate": {
            "type": "string",
            "format": "date-time"
          },
          "billingAccount": {
            "$ref": "#/components/schemas/BillingAccount"
          },
          "accessServiceTechnologyType": {
            "type": "string"
          },
          "serviceRestorationSla": {
            "type": "string"
          },
          "batteryBackupService": {
            "type": "string"
          },
          "informedConsent": {
            "type": "string"
          },
          "priorityAssist": {
            "type": "string"
          },
          "orderSla": {
            "type": "string"
          },
          "endUserType": {
            "type": "string"
          },
          "relatedParty": {
            "$ref": "#/components/schemas/RelatedParty"
          },
          "relatedPlace": {
            "$ref": "#/components/schemas/RelatedPlace"
          },
          "productRef": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Product"
            }
          },
          "productSpecification": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductSpecification"
            }
          },
          "suspensionTakesEffect": {
            "type": "string",
            "enum": [
              "within 15 minutes",
              "within 1 business day"
            ],
            "description": "Check Networks' own field, present only while we hold the service suspended (the carrier's product stays Active): how soon the suspension takes effect. Absent otherwise.",
            "example": "within 15 minutes"
          },
          "@type": {
            "type": "string"
          },
          "@baseType": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "RelatedItem": {
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique reference of the related item"
          },
          "type": {
            "type": "string",
            "description": "The type of related item"
          }
        },
        "type": "object"
      },
      "IPAddress": {
        "properties": {
          "version": {
            "type": "string",
            "description": "The IP Version. \"IPv4\" or \"IPv6\""
          },
          "subnet": {
            "type": "string",
            "description": "The subnet that this IP Address is from"
          },
          "address": {
            "type": "string",
            "description": "The IP Address"
          },
          "reserved": {
            "type": "boolean",
            "description": "Whether the IP Address has been reserved in IPAM."
          }
        },
        "type": "object"
      },
      "Authentication": {
        "properties": {
          "username": {
            "type": "string",
            "description": "The username used by the connecting service"
          },
          "password": {
            "type": "string",
            "description": "The password used by the connecting service"
          }
        },
        "type": "object"
      },
      "ProvisioningLayer2LinkSource": {
        "properties": {
          "pointOfPresence": {
            "type": "string",
            "description": "nbn™ Point of Presence of the End User's premises"
          },
          "poi": {
            "type": "string",
            "description": "nbn™ Point of Interconnect of the End User's premises"
          }
        },
        "type": "object"
      },
      "ProvisioningLayer2LinkDestination": {
        "properties": {
          "pointOfPresence": {
            "type": "string",
            "description": "Point of Presence of the Peer NNI"
          },
          "peerNni": {
            "type": "string",
            "description": "The reference of your Peer NNI this service connects to"
          }
        },
        "type": "object"
      },
      "ProvisioningLayer2Link": {
        "properties": {
          "source": {
            "description": "The nbn™ side of the Layer 2 link",
            "allOf": [
              {
                "$ref": "#/components/schemas/ProvisioningLayer2LinkSource"
              }
            ]
          },
          "destination": {
            "description": "Your Peer NNI side of the Layer 2 link",
            "allOf": [
              {
                "$ref": "#/components/schemas/ProvisioningLayer2LinkDestination"
              }
            ]
          }
        },
        "type": "object"
      },
      "ProvisioningLayer2Tags": {
        "properties": {
          "sTag": {
            "type": "string",
            "description": "The NNI S-VLAN ID value, the outer VLAN tag"
          },
          "cTag": {
            "type": "string",
            "description": "The NNI C-VLAN ID value, the inner VLAN tag"
          }
        },
        "type": "object"
      },
      "ProvisioningLayer2Tagging": {
        "properties": {
          "destination": {
            "description": "Tags used on the service handed over the Peer NNI",
            "allOf": [
              {
                "$ref": "#/components/schemas/ProvisioningLayer2Tags"
              }
            ]
          }
        },
        "type": "object"
      },
      "ProvisioningLayer2Details": {
        "properties": {
          "link": {
            "description": "The Layer 2 link",
            "allOf": [
              {
                "$ref": "#/components/schemas/ProvisioningLayer2Link"
              }
            ]
          },
          "tags": {
            "description": "The VLAN tagging of the service",
            "allOf": [
              {
                "$ref": "#/components/schemas/ProvisioningLayer2Tagging"
              }
            ]
          }
        },
        "type": "object"
      },
      "ProvisioningDetails": {
        "properties": {
          "protocol": {
            "type": "string",
            "description": "Authentication Protocol",
            "example": "IPoE",
            "enum": [
              "IPoE",
              "PPPoE"
            ]
          },
          "pointOfPresence": {
            "type": "string",
            "description": "The Point of Presence the service connects to"
          },
          "ipAddress": {
            "description": "The details of the selected IP Address",
            "allOf": [
              {
                "$ref": "#/components/schemas/IPAddress"
              }
            ]
          },
          "speedPlan": {
            "type": "string",
            "description": "The active Speed Plan for the service"
          },
          "authentication": {
            "description": "The user authentication settings",
            "allOf": [
              {
                "$ref": "#/components/schemas/Authentication"
              }
            ]
          },
          "requestDateTime": {
            "type": "string",
            "description": "Date and time that the provisioning request was received"
          },
          "provisionDateTime": {
            "type": "string",
            "description": "Date and time that the provisioning request was processed"
          },
          "lastUpdateDateTime": {
            "type": "string",
            "description": "Date and time that the provisioning request was last updated"
          },
          "provisionPeriod": {
            "description": "The provisioning period.",
            "allOf": [
              {
                "$ref": "#/components/schemas/TimePeriod"
              }
            ]
          },
          "layer2": {
            "description": "The layer 2 configuration.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ProvisioningLayer2Details"
              }
            ]
          }
        },
        "type": "object"
      },
      "ProvisioningResponse": {
        "required": [
          "href",
          "id",
          "provisioning",
          "relatedOrder",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Check Networks Service ID"
          },
          "href": {
            "type": "string",
            "description": "URL to retrieve the provisioned service details"
          },
          "status": {
            "type": "string",
            "description": "The status of the Provisioning request"
          },
          "queryDateTime": {
            "type": "string",
            "description": "When this query response was generated"
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the order was placed, in UTC. Present on `GET /nbn/provisioning/{reference}`."
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the order last changed, in UTC. Present on `GET /nbn/provisioning/{reference}`."
          },
          "relatedOrder": {
            "description": "The Connect Order this Provisioning Request relates to.",
            "allOf": [
              {
                "$ref": "#/components/schemas/RelatedItem"
              }
            ]
          },
          "relatedProduct": {
            "description": "The Product Instance this Provisioning Request relates to.",
            "allOf": [
              {
                "$ref": "#/components/schemas/RelatedItem"
              }
            ]
          },
          "relatedPlace": {
            "description": "The Address this Provisioning Request relates to.",
            "allOf": [
              {
                "$ref": "#/components/schemas/RelatedItem"
              }
            ]
          },
          "provisioning": {
            "description": "The details of the connection provisioning",
            "allOf": [
              {
                "$ref": "#/components/schemas/ProvisioningDetails"
              }
            ]
          },
          "reasonCode": {
            "description": "The reason for the status",
            "allOf": [
              {
                "$ref": "#/components/schemas/ReasonCode"
              }
            ]
          }
        },
        "type": "object"
      },
      "ProductOfferingReference": {
        "properties": {
          "id": {
            "type": "string",
            "description": "A unique identifier for product offering"
          },
          "version": {
            "type": "string",
            "description": "Version of the product template"
          }
        },
        "type": "object"
      },
      "PlaceReference": {
        "properties": {
          "id": {
            "type": "string",
            "default": "A string. Unique nbn identifier of a place"
          }
        },
        "type": "object"
      },
      "DatePeriod": {
        "properties": {
          "startDate": {
            "type": "string",
            "format": "date",
            "description": "Valid from this Start Date Time.\nFor Example: \"2017-07-21T17:32:28Z\""
          },
          "endDate": {
            "type": "string",
            "format": "date",
            "description": "Valid until this End Date Time.\nFor Example: \"2017-07-21T17:32:28Z\""
          }
        },
        "type": "object"
      },
      "QuoteSpecificationReference": {
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the quote specification."
          },
          "name": {
            "type": "string",
            "description": "Unique identifier of the quote specification."
          },
          "version": {
            "type": "string",
            "description": "Version of the quote specification."
          },
          "specificationType": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Money": {
        "properties": {
          "unit": {
            "type": "string",
            "description": "Currency of Fibre Build Contribution Price"
          },
          "value": {
            "type": "number",
            "description": "Price for Fibre Build Contribution"
          }
        },
        "type": "object"
      },
      "QuotePrice": {
        "properties": {
          "priceType": {
            "type": "string",
            "description": "Indicates whether QuotePrice is recurring or non-recurring",
            "example": "oneOff",
            "enum": [
              "oneOff",
              "recurring"
            ]
          },
          "name": {
            "type": "string",
            "description": "Product Name"
          },
          "description": {
            "type": "string",
            "description": "Identifier for Fibre Build Contribution"
          },
          "recurringChargePeriod": {
            "type": "string",
            "description": "Period of the recurring charges",
            "default": "monthly"
          },
          "price": {
            "$ref": "#/components/schemas/Money"
          }
        },
        "type": "object"
      },
      "ProductReference": {
        "properties": {
          "productSpecification": {
            "$ref": "#/components/schemas/ProductSpecificationReference"
          }
        },
        "type": "object"
      },
      "QuoteItemReference": {
        "properties": {
          "action": {
            "type": "string",
            "example": "ADD",
            "enum": [
              "ADD"
            ]
          },
          "status": {
            "type": "string",
            "description": "Status of the Quote Item",
            "example": "Acknowledged",
            "enum": [
              "Acknowledged",
              "InProgress",
              "Complete"
            ]
          },
          "quotePrice": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QuotePrice"
            }
          },
          "product": {
            "$ref": "#/components/schemas/ProductReference"
          }
        },
        "type": "object"
      },
      "EventNoteReference": {
        "properties": {
          "code": {
            "type": "string",
            "description": "Unique identifier specific to a reason"
          },
          "reason": {
            "type": "string",
            "description": "Reason for approving the quote"
          }
        },
        "type": "object"
      },
      "QuoteApproval": {
        "properties": {
          "approvalRequired": {
            "type": "boolean",
            "description": "Whether RPS Approval is required for this quote to progress."
          },
          "approvalGiven": {
            "type": "boolean",
            "description": "Whether RPS Approval has been received by nbn for this quote."
          },
          "approvalTimestamp": {
            "type": "string",
            "format": "date-time",
            "description": "When the RSP Approval was given for this quote."
          }
        },
        "type": "object"
      },
      "Quote": {
        "properties": {
          "id": {
            "type": "string",
            "description": "A unique identifier for quote"
          },
          "externalId": {
            "type": "string",
            "description": "Reference provided by the RSP"
          },
          "category": {
            "type": "string",
            "description": "Type of quote being requested.",
            "example": "Connect",
            "enum": [
              "Connect"
            ]
          },
          "description": {
            "type": "string",
            "description": "A description of the requested quote"
          },
          "quoteDate": {
            "type": "string",
            "format": "date-time",
            "description": "Date on which quote was requested."
          },
          "poiName": {
            "type": "string",
            "description": "The name of the nbn POI for this connection: its code, then its name, as the carrier writes it. The carrier's own capitalisation is kept, so the name may arrive in capitals (\"4TNS - TOWNSVILLE\"); compare the code.",
            "example": "2ALB - Albury",
            "x-known-values": [
              "2ALB - Albury",
              "2BLK - Blacktown",
              "2BLV - Berkeley Vale",
              "2CAM - Campsie",
              "2CAS - Castle Hill",
              "2CBT - Campbelltown",
              "2CFS - Coffs Harbour",
              "2CHA - Chatswood",
              "2CRR - Carramar",
              "2CYS - City South",
              "2DAL - Dalley",
              "2DBB - Dubbo",
              "2EDG - Edgecliff",
              "2FRE - Frenchs Forest",
              "2GBE - Glebe",
              "2GOS - Gosford",
              "2GRN - Grafton",
              "2HAM - Hamilton",
              "2KNS - Kensington",
              "2LAK - Lakemba",
              "2LID - Lidcombe",
              "2LIV - Liverpool",
              "2MAI - Maitland",
              "2MIR - Miranda",
              "2MOS - Mosman",
              "2MYF - Mayfield",
              "2NEW - Newtown",
              "2NWR - Nowra-Bomaderry",
              "2PAR - Parramatta",
              "2PEA - Peakhurst",
              "2PEN - Pendle Hill",
              "2PTH - Penrith",
              "2ROC - Rockdale",
              "2RYD - Ryde",
              "2STL - St Leonards",
              "2SYA - Asquith Depot",
              "2SYB - Eastern Creek Depot",
              "2TAM - Tamworth",
              "2WAG - Wagga Wagga",
              "2WIN - Windsor",
              "2WLG - Wollongong",
              "3BEN - Bendigo",
              "3BRA - Ballarat",
              "3CAU - Caulfield",
              "3CBN - Cranbourne",
              "3CTA - Cheltenham",
              "3DAD - Dandenong",
              "3EXH - Exhibition",
              "3FSR - Footscray",
              "3GEE - Geelong",
              "3HAW - Hawthorn",
              "3HRS - Horsham",
              "3KAL - Karingal",
              "3KEW - Kew",
              "3KEY - Keysborough",
              "3KGP - Kings Park",
              "3LIL - Lilydale",
              "3MEA - Nunawading Depot",
              "3MEB - Port Melbourne Depot",
              "3MTE - Mount Eliza",
              "3NBA - North Balwyn",
              "3RES - Reservoir",
              "3RWO - Ringwood",
              "3SHP - Shepparton",
              "3SMR - South Morang",
              "3STK - St Kilda",
              "3TAG - Traralgon",
              "3TMN - Tullamarine",
              "3TNB - Thornbury",
              "3WER - Werribee",
              "3WHL - Wheelers Hill",
              "4APL - Aspley",
              "4BBE - Bundaberg",
              "4BDB - Bundamba",
              "4BNA - Acacia Ridge Depot",
              "4BNB - Aspley Depot",
              "4CAB - Caboolture",
              "4CAI - Cairns",
              "4CPH - Camp Hill",
              "4EMP - Eight Mile",
              "4GDN - Goodna",
              "4IPS - Ipswich",
              "4KLG - Petrie",
              "4MKY - Mackay",
              "4MRA - Merrimac",
              "4NBR - Nambour",
              "4NER - Nerang",
              "4ROT - Rockhampton",
              "4SLA - Slacks Creek",
              "4SOP - Southport",
              "4TNS - Townsville",
              "4TOB - Toowoomba",
              "4WOB - Woolloongabba",
              "5ADA - Lonsdale Depot",
              "5ADB - Greenfields Depot",
              "5CPK - St Marys",
              "5EDW - Edwardstown",
              "5EZB - Elizabeth",
              "5MOD - Modbury",
              "5PRO - Prospect",
              "5PTA - Port Augusta",
              "5STI - Stirling",
              "6APP - Applecross",
              "6BSD - Bassendean",
              "6CAN - Cannington",
              "6CGE - South Coogee",
              "6DBL - Doubleview",
              "6GLT - Geraldton",
              "6HIL - Hilton",
              "6KAT - Katanning",
              "6KEL - Kelmscott",
              "6MLO - Mullaloo",
              "6PEA - Wangara Depot",
              "6PEB - Bentley Depot",
              "6PNJ - Pinjarra",
              "6SUB - Subiaco",
              "7HOB - Hobart",
              "7LAU - Launceston",
              "8DRW - Darwin",
              "9CVI - Civic",
              "9QBN - Queanbeyan"
            ]
          },
          "zone": {
            "type": "string",
            "description": "The nbn EE Zone for the Address in this Quote",
            "example": "CBD",
            "enum": [
              "CBD",
              "Zone 1",
              "Zone 2",
              "Zone 3"
            ]
          },
          "region": {
            "type": "string",
            "description": "The nbn EE Region for the Address in this Quote",
            "example": "Region 1",
            "enum": [
              "Region 1",
              "Region 2",
              "Region 3",
              "Region 4"
            ]
          },
          "slr": {
            "type": "string",
            "description": "nbn Service Level Region (SLR) for issue response times",
            "example": "Isolated",
            "enum": [
              "Isolated",
              "Major Rural",
              "Metropolitan",
              "Minor Rural",
              "Regional Centre",
              "Remote",
              "Urban"
            ]
          },
          "estimatedDeliveryTime": {
            "type": "string",
            "description": "Number of days (after order acceptance) when service will be activated"
          },
          "status": {
            "type": "string",
            "description": "Status of the Quote being requested. `Complete` is the one priced status. `Rejected`, `Cancelled`, `Closed` and `Expired` end the quote without a price, and a new quote can be requested for the location. A status the carrier sends outside this list is published as `InProgress`.",
            "example": "Acknowledged",
            "enum": [
              "Acknowledged",
              "InProgress",
              "Rejected",
              "Cancelled",
              "Complete",
              "Closed",
              "Expired"
            ]
          },
          "subStatus": {
            "type": "string",
            "description": "Present only while an `InProgress` quote is held waiting on you (\"Action Required\"): the carrier's reason is in `eventNote`. Contact support to give the carrier what it needs. The `quote.actionRequired` webhook is sent when it is set.",
            "example": "Pending",
            "enum": [
              "Pending"
            ]
          },
          "productOffering": {
            "$ref": "#/components/schemas/ProductOfferingReference"
          },
          "place": {
            "$ref": "#/components/schemas/PlaceReference"
          },
          "address": {
            "type": "string",
            "description": "Ours, not the carrier's: the premises address for `place.id`, as the portal shows it. Absent when we hold no address for the location.",
            "example": "Lot 708 16 De Vecchi Cl, Edmonton, QLD"
          },
          "fibreBuildCategory": {
            "type": "string",
            "description": "Ours: the fibre build category the carrier gave for the premises, as the portal shows it. Absent until the carrier gives one.",
            "example": "A",
            "x-known-values": [
              "A",
              "B",
              "C",
              "D"
            ]
          },
          "validFor": {
            "$ref": "#/components/schemas/DatePeriod"
          },
          "quoteSpecification": {
            "$ref": "#/components/schemas/QuoteSpecificationReference"
          },
          "quoteItem": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QuoteItemReference"
            }
          },
          "quoteServiceItem": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QuoteItemReference"
            }
          },
          "quoteResourceItem": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QuoteItemReference"
            }
          },
          "eventNote": {
            "$ref": "#/components/schemas/EventNoteReference"
          },
          "quoteApproval": {
            "$ref": "#/components/schemas/QuoteApproval"
          }
        },
        "type": "object"
      },
      "QuoteCreated": {
        "properties": {
          "id": {
            "type": "string",
            "description": "A unique identifier for quote"
          },
          "status": {
            "type": "string",
            "description": "Status of the Quote being requested.",
            "example": "Acknowledged",
            "enum": [
              "Acknowledged",
              "InProgress",
              "Rejected",
              "Cancelled",
              "Complete",
              "Closed",
              "Expired"
            ]
          },
          "externalId": {
            "type": "string",
            "description": "Reference provided by the RSP"
          }
        },
        "type": "object"
      },
      "SalesLeadIntentScore": {
        "properties": {
          "type": {
            "type": "string",
            "description": "nbn Sales Lead Intent Type",
            "example": "CustomerIntentScore",
            "enum": [
              "CustomerIntentScore"
            ]
          },
          "contentCategory": {
            "type": "string",
            "description": "nbn Sales Lead, Intent score content category"
          },
          "score": {
            "type": "string",
            "description": "nbn Sales Lead Intent Score - Intent at a premises (LOC ID) is scored based on recency, frequency, and engagement of the visitor on the nbn website for premises",
            "readOnly": true,
            "example": "Low",
            "enum": [
              "Low",
              "Medium",
              "High"
            ]
          },
          "refreshDate": {
            "type": "string",
            "format": "date-time",
            "description": "Date and time where the intent, context, or score changed."
          }
        },
        "type": "object"
      },
      "SalesLead": {
        "properties": {
          "id": {
            "type": "string",
            "description": "NBN unique identifier for this Sales Lead record",
            "example": "SLE000000000000",
            "pattern": "SLE[0-9]{12}"
          },
          "creationDate": {
            "type": "string",
            "format": "date-time",
            "description": "Date and time when the Sales Lead was first created. Sales Lead creationDate can be before or after IntentScore refreshDate."
          },
          "type": {
            "type": "string",
            "description": "Intent Score Sales Lead Type",
            "example": "CustomerIntentScore",
            "enum": [
              "CustomerIntentScore"
            ]
          },
          "relatedPlace": {
            "$ref": "#/components/schemas/RelatedPlace"
          },
          "intent": {
            "$ref": "#/components/schemas/SalesLeadIntentScore"
          }
        },
        "patternProperties": {
          "^@type$": {
            "type": "string",
            "description": "The type of record",
            "example": "IntentScoreSalesLead",
            "enum": [
              "IntentScoreSalesLead"
            ]
          }
        },
        "type": "object"
      },
      "Action": {
        "properties": {
          "code": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "CurrentCondition": {
        "properties": {
          "code": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "createdDateTime": {
            "type": "string"
          },
          "alertMessage": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "nextAction": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Action"
            }
          }
        },
        "type": "object"
      },
      "OverviewIndicator": {
        "properties": {
          "connectivity": {
            "type": "string",
            "description": "",
            "example": "Amber",
            "enum": [
              "Amber",
              "Green",
              "Red",
              "Grey"
            ]
          },
          "performance": {
            "type": "string",
            "description": "",
            "example": "Amber",
            "enum": [
              "Amber",
              "Green",
              "Red",
              "Grey"
            ]
          },
          "stability": {
            "type": "string",
            "description": "",
            "example": "Amber",
            "enum": [
              "Amber",
              "Green",
              "Red",
              "Grey"
            ]
          }
        },
        "type": "object"
      },
      "ServiceHealthSpec": {
        "properties": {
          "id": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "href": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "@type": {
            "type": "string",
            "description": "Access Technology",
            "example": "FTTC",
            "enum": [
              "FTTC",
              "FTTN",
              "FTTB",
              "HFC",
              "Fixed Wireless",
              "FTTP"
            ]
          }
        },
        "type": "object"
      },
      "HealthCategoryItem": {
        "description": "One measurement. Any of `value`, `unit`, `status` and `timeStamp` is null when nbn has no reading for it.",
        "properties": {
          "@type": {
            "type": "string",
            "description": "Which reading of `id` this is, such as `Downstream` or `DoToday`.",
            "example": "Downstream"
          },
          "id": {
            "type": "string",
            "example": "ActualLineRate"
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "example": "Green",
            "enum": [
              "Amber",
              "Green",
              "Red",
              "Grey",
              null
            ]
          },
          "timeStamp": {
            "type": [
              "string",
              "null"
            ],
            "example": "2026-10-29T01:15:00.000Z"
          },
          "unit": {
            "type": [
              "string",
              "null"
            ],
            "example": "Mbps"
          },
          "value": {
            "type": [
              "string",
              "null"
            ],
            "example": "60.1"
          }
        },
        "type": "object"
      },
      "HealthCategory": {
        "description": "One group of measurements in a service health report.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The group, such as `OperationalStatus`, `Speed`, `Dropouts`, `Cpe`, `SeamLessRateAdaptation`, `InHomeWiring`, `DynamicLineManagement` or `Outage`. Which groups appear depends on the access technology, and nbn may add more.",
            "example": "Speed"
          },
          "version": {
            "type": "string",
            "example": "1.0"
          },
          "healthCategoryItem": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HealthCategoryItem"
            }
          }
        },
        "type": "object"
      },
      "ServiceHealth": {
        "properties": {
          "status": {
            "type": "string",
            "description": "The current state of the Service Health record as per the NBN Service Health State model.",
            "example": "Acknowledged",
            "enum": [
              "Acknowledged",
              "InProgress",
              "Complete"
            ]
          },
          "id": {
            "type": "string",
            "description": "NBN unique identifier for this Service Health record instance",
            "example": "HRI000000000000",
            "pattern": "HRI[0-9]{12}"
          },
          "avcId": {
            "type": "string",
            "description": "The AVC Service ID",
            "example": "AVC000000000000",
            "pattern": "AVC[0-9]{12}"
          },
          "href": {
            "type": "string",
            "description": "href reference to the Service Health record instance",
            "example": "https://api.checknetworks.tools/v2/nbn/service_health/report/HRI0000000000001"
          },
          "currentCondition": {
            "$ref": "#/components/schemas/CurrentCondition"
          },
          "overviewIndicator": {
            "$ref": "#/components/schemas/OverviewIndicator"
          },
          "serviceHealthSpecification": {
            "$ref": "#/components/schemas/ServiceHealthSpec"
          },
          "healthCategory": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HealthCategory"
            }
          }
        },
        "type": "object"
      },
      "ServiceTestRelatedService": {
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier for the Diagnostic Template to be invoked.",
            "example": "AVC000000000000",
            "pattern": "(AVC|OVC|NNL)[0-9]{12}"
          },
          "type": {
            "type": "string",
            "description": "Type of the resource to perform the test on.",
            "example": "AVC",
            "enum": [
              "AVC",
              "OVC",
              "NNL"
            ]
          }
        },
        "type": "object"
      },
      "ServiceTestSpecification": {
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier for the Diagnostic Template to be invoked.",
            "example": "TST000000000000",
            "pattern": "TST[0-9]{12}"
          },
          "version": {
            "type": "string",
            "description": "The version for the Diagnostic Template to be invoked. Format is Major.Minor.",
            "example": "1.0",
            "pattern": "^\\d*\\.\\d*"
          }
        },
        "type": "object"
      },
      "ServiceTestExecutionDate": {
        "properties": {
          "startDateTime": {
            "type": "string",
            "description": "The diagnostic test execution start time.",
            "pattern": "YYYY-MM-DDThh:mm:ssZ"
          },
          "endDateTime": {
            "type": "string",
            "description": "The diagnostic test execution end time.",
            "pattern": "YYYY-MM-DDThh:mm:ssZ"
          }
        },
        "type": "object"
      },
      "ServiceTestResultMeasure": {
        "properties": {},
        "type": "object"
      },
      "ServiceTestResultError": {
        "properties": {
          "code": {
            "type": "string",
            "description": "Unique code representing a specific error scenario."
          },
          "reason": {
            "type": "string",
            "description": "Short description of the error scenario."
          }
        },
        "type": "object"
      },
      "ServiceTestResults": {
        "properties": {
          "type": {
            "type": "string",
            "description": "The name of the diagnostic test for which this result is for."
          },
          "status": {
            "type": "string",
            "description": "Status of the diagnostic test Results.",
            "example": "InProgress",
            "enum": [
              "InProgress",
              "Completed",
              "Cancelled"
            ]
          },
          "result": {
            "type": "string",
            "description": "Outcome of the test executed.",
            "example": "Passed",
            "enum": [
              "Passed",
              "Failed"
            ]
          },
          "testMeasure": {
            "type": "array",
            "description": "The Service Test specific attributes are defined in the set of Service Health Pulse Attribute and Business Rules Specification for each technology.",
            "items": {
              "$ref": "#/components/schemas/ServiceTestResultMeasure"
            }
          },
          "errors": {
            "type": "array",
            "description": "The Service Test specific attributes are defined in the set of Service Health Pulse Attribute and Business Rules Specification for each technology.",
            "items": {
              "$ref": "#/components/schemas/ServiceTestResultError"
            }
          }
        },
        "type": "object"
      },
      "ServiceTest": {
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier of the service test record",
            "example": "TRI000000000000",
            "pattern": "TRI[0-9]{12}"
          },
          "status": {
            "type": "string",
            "description": "The current state of the service test",
            "example": "InProgress",
            "enum": [
              "InProgress",
              "Completed",
              "Cancelled"
            ]
          },
          "@type": {
            "type": "string",
            "description": "The service test type",
            "example": "serviceTestPulse",
            "enum": [
              "serviceTestPulse"
            ]
          },
          "serviceRef": {
            "$ref": "#/components/schemas/ServiceTestRelatedService"
          },
          "testSpecificationRef": {
            "$ref": "#/components/schemas/ServiceTestSpecification"
          },
          "executionDate": {
            "$ref": "#/components/schemas/ServiceTestExecutionDate"
          },
          "servicetestResults": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServiceTestResults"
            }
          }
        },
        "type": "object"
      },
      "TelemetrySpecification": {
        "properties": {
          "id": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "href": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "@type": {
            "type": "string",
            "example": "FTTC",
            "enum": [
              "FTTC",
              "FTTN",
              "FTTB",
              "HFC",
              "Fixed Wireless",
              "FTTP"
            ]
          },
          "specificationType": {
            "type": "string",
            "example": "Service Health Telemetry Template",
            "enum": [
              "Service Health Telemetry Template"
            ]
          }
        },
        "type": "object"
      },
      "TelemetryMeasurementPeriod": {
        "properties": {
          "unit": {
            "type": "string",
            "example": "Hours",
            "enum": [
              "Hours",
              "Days"
            ]
          },
          "value": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "TelemetryMeasurement": {
        "properties": {
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "The start of the measurement period."
          },
          "unit": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "TelemetryCategoryItem": {
        "properties": {
          "@type": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "measurementPeriod": {
            "$ref": "#/components/schemas/TelemetryMeasurementPeriod"
          },
          "measurement": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TelemetryMeasurement"
            }
          }
        },
        "type": "object"
      },
      "TelemetryCategory": {
        "properties": {
          "type": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "telemetryCategoryItem": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TelemetryCategoryItem"
            }
          }
        },
        "type": "object"
      },
      "TelemetryRelatedService": {
        "properties": {
          "id": {
            "type": "string"
          },
          "@referredType": {
            "type": "string",
            "example": "AVC",
            "enum": [
              "AVC"
            ]
          }
        },
        "type": "object"
      },
      "TelemetryCollectionPeriod": {
        "properties": {
          "fromDate": {
            "type": "string",
            "format": "date-time"
          },
          "toDate": {
            "type": "string",
            "format": "date-time"
          }
        },
        "type": "object"
      },
      "Telemetry": {
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The AVC ID of the service being checked",
            "example": "AVC000000000000",
            "pattern": "AVC[0-9]{12}"
          },
          "href": {
            "type": "string",
            "description": "href reference to the Telemetry record instance",
            "example": "https://api.checknetworks.tools/v2/nbn/service_health/service/AVC0000000000001/telemetry"
          },
          "serviceHealthSpecification": {
            "$ref": "#/components/schemas/TelemetrySpecification"
          },
          "telemetryCategory": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TelemetryCategory"
            }
          },
          "relatedService": {
            "$ref": "#/components/schemas/TelemetryRelatedService"
          },
          "collectionPeriod": {
            "$ref": "#/components/schemas/TelemetryCollectionPeriod"
          }
        },
        "type": "object"
      },
      "NbnSiteRestrictionError": {
        "description": "nbn's refusal of a qualification item, as nbn sends it. On a Service Transfer check, the reason the `serviceRef` did not validate:\n\n - RJ002003 - The provided AVC does not exist: {AVC}\n - RJ002004 - The provided AVC has recently been disconnected: {AVC}\n - RJ002005 - The provided AVC exists at a different location: {AVC}\n - RJ002006 - The provided AVC has recently been disconnected at a different location: {AVC}",
        "properties": {
          "code": {
            "type": "string",
            "description": "nbn's error code.",
            "example": "RJ002003"
          },
          "reason": {
            "type": "string",
            "description": "nbn's explanation.",
            "example": "The provided AVC does not exist: AVC000000000001"
          },
          "message": {
            "type": "string",
            "description": "Further detail, when nbn gives it."
          },
          "status": {
            "type": "string",
            "description": "The status nbn reports with the error, when it gives one."
          },
          "@type": {
            "type": "string",
            "description": "nbn's error type, when it gives one."
          }
        },
        "type": "object"
      },
      "NbnSiteRestrictionNote": {
        "properties": {
          "code": {
            "type": "string",
            "description": "nbn's note code.",
            "example": "NTD0004"
          },
          "reason": {
            "type": "string",
            "description": "nbn's explanation."
          },
          "relatedTo": {
            "type": "string",
            "description": "A relative link to the part of the qualification the note is about, such as `#/siteRestriction/supportingResource/id['NTD000000000001']`."
          }
        },
        "type": "object"
      },
      "SupportingProductReference": {
        "description": "A service already at the location.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The service's Product Instance ID (PRI).",
            "example": "PRI000000000001"
          },
          "priorityAssist": {
            "type": "string",
            "description": "Priority Assist. The value will be either \"Yes\" or \"No\". This field is not mandatory.",
            "example": "No",
            "enum": [
              "No",
              "Yes"
            ]
          },
          "serviceProviderId": {
            "type": "string",
            "description": "Service Provider ID. The Eligible Party Identifier will be sent in Service Provider ID. (type=\"Product Instance ownership\")"
          },
          "resourceRef": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "relative link to the resource NTD Uni port or Copper Pair used by the PRI services"
            }
          }
        },
        "type": "object"
      },
      "CapacityAvailability": {
        "properties": {
          "featureType": {
            "type": "string",
            "example": "TC2"
          },
          "capacity": {
            "type": "integer"
          },
          "unitOfMeasure": {
            "type": "string"
          },
          "available": {
            "type": "boolean"
          },
          "highSpeedNotLessThan": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "NbnBandwidthMeasure": {
        "description": "A bandwidth nbn measured or estimated, such as a copper line's `DownstreamCurrentAssuredRate` or an NTD's `RemainingBandwidthUpstream`.",
        "properties": {
          "bandwidthType": {
            "type": "string",
            "example": "DownstreamCurrentAssuredRate"
          },
          "featureType": {
            "type": "string",
            "example": "TC4"
          },
          "unitOfMeasure": {
            "type": "string",
            "example": "Mbps"
          },
          "bandwidth": {
            "type": "number"
          }
        },
        "type": "object"
      },
      "SupportingProductFeatures": {
        "properties": {
          "type": {
            "type": "string",
            "description": "The nbn product the features are for (NFAS, NCAS, NHAS, NWAS).",
            "example": "NFAS"
          },
          "version": {
            "type": "string"
          },
          "multicast": {
            "type": "boolean"
          },
          "TC2": {
            "type": "boolean"
          },
          "capacityAvailability": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CapacityAvailability"
            }
          },
          "bandwidthAvailability": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NbnBandwidthMeasure"
            }
          },
          "speedTierAvailability": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Product Name or Friendly Name of TC4 High Speed Tiers.",
              "example": "Home Fast"
            }
          }
        },
        "type": "object"
      },
      "SupportingRelatedLocationFeatures": {
        "properties": {
          "networkBoundaryPoint": {
            "type": "string",
            "example": "Telecommunications Outlet"
          },
          "newDevelopmentsChargeApplies": {
            "type": "boolean"
          },
          "nonPremiseLocation": {
            "type": "string",
            "example": "No"
          },
          "MDU": {
            "type": "boolean",
            "description": "Whether the location is in a multi-dwelling unit."
          },
          "inHomeAmplifier": {
            "type": "boolean"
          },
          "locationUseIndicator": {
            "type": "string"
          },
          "selfAndRSPProfessionalInstallEligible": {
            "type": "boolean"
          },
          "safetyCriticalServiceAlert": {
            "type": "boolean",
            "description": ""
          },
          "fibreBuildCategory": {
            "type": "string",
            "description": "The Enterprise Ethernet fibre build category, on an Enterprise Ethernet qualification.",
            "example": "A"
          }
        },
        "type": "object"
      },
      "SupportingRelatedSiteBoundaries": {
        "properties": {
          "region": {
            "type": "string",
            "example": "Major Rural"
          },
          "CSAId": {
            "type": "string",
            "example": "CSA400000010428"
          },
          "onNetAvailability": {
            "type": "string",
            "example": "Yes"
          },
          "poiId": {
            "type": "string",
            "example": "4IPS"
          },
          "zone": {
            "type": "string",
            "description": "The Enterprise Ethernet zone, on an Enterprise Ethernet qualification.",
            "example": "Zone 1"
          },
          "routeTypeZone": {
            "type": "string",
            "description": "On an Enterprise Ethernet qualification."
          },
          "businessFibreZone": {
            "type": "boolean",
            "description": "On an Enterprise Ethernet qualification."
          },
          "localPOI": {
            "type": "string",
            "description": "On an Enterprise Ethernet qualification.",
            "example": "4IPS - IPSWICH"
          }
        },
        "type": "object"
      },
      "BandwidthRates": {
        "properties": {
          "bandwidthRate": {
            "type": "integer"
          },
          "featureType": {
            "type": "string"
          },
          "unitOfMeasure": {
            "type": "string"
          },
          "supported": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "NbnUniPort": {
        "properties": {
          "id": {
            "type": "string",
            "example": "1-UNI-D1"
          },
          "status": {
            "type": "string",
            "example": "Used"
          },
          "serviceIDMatch": {
            "type": "boolean",
            "description": "Whether this port carries the `serviceRef` the request named. Exactly one port is `true` when the service validates. Returned only when the request carried `serviceRef`."
          }
        },
        "type": "object"
      },
      "NbnSpeedTierSupport": {
        "properties": {
          "featureType": {
            "type": "string",
            "description": "The high speed tier.",
            "example": "Home Hyperfast"
          },
          "supported": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "SupportingResource": {
        "description": "A network resource at the location: an NTD (FTTP, HFC, Fixed Wireless) or a copper line (`CopperLineResource`, FTTN/FTTB/FTTC).",
        "properties": {
          "type": {
            "type": "string",
            "example": "NTD"
          },
          "id": {
            "type": "string",
            "example": "NTD000000000001"
          },
          "version": {
            "type": "string"
          },
          "serviceIDMatch": {
            "type": "boolean",
            "description": "On a copper line, whether it carries the `serviceRef` the request named. Returned only when the request carried `serviceRef`."
          },
          "networkCoexistence": {
            "type": "boolean"
          },
          "serviceabilityClass": {
            "type": "string"
          },
          "remediationRequired": {
            "type": "boolean"
          },
          "subsequentInstallationChargeApplies": {
            "type": "boolean"
          },
          "copperPairStatus": {
            "type": "string"
          },
          "lastActiveDate": {
            "type": "string"
          },
          "NBNServiceStatus": {
            "type": "string",
            "example": "Line In Use"
          },
          "bandwidthRatesSupported": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BandwidthRates"
            }
          },
          "copperBandwidthRates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NbnBandwidthMeasure"
            }
          },
          "uniPortD": {
            "type": "array",
            "description": "The NTD's data ports.",
            "items": {
              "$ref": "#/components/schemas/NbnUniPort"
            }
          },
          "NTDLocation": {
            "type": "string",
            "example": "INDOOR"
          },
          "NTDType": {
            "type": "string",
            "example": "INTERNAL"
          },
          "NTDPowerType": {
            "type": "string",
            "example": "AC"
          },
          "NTDVersion": {
            "type": "string",
            "example": "V1"
          },
          "NTDMACAddress": {
            "type": "string"
          },
          "NTDBandwidth": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NbnBandwidthMeasure"
            }
          },
          "speedTiersSupported": {
            "type": "array",
            "description": "Whether the installed NTD supports each high speed tier.",
            "items": {
              "$ref": "#/components/schemas/NbnSpeedTierSupport"
            }
          }
        },
        "type": "object"
      },
      "SupportingTechnology": {
        "properties": {
          "businessFibre": {
            "type": "boolean",
            "description": "Indicates whether Business Grade Services over Fibre is available at the Location."
          },
          "primaryAccessTechnology": {
            "type": "string",
            "description": "Primary Access Technology",
            "example": "Fibre",
            "enum": [
              "Fibre",
              "Fibre To The Building",
              "Fibre To The Curb",
              "Fibre To The Node",
              "HFC",
              "Satellite",
              "Wireless"
            ]
          },
          "alternativeTechnology": {
            "type": "string",
            "description": "Another technology the location can move to. \"Fibre\" on an FTTN or FTTC premises means it is eligible for Fibre Uplift (`/nbn/service_qualification/fibre_uplift`).",
            "example": "Fibre"
          },
          "accessType": {
            "type": "string",
            "description": "Whether this is the location's primary or secondary access.",
            "example": "Primary"
          },
          "serviceabilityClass": {
            "type": "string",
            "description": "The servicability classes are:\n\n0 - Planned to be serviced by Fibre in the future (boundary status isnt In Service yet)\n1 - Serviceable by Fibre, no drop or NTD in place\n2 - Serviceable by Fibre, drop in place, no NTD in place\n3 - Serviceable by Fibre, drop and NTD in place\n4 - Planned to be serviced by Wireless\n5 - Serviceable by Wireless, CPE not installed\n6 - Serviceable by Wireless, CPE installed\n7 - Planned to be serviced by Satellite\n8 - Serviceable by Satellite, Satellite - NTD not installed\n9 - Serviceable by Satellite, Satellite - NTD installed\n10 - Planned to be serviceable by Copper\n11 - Serviceable by copper, active node present\n12 - Serviceable by copper, jumpering is required\n13 - Serviceable by copper, infrastructure in place\n20 - Planned to be serviced by HFC, outside plant does not exist\n21 - Serviceable by HFC, the location has a street TAP but requires a lead-in, PCD, internal tie cable, and wall-plate/socket\n22 - Serviceable by HFC, the location has a street TAP, lead-in & PCD in place, but no internal tie-cables with wall plates/sockets\n23 - Serviceable by HFC, the location has a wall-plate/socket but no HFC NTD\n24 - Serviceable by HFC, Location has a wall-plate/socket & HFC NTD and is Ready to Connect\n30 - Planned to be serviceable by FTTC\n31 - Serviceable by FTTC, no line available (NCD required)\n32 - Serviceable by FTTC, cut-in required (NCD required)\n33 - Serviceable by FTTC, cut-in complete (NCD required)\n34 - Serviceable by FTTC, infrastructure in place (Check NCD status)",
            "example": "0",
            "enum": [
              "0",
              "1",
              "2",
              "3",
              "4",
              "5",
              "6",
              "7",
              "8",
              "9",
              "10",
              "11",
              "12",
              "13",
              "20",
              "21",
              "22",
              "23",
              "24",
              "30",
              "31",
              "32",
              "33",
              "34"
            ]
          },
          "serviceabilityClassReason": {
            "type": "string",
            "description": "This value will contain the serviceability class reason for unserviceable Premises. It is not mandatory as only applicable for serviceability classes 0,4,7,10 and 20."
          },
          "serviceabilityDate": {
            "type": "string",
            "description": "(Optional) Expected date when you can successfully submit an order. The value will be a DateTime stamp in UTC format.\nExample \"yyyy-mmddThh:mm:ssZ\"."
          },
          "estimatedAvailabilityDate": {
            "type": "string",
            "description": "(Optional) Expected date when you can successfully submit an EEAS order. The value will be a Date in ISO 8601 format.\nExample \"YYYY-MM-DD\"."
          }
        },
        "type": "object"
      },
      "SiteRestriction": {
        "description": "One location's qualification, in nbn's own shape as Kinetix returns it. `supportingProduct` is present only when the request carried `customerAuthorityDate`, and `serviceIDMatch` only when it carried `serviceRef`.",
        "properties": {
          "id": {
            "type": "string",
            "description": "A string. Unique identifier of a place - Must be a geographicAddress ID or GeographicLocation ID or GeographicSite ID."
          },
          "href": {
            "type": "string",
            "description": "Link to this location's address, `/nbn/address/{locId}`, on this API."
          },
          "name": {
            "type": "string",
            "description": "A string. Short text describing the place"
          },
          "@baseType": {
            "type": "string",
            "description": ""
          },
          "customerAuthorityDate": {
            "type": "string",
            "description": "The value inserted will be a DateTime stamp in UTC format \"yyyy-MM-ddThh:mm:ssZ\" and the type field will be empty. It must be less than 45 calendar days old."
          },
          "serviceabilityStatus": {
            "type": "string",
            "description": "The resulting serviceability status, per location for NEBS access technologies.",
            "example": "Rejected",
            "enum": [
              "Rejected",
              "Serviceable",
              "Serviceable - Shortfall"
            ]
          },
          "status": {
            "type": "string",
            "description": "Status of Enterprise Ethernet (EE) product serviceability. \"Valid\": Location is serviceable for EEAS now. \"Product Unavailable\": Location is not serviceable for EEAS. May contain a subsequent estimatedAvailabilityDate attribute.",
            "example": "Valid",
            "enum": [
              "Valid",
              "Product Unavailable"
            ]
          },
          "siteRestrictionError": {
            "$ref": "#/components/schemas/NbnSiteRestrictionError"
          },
          "notes": {
            "type": "array",
            "description": "nbn's notes on the qualification, such as an NTD that may need optimising.",
            "items": {
              "$ref": "#/components/schemas/NbnSiteRestrictionNote"
            }
          },
          "supportingProduct": {
            "type": "array",
            "description": "The services already at the location. Returned only when the request carried `customerAuthorityDate`.",
            "items": {
              "$ref": "#/components/schemas/SupportingProductReference"
            }
          },
          "supportingProductFeatures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupportingProductFeatures"
            }
          },
          "supportingRelatedLocationFeatures": {
            "$ref": "#/components/schemas/SupportingRelatedLocationFeatures"
          },
          "supportingRelatedSiteBoundaries": {
            "$ref": "#/components/schemas/SupportingRelatedSiteBoundaries"
          },
          "supportingResource": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupportingResource"
            }
          },
          "supportingTechnology": {
            "$ref": "#/components/schemas/SupportingTechnology"
          }
        },
        "type": "object"
      },
      "NbnEnterpriseEthernetQualification": {
        "description": "nbn's Enterprise Ethernet qualification, as Kinetix returns it. Each `siteRestriction` carries `status`, `supportingTechnology`, the EE boundaries in `supportingRelatedSiteBoundaries` (`region`, `zone`, `routeTypeZone`, `businessFibreZone`, `localPOI`, `onNetAvailability`, `poiId`) and the `fibreBuildCategory` in `supportingRelatedLocationFeatures`.",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The nbn Location ID.",
            "example": "LOC000000000001"
          },
          "siteRestriction": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SiteRestriction"
            }
          }
        },
        "type": "object"
      },
      "NbnFibreUpliftQualification": {
        "description": "nbn's Fibre Uplift qualification, as Kinetix returns it. Unlike the single-site qualification, `siteRestriction` is one object.",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The nbn Location ID.",
            "example": "LOC000000000001"
          },
          "siteRestriction": {
            "$ref": "#/components/schemas/SiteRestriction"
          }
        },
        "type": "object"
      },
      "ServiceQualification": {
        "description": "nbn's single-site qualification, as Kinetix returns it.",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "A string. Unique identifier of a place - Must be a geographicAddress id or GeographicLocation id or GeographicSite id."
          },
          "externalId": {
            "type": "string",
            "description": "If RSP include their system reference id on requests it will be echoed back on response."
          },
          "href": {
            "type": "string",
            "description": "Link to this qualification on this API."
          },
          "siteRestriction": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SiteRestriction"
            }
          },
          "terminationError": {
            "$ref": "#/components/schemas/NbnSiteRestrictionError"
          }
        },
        "type": "object"
      },
      "OpticommGeographicAddress": {
        "type": "object",
        "description": "An Opticomm property, in the carrier's own npis-address `geographicAddress` shape — an integration built against Opticomm reads it unchanged. Served from Check Networks' daily-imported property dataset. Fields the feed does not carry for a property are omitted, never null; `href` points at this API's own resource.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The Opticomm Property ID (OPC #).",
            "example": "OPC000000018908"
          },
          "href": {
            "type": "string",
            "description": "This property's address on this API.",
            "example": "https://api.checknetworks.com/opticomm/geographicAddress/OPC000000018908"
          },
          "name": {
            "type": "string",
            "description": "The full display address.",
            "example": "4 Tiarella Street, Point Cook, VIC 3030"
          },
          "serviceabilityClass": {
            "type": "integer",
            "description": "The property's serviceability class, as the carrier's own responses carry it (a number, e.g. 3 = serviceable FTTP).",
            "example": 3
          },
          "unitTypeCode": {
            "type": "string",
            "example": "Unit"
          },
          "unitNumber": {
            "type": "string",
            "example": "2"
          },
          "lotNumber": {
            "type": "string",
            "example": "316"
          },
          "roadNumber1": {
            "type": "string",
            "example": "4"
          },
          "roadNumber2": {
            "type": "string"
          },
          "roadName": {
            "type": "string",
            "example": "Tiarella"
          },
          "roadTypeCode": {
            "type": "string",
            "example": "Street"
          },
          "postcode": {
            "type": "string",
            "example": "3030"
          },
          "localityName": {
            "type": "string",
            "example": "Point Cook"
          },
          "stateTerritoryCode": {
            "type": "string",
            "example": "VIC"
          },
          "country": {
            "type": "string",
            "example": "Australia"
          },
          "community": {
            "type": "string",
            "description": "The Opticomm community (estate) name.",
            "example": "Alamanda"
          },
          "communityCode": {
            "type": "string",
            "example": "ALMN"
          },
          "exchange": {
            "type": "string",
            "example": "ALMN"
          },
          "osaId": {
            "type": "string",
            "description": "The Opticomm serving area id.",
            "example": "OSA400000000001"
          },
          "rfsDate": {
            "type": "string",
            "format": "date",
            "description": "Ready-for-service date.",
            "example": "2009-02-28"
          },
          "olcDate": {
            "type": "string",
            "format": "date"
          },
          "transitionStart": {
            "type": "string",
            "format": "date"
          },
          "transitionEnd": {
            "type": "string",
            "format": "date"
          },
          "GNAF": {
            "type": "string",
            "description": "The property's G-NAF address PID, when the carrier has matched one — a public identifier, kept as upstream sends it.",
            "example": "GAVIC421715561"
          },
          "latitude": {
            "type": "string",
            "example": "-37.90280666"
          },
          "longitude": {
            "type": "string",
            "example": "144.74954667"
          }
        }
      },
      "OpticommWorkZone": {
        "type": "object",
        "description": "The carrier's work-zone (community) context for a property, as upstream sends it.",
        "properties": {
          "@type": {
            "type": "string"
          },
          "primaryAccessTechnology": {
            "type": "string",
            "example": "FTTP"
          },
          "region": {
            "type": "string",
            "example": "Urban"
          },
          "community": {
            "type": "string"
          },
          "communityCode": {
            "type": "string"
          },
          "communityVendor": {
            "type": "string"
          },
          "exchange": {
            "type": "string"
          },
          "osaId": {
            "type": "string"
          },
          "rfsDate": {
            "type": "string"
          },
          "olcDate": {
            "type": "string"
          },
          "transitionStart": {
            "type": "string"
          },
          "transitionEnd": {
            "type": "string"
          },
          "serviceabilityClass": {
            "type": "string"
          }
        }
      },
      "OpticommAppointment": {
        "type": "object",
        "description": "The carrier's own npis-appointments `Appointment` document — an integration built against Opticomm reads it unchanged. `externalId` carries YOUR reference for the appointment (supplied on create, renamed via PATCH); the carrier-side correlation key is Check Networks' own and never appears. `accessSeekerContact` is server-owned and omitted. Hrefs point at this API's own resources.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The carrier appointment id (OAT #).",
            "example": "OAT000000042611"
          },
          "href": {
            "type": "string",
            "description": "This appointment on this API.",
            "example": "https://api.checknetworks.com/opticomm/appointments/OAT000000042611"
          },
          "externalId": {
            "type": "string",
            "description": "Your reference for the appointment.",
            "example": "PO-2026-04821"
          },
          "creationDate": {
            "type": "string",
            "format": "date-time"
          },
          "lastUpdate": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "description": "RESERVED | BOOKED | IN PROGRESS | COMPLETED | INCOMPLETE | CANCELLED, verbatim.",
            "example": "RESERVED"
          },
          "reasonCode": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "reason": {
                "type": "string"
              }
            }
          },
          "priorityAssist": {
            "type": "string",
            "example": "No"
          },
          "appointmentSLA": {
            "type": "string",
            "example": "Standard"
          },
          "endUserType": {
            "type": "string",
            "example": "Residential"
          },
          "demandType": {
            "type": "string",
            "example": "Standard Install"
          },
          "appointmentType": {
            "type": "string",
            "example": "Appointment"
          },
          "plannedCompletionDate": {
            "type": "string",
            "format": "date-time"
          },
          "endUserContact": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "contactName": {
                  "type": "string"
                },
                "contactType": {
                  "type": "string",
                  "example": "Primary Contact"
                },
                "phoneNumber": {
                  "type": "string"
                },
                "emailAddress": {
                  "type": "string"
                },
                "notes": {
                  "type": "string"
                }
              }
            }
          },
          "appointmentSlot": {
            "type": "object",
            "properties": {
              "appointmentSlotType": {
                "type": "string",
                "example": "AM"
              },
              "sunsetTimer": {
                "type": "string",
                "description": "When a RESERVED slot lapses if not booked."
              },
              "validFor": {
                "type": "object",
                "properties": {
                  "startDateTime": {
                    "type": "string"
                  },
                  "endDateTime": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "place": {
            "type": "object",
            "properties": {
              "href": {
                "type": "string",
                "description": "The property on this API."
              },
              "id": {
                "type": "string",
                "example": "OPC000000010859"
              },
              "name": {
                "type": "string"
              },
              "address": {
                "type": "string"
              },
              "@referredType": {
                "type": "string"
              }
            }
          },
          "siteAccess": {
            "type": "object",
            "description": "The full upstream site-access block, as supplied.",
            "properties": {
              "accessInstructions": {
                "type": "string"
              },
              "accreditationRequirements": {
                "type": "string"
              },
              "buildingName": {
                "type": "string"
              },
              "buildingType": {
                "type": "string"
              },
              "hazardsInformation": {
                "type": "string"
              },
              "inductionRequirements": {
                "type": "string"
              },
              "notes": {
                "type": "string"
              },
              "operationalHours": {
                "type": "string"
              },
              "siteConsiderations": {
                "type": "string"
              },
              "specialConditions": {
                "type": "string"
              }
            }
          },
          "workZone": {
            "$ref": "#/components/schemas/OpticommWorkZone"
          },
          "appointmentHistory": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "reasonCodeHistory": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "reason": {
                      "type": "string"
                    }
                  }
                },
                "lastUpdateHistory": {
                  "type": "string"
                },
                "statusHistory": {
                  "type": "string"
                },
                "appointmentSlotHistory": {
                  "type": "object",
                  "properties": {
                    "appointmentSlotType": {
                      "type": "string"
                    },
                    "sunsetTimer": {
                      "type": "string"
                    },
                    "validFor": {
                      "type": "object",
                      "properties": {
                        "startDateTime": {
                          "type": "string"
                        },
                        "endDateTime": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "OpticommCarrierError": {
        "type": "object",
        "description": "Opticomm's own error object, relayed verbatim when the carrier rejected the request — the same shape their API documents, so an integration built against Opticomm reads it unchanged. Errors that originate with Check Networks (authentication, scopes, validation, ownership) use the standard `Error` envelope instead.",
        "not": {
          "required": [
            "error"
          ]
        },
        "properties": {
          "code": {
            "type": "number",
            "description": "The carrier's application error code."
          },
          "reason": {
            "type": "string",
            "description": "Explanation of the reason for the error."
          },
          "message": {
            "type": "string",
            "description": "Detail and corrective actions, suitable for display."
          },
          "status": {
            "type": "string",
            "description": "HTTP status code extension."
          },
          "referenceError": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "description": "Subclass of the exception, e.g. InvalidAddressException."
          }
        }
      },
      "OpticommSearchAppointmentSlot": {
        "type": "object",
        "description": "One offered technician slot.",
        "properties": {
          "appointmentSlotType": {
            "type": "string",
            "example": "AM"
          },
          "appointmentLeadTime": {
            "type": "string"
          },
          "validFor": {
            "type": "object",
            "properties": {
              "startDateTime": {
                "type": "string"
              },
              "endDateTime": {
                "type": "string"
              }
            }
          },
          "withinTimeWindow": {
            "type": "boolean"
          }
        }
      },
      "OpticommSearchTimeSlot": {
        "type": "object",
        "description": "One upstream npis-appointments `SearchTimeSlot` — the availability answer for a property and window, with `workZone` and `place` kept as the carrier sends them and hrefs pointed at this API's own resources.",
        "properties": {
          "searchDate": {
            "type": "string"
          },
          "demandType": {
            "type": "string",
            "example": "Standard Install"
          },
          "appointmentType": {
            "type": "string",
            "example": "Appointment"
          },
          "appointmentSLA": {
            "type": "string",
            "example": "Standard"
          },
          "priorityAssist": {
            "type": "string",
            "example": "No"
          },
          "endUserType": {
            "type": "string",
            "example": "Residential"
          },
          "place": {
            "type": "object",
            "properties": {
              "href": {
                "type": "string",
                "description": "The property on this API."
              },
              "id": {
                "type": "string",
                "example": "OPC000000010859"
              },
              "name": {
                "type": "string"
              },
              "address": {
                "type": "string"
              },
              "@referredType": {
                "type": "string"
              }
            }
          },
          "availableTimeSlot": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OpticommSearchAppointmentSlot"
            }
          },
          "requestedTimeSlot": {
            "$ref": "#/components/schemas/OpticommSearchAppointmentSlot"
          },
          "appointment": {
            "type": "object",
            "description": "Present on a reschedule search.",
            "properties": {
              "href": {
                "type": "string",
                "description": "The appointment on this API."
              },
              "id": {
                "type": "string"
              },
              "@referredType": {
                "type": "string"
              }
            }
          },
          "workZone": {
            "$ref": "#/components/schemas/OpticommWorkZone"
          }
        }
      },
      "OpticommServiceTestAck": {
        "type": "object",
        "description": "The carrier-style acknowledgement for a requested test. Progress and results arrive asynchronously — poll the test at /opticomm/diagnostics/{testRef}.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The carrier test reference (OTR #).",
            "example": "OTR000000001812"
          },
          "status": {
            "type": "string",
            "example": "Acknowledged"
          },
          "externalId": {
            "type": "string",
            "description": "Your reference, echoed when supplied."
          }
        }
      },
      "OpticommServiceTest": {
        "type": "object",
        "description": "The carrier's own npis-diagnostics `ServiceTest` document, from the latest test callback — an integration built against Opticomm reads it unchanged. `serviceTestResults` arrives exactly as the carrier sends it: a list of `{type, status}` entries while in progress; on completion an object keyed `\"0\"` with sibling flat `result`/`error` values, whose per-test payloads are the documented OTD/OUI/Session/Authentication/ MAC-trace shapes.",
        "properties": {
          "serviceRef": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "example": "OAC000000250963"
              },
              "type": {
                "type": "string",
                "example": "OAC"
              }
            }
          },
          "testSpecificationRef": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "example": "OST000000001001"
              },
              "version": {
                "type": "string",
                "example": "1.0"
              }
            }
          },
          "executionDate": {
            "type": "object",
            "properties": {
              "startDateTime": {
                "type": "string"
              },
              "endDateTime": {
                "type": "string"
              }
            }
          },
          "serviceTestResults": {
            "description": "The carrier's results tree, verbatim (shape varies by state and test)."
          }
        }
      },
      "OpticommDiagnosticTest": {
        "type": "object",
        "description": "One diagnostic test: Check Networks' tracking fields around the carrier's own `ServiceTest` document. Upstream has no result-read API — results arrive only by callback — so this read is a Check Networks extension; `serviceTest` is absent until the first callback lands.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The carrier test reference (OTR #).",
            "example": "OTR000000001812"
          },
          "externalId": {
            "type": "string",
            "description": "Your reference for the test, when supplied on create.",
            "example": "PO-2026-04821"
          },
          "status": {
            "type": "string",
            "enum": [
              "Accepted",
              "InProgress",
              "Completed",
              "Cancelled",
              "Rejected"
            ]
          },
          "requestedAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time"
          },
          "serviceTest": {
            "$ref": "#/components/schemas/OpticommServiceTest"
          }
        }
      },
      "OpticommTestSpecification": {
        "type": "object",
        "description": "One NPIS diagnostic test template eligible for the service.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The upstream testSpecificationRef id, sent verbatim on POST /opticomm/serviceTest.",
            "example": "OST000000001001"
          },
          "name": {
            "type": "string",
            "example": "OTD Status"
          },
          "description": {
            "type": "string",
            "example": "The current status of the NTD at the premises."
          }
        }
      },
      "OpticommOrderProduct": {
        "type": "object",
        "description": "A product / resource / service record inside an Opticomm order — the carrier's own record shape, minus Check Networks' upstream account and interconnect identifiers.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Identifier of the product: the Product Instance (OPI #), NTD (OTD #), NTD port (OUI #) or access service (OAC #)."
          },
          "@referredType": {
            "type": "string",
            "description": "Indicates the (class) type of resource."
          },
          "productSpecification": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "e.g. FTTP, OTD, OUID, OACD."
              },
              "version": {
                "type": "string"
              },
              "specificationType": {
                "type": "string",
                "description": "Product / Resource / Service Specification."
              }
            }
          },
          "ouiType": {
            "type": "string",
            "description": "OUI-V or OUI-D."
          },
          "portId": {
            "description": "The NTD port number."
          },
          "transferType": {
            "type": "string",
            "enum": [
              "Service Transfer",
              "Service Transfer Reversal"
            ]
          },
          "customerAuthorityDate": {
            "type": "string",
            "description": "The date customer authority was obtained (transfers)."
          },
          "priorityAssist": {
            "type": "string",
            "description": "The carrier's priority assist flag. On a Connect, \"Yes\" is accepted only for a customer on our Priority Assistance register (the end user the order's top-level `endUser` names, or when none is named the account or your own end user, never another end user's); otherwise the order is refused with a 422 on `priorityAssist` before anything is drafted.",
            "enum": [
              "Yes",
              "No"
            ]
          },
          "orderSla": {
            "type": "string",
            "example": "Standard"
          },
          "endUserType": {
            "type": "string",
            "enum": [
              "Residential",
              "Business"
            ]
          },
          "speedAndDuplex": {
            "type": "string",
            "example": "1000Mbps Auto Duplex"
          },
          "interfaceType": {
            "type": "string",
            "example": "10/100/1000BASE-T"
          },
          "ouiTransientId": {
            "type": "string",
            "example": "OUI-D2"
          },
          "oacType": {
            "type": "string",
            "example": "N:1"
          },
          "ovcType": {
            "type": "string"
          },
          "accessServiceTechnologyType": {
            "type": "string",
            "example": "FTTP"
          },
          "osaId": {
            "type": "string",
            "description": "The Opticomm Service Area (OSA #)."
          },
          "bandwidthProfile": {
            "type": "string",
            "example": "Opt-WSL3-500-50",
            "description": "The Bandwidth Product SKU."
          },
          "bandwidth-limit": {
            "type": "integer"
          },
          "vlanMode": {
            "type": "string"
          }
        }
      },
      "OpticommRealizedEntry": {
        "type": "object",
        "description": "A realised resource / service entry on an Opticomm order.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Identifier of the entry (sequence number where the carrier assigns one)."
          },
          "action": {
            "type": "string",
            "enum": [
              "ADD",
              "DELETE",
              "MODIFY",
              "NO CHANGE"
            ]
          },
          "product": {
            "$ref": "#/components/schemas/OpticommOrderProduct"
          },
          "bandwidthProfile": {
            "type": "string",
            "description": "The requested Bandwidth Product SKU (service entries).",
            "example": "Opt-WSL3-500-50"
          },
          "osaId": {
            "type": "string"
          },
          "oacType": {
            "type": "string"
          },
          "ovcType": {
            "type": "string"
          },
          "tc1BandwidthProfile": {
            "type": "string"
          },
          "tc4BandwidthProfile": {
            "type": "string"
          },
          "interfaceType": {
            "type": "string"
          }
        }
      },
      "OpticommProductOrder": {
        "type": "object",
        "description": "An Opticomm product order — the carrier's own `ProductOrder` document (npis-product-order), relayed as Opticomm produces it. Exactly two classes of difference from the carrier's response: Check Networks' account and interconnect identifiers are removed, and hyperlinks point at this API instead of the carrier. `externalId` carries YOUR reference (Check Networks holds its own reference with the carrier, so two customers can never collide on one value).",
        "properties": {
          "id": {
            "type": "string",
            "description": "The Opticomm Order ID (OPO #) — the order key across this API.",
            "example": "OPO000000000000"
          },
          "href": {
            "type": "string",
            "format": "uri",
            "description": "Link to this order on the Check Networks API."
          },
          "orderType": {
            "type": "string",
            "description": "The type of order: Connect a new service, Modify an existing service, or Disconnect an existing service.",
            "enum": [
              "Connect",
              "Disconnect",
              "Modify"
            ]
          },
          "state": {
            "type": "string",
            "description": "The current state of the order, as per the Opticomm Product Order state model (verbatim — including the space in `In Progress`).",
            "enum": [
              "Acknowledged",
              "In Progress",
              "Cancelled",
              "Rejected",
              "Complete"
            ]
          },
          "subState": {
            "type": [
              "string",
              "null"
            ],
            "description": "The current substate, when Opticomm has the order Held or Pending.",
            "enum": [
              "Held",
              "Pending"
            ]
          },
          "orderDate": {
            "type": "string",
            "format": "date-time",
            "description": "When the order was created."
          },
          "completionDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the order completed."
          },
          "plannedCompletionDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The earliest completion date requested."
          },
          "externalId": {
            "type": "string",
            "description": "Your reference, supplied when the order was created.",
            "example": "PO-2026-04821"
          },
          "reasonCode": {
            "type": "object",
            "description": "The carrier's business-process event on the order, when one applies.",
            "properties": {
              "code": {
                "type": "string"
              },
              "reason": {
                "type": "string"
              }
            }
          },
          "note": {
            "type": "array",
            "description": "Notes on the order, as the carrier holds them.",
            "items": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string"
                },
                "date": {
                  "type": "string"
                },
                "author": {
                  "type": "string"
                },
                "authorId": {
                  "type": "string"
                },
                "role": {
                  "type": "string"
                }
              }
            }
          },
          "appointment": {
            "type": "object",
            "description": "The installation appointment attached to the order, if any.",
            "properties": {
              "id": {
                "type": "string"
              },
              "href": {
                "type": "string",
                "format": "uri",
                "description": "Link to the appointment on the Check Networks API."
              },
              "@referredType": {
                "type": "string"
              }
            }
          },
          "relatedPlace": {
            "type": "object",
            "description": "The property the order is for.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The Opticomm Property ID (OPC #).",
                "example": "OPC000000016441"
              },
              "href": {
                "type": "string",
                "format": "uri",
                "description": "Link to the property on the Check Networks API."
              },
              "name": {
                "type": "string"
              },
              "@referredType": {
                "type": "string"
              }
            }
          },
          "orderItem": {
            "type": "object",
            "description": "The order line item.",
            "properties": {
              "id": {
                "type": "string"
              },
              "action": {
                "type": "string",
                "enum": [
                  "ADD",
                  "DELETE",
                  "MODIFY",
                  "NO CHANGE"
                ]
              },
              "product": {
                "$ref": "#/components/schemas/OpticommOrderProduct"
              }
            }
          },
          "realizedResource": {
            "type": "array",
            "description": "The physical resources the order realises (NTD, NTD port).",
            "items": {
              "$ref": "#/components/schemas/OpticommRealizedEntry"
            }
          },
          "realizedService": {
            "type": "array",
            "description": "The access services the order realises.",
            "items": {
              "$ref": "#/components/schemas/OpticommRealizedEntry"
            }
          }
        }
      },
      "OpticommProductOrderCreate": {
        "type": "object",
        "required": [
          "orderType",
          "externalId"
        ],
        "description": "The Opticomm `ProductOrder` create body, as the carrier's own API takes it — an integration built against npis-product-order submits the same document here. Check Networks sets the carrier account fields itself (`billingAccount`, `accessSeekerContact`, `productOffering`, `relatedParty`, and interconnect identifiers such as `ovcId`); a request carrying any of them is rejected with `400` rather than silently overridden. `externalId` is YOUR reference — Check Networks presents its own reference to the carrier.",
        "properties": {
          "orderType": {
            "type": "string",
            "description": "Connect a new service (including a Service Transfer), Modify an existing service's bandwidth product, or Disconnect an existing service. A Disconnect additionally requires the `data:delete` scope.",
            "enum": [
              "Connect",
              "Disconnect",
              "Modify"
            ]
          },
          "externalId": {
            "type": "string",
            "maxLength": 45,
            "pattern": "^[A-Za-z0-9._-]+$",
            "description": "Your reference for the order.",
            "example": "PO-2026-04821"
          },
          "plannedCompletionDate": {
            "type": "string",
            "format": "date",
            "description": "The earliest completion date requested (optional)."
          },
          "endUser": {
            "type": "string",
            "maxLength": 64,
            "description": "(Optional, Connect only) Ours, not the carrier's: the number of the end user the order is for, as `POST /data/orders` takes it. The order and its service are that end user's. With `orderItem.product.priorityAssist` \"Yes\" it is that end user's registration that counts; an end user that is not this account's is refused with a 422 on `priorityAssist`, or on `endUser` without the flag."
          },
          "relatedPlace": {
            "type": "object",
            "description": "The property (required for a Connect): the Opticomm Property ID.",
            "properties": {
              "id": {
                "type": "string",
                "example": "OPC000000016441"
              }
            }
          },
          "appointment": {
            "type": "object",
            "description": "A reserved appointment to attach (new installs require one).",
            "properties": {
              "id": {
                "type": "string"
              }
            }
          },
          "orderItem": {
            "type": "object",
            "description": "The order line item. A Connect carries the end-user facts; a Modify or Disconnect names the Product Instance (OPI #) in `product.id`.",
            "properties": {
              "action": {
                "type": "string",
                "enum": [
                  "ADD",
                  "DELETE",
                  "MODIFY",
                  "NO CHANGE"
                ]
              },
              "product": {
                "$ref": "#/components/schemas/OpticommOrderProduct"
              }
            }
          },
          "realizedResource": {
            "type": "array",
            "description": "Physical resource requests — a Connect may name the NTD port (productSpecification `OUID` + `portId`).",
            "items": {
              "$ref": "#/components/schemas/OpticommRealizedEntry"
            }
          },
          "realizedService": {
            "type": "array",
            "description": "Service requests — a Connect or Modify names the requested `bandwidthProfile` (the Bandwidth Product SKU) here.",
            "items": {
              "$ref": "#/components/schemas/OpticommRealizedEntry"
            }
          }
        }
      },
      "OpticommChangeRequest": {
        "type": "object",
        "description": "A planned outage (change work) — the carrier's own npis-networkoutage `ChangeRequest` document, verbatim, with `oacIds` naming ONLY your own affected services.",
        "properties": {
          "id": {
            "type": "string",
            "example": "OCR000000001234"
          },
          "changeCategory": {
            "type": "string"
          },
          "dateCreated": {
            "type": "string"
          },
          "changeType": {
            "type": "string"
          },
          "changeStatus": {
            "type": "string"
          },
          "changeDescription": {
            "type": "string"
          },
          "impactedLocation": {
            "type": "array",
            "description": "Impacted community names.",
            "items": {
              "type": "string"
            }
          },
          "outageStart": {
            "type": "string"
          },
          "outageEnd": {
            "type": "string"
          },
          "outageDuration": {
            "type": "string"
          },
          "interruption1": {
            "type": "string"
          },
          "interruption2": {
            "type": "string"
          },
          "interruption3": {
            "type": "string"
          },
          "interruption4": {
            "type": "string"
          },
          "interruption5": {
            "type": "string"
          },
          "oacIds": {
            "type": "array",
            "description": "Your affected services (OAC ids) — only yours.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "OpticommTroubleTicket": {
        "type": "object",
        "description": "An unplanned outage — the carrier's own npis-networkoutage `TroubleTicket` document, verbatim; with `?extended=true` the fuller record (condition, reason, estimated restoration, comments) as upstream answers it. `oacIds` names ONLY your own affected services, and comment authors are omitted.",
        "properties": {
          "id": {
            "type": "string",
            "example": "OTT000000005678"
          },
          "changeCategory": {
            "type": "string"
          },
          "outagePriority": {
            "type": "string"
          },
          "outageCondition": {
            "type": "string",
            "description": "Extended only."
          },
          "outageReason": {
            "type": "string",
            "description": "Extended only."
          },
          "impactedLocation": {
            "type": "array",
            "description": "Impacted community names.",
            "items": {
              "type": "string"
            }
          },
          "outageStatus": {
            "type": "string"
          },
          "outageRaised": {
            "type": "string"
          },
          "estimatedRestorationDate": {
            "type": "string",
            "description": "Extended only."
          },
          "outageResolved": {
            "type": "boolean"
          },
          "comments": {
            "type": "array",
            "description": "As upstream sends them — strings on the extended record, objects (dateCreated, text) otherwise; authors are omitted either way.",
            "items": {}
          },
          "oacIds": {
            "type": "array",
            "description": "Your affected services (OAC ids) — only yours.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "OpticommOutagePosition": {
        "type": "object",
        "description": "The carrier's own npis-networkoutage position answer for a service — upstream's `NoOutage`, `CurrentOutage` or `FutureOutage` body, verbatim. A service with no outage carries only `currentOutage: false`; the id arrays appear only when the carrier sends them.",
        "properties": {
          "currentOutage": {
            "type": "boolean",
            "example": false
          },
          "plannedOutageIds": {
            "type": "array",
            "items": {
              "type": "string",
              "example": "OCR000000001234"
            }
          },
          "unplannedOutageIds": {
            "type": "array",
            "items": {
              "type": "string",
              "example": "OTT000000005678"
            }
          }
        }
      },
      "OpticommProductRecord": {
        "type": "object",
        "description": "A product record inside an Opticomm inventory document — the carrier's own shape, minus Check Networks' account and interconnect identifiers. Records nest: an NTD (OTD) record carries its ports (OUI) as `productRef` entries of its own.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Identifier of the record: the Product Instance (OPI #), access service (OAC #), NTD (OTD #) or NTD port (OUI #)."
          },
          "@type": {
            "type": "string",
            "example": "OACD"
          },
          "@baseType": {
            "type": "string",
            "example": "OpticommProduct"
          },
          "@referredType": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "accessServiceTechnologyType": {
            "type": "string",
            "example": "FTTP"
          },
          "isBundle": {
            "type": "string"
          },
          "isCustomerVisible": {
            "type": "string"
          },
          "orderDate": {
            "type": "string"
          },
          "startDate": {
            "type": "string"
          },
          "terminationDate": {
            "type": "string"
          },
          "productSerialNumber": {
            "type": "string"
          },
          "productTerm": {
            "type": "string"
          },
          "priorityAssist": {
            "type": "string",
            "enum": [
              "Yes",
              "No"
            ]
          },
          "orderSla": {
            "type": "string",
            "example": "Standard"
          },
          "endUserType": {
            "type": "string",
            "enum": [
              "Residential",
              "Business"
            ]
          },
          "oacType": {
            "type": "string",
            "example": "N:1"
          },
          "oacTransientId": {
            "type": "string",
            "example": "OAC-D2"
          },
          "bandwidthProfile": {
            "type": "string",
            "example": "Opt-WSL3-500-50",
            "description": "The Bandwidth Product SKU."
          },
          "connectedToOui": {
            "type": "string",
            "description": "The NTD port (OUI #) the access service rides."
          },
          "ouiType": {
            "type": "string",
            "example": "OUI-D"
          },
          "vlanMode": {
            "type": "string"
          },
          "speedAndDuplex": {
            "type": "string"
          },
          "ouiTransientId": {
            "type": "string",
            "example": "OUI-D2"
          },
          "osaId": {
            "type": "string",
            "description": "The Opticomm Service Area (OSA #)."
          },
          "ovcType": {
            "type": "string"
          },
          "tc1BandwidthProfile": {
            "type": "string"
          },
          "tc2BandwidthProfile": {
            "type": "string"
          },
          "tc4BandwidthProfile": {
            "type": "string"
          },
          "tc4Inclusions": {
            "type": "string"
          },
          "InterfaceRate": {
            "type": "string"
          },
          "interfaceType": {
            "type": "string"
          },
          "portId": {
            "description": "The NTD port number."
          },
          "vlan": {
            "type": "string"
          },
          "productSpecification": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "e.g. FTTP, OACD, OTD, OUID."
              },
              "version": {
                "type": "string"
              },
              "specificationType": {
                "type": "string"
              }
            }
          },
          "productRef": {
            "type": "array",
            "description": "Nested product records (recursive).",
            "items": {
              "$ref": "#/components/schemas/OpticommProductRecord"
            }
          }
        }
      },
      "OpticommProduct": {
        "type": "object",
        "description": "An Opticomm service — the carrier's own npis-product-inventory `Product` document, relayed as Opticomm produces it. The differences from the carrier's response: Check Networks' account and interconnect identifiers are removed, hyperlinks point at this API, and a service we hold suspended carries `suspensionTakesEffect`. `name` carries YOUR reference (the carrier-side name is Check Networks' own).",
        "properties": {
          "id": {
            "type": "string",
            "description": "The Product Instance (OPI #) — the product key across this API.",
            "example": "OPI000000000000"
          },
          "href": {
            "type": "string",
            "format": "uri",
            "description": "Link to this product on the Check Networks API."
          },
          "@type": {
            "type": "string",
            "description": "The product class — the access technology for an end-user service.",
            "example": "FTTP"
          },
          "@baseType": {
            "type": "string",
            "example": "OpticommProduct"
          },
          "@referredType": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "example": "Opticomm FTTP Service"
          },
          "status": {
            "type": "string",
            "description": "The product lifecycle status, as the carrier holds it.",
            "enum": [
              "created",
              "pendingActive",
              "cancelled",
              "active",
              "pendingTerminate",
              "terminated",
              "suspended",
              "aborted"
            ]
          },
          "suspensionTakesEffect": {
            "type": "string",
            "enum": [
              "within 15 minutes",
              "within 1 business day"
            ],
            "description": "Check Networks' own field, present only while we hold the service suspended: how soon the suspension takes effect. `within 1 business day` for an Opticomm L3 service, which Opticomm suspends for us; `within 15 minutes` for a service we cut ourselves. Absent otherwise.",
            "example": "within 1 business day"
          },
          "name": {
            "type": "string",
            "description": "Your reference for the service.",
            "example": "PO-2026-04821"
          },
          "accessServiceTechnologyType": {
            "type": "string",
            "example": "FTTP"
          },
          "isBundle": {
            "type": "string"
          },
          "isCustomerVisible": {
            "type": "string"
          },
          "orderDate": {
            "type": "string",
            "description": "When the product was ordered."
          },
          "startDate": {
            "type": "string",
            "description": "When the product started."
          },
          "terminationDate": {
            "type": "string",
            "description": "When the product terminated."
          },
          "productSerialNumber": {
            "type": "string"
          },
          "productTerm": {
            "type": "string"
          },
          "priorityAssist": {
            "type": "string",
            "enum": [
              "Yes",
              "No"
            ]
          },
          "orderSla": {
            "type": "string"
          },
          "endUserType": {
            "type": "string",
            "enum": [
              "Residential",
              "Business"
            ]
          },
          "oacType": {
            "type": "string"
          },
          "oacTransientId": {
            "type": "string"
          },
          "bandwidthProfile": {
            "type": "string",
            "example": "Opt-WSL3-500-50"
          },
          "connectedToOui": {
            "type": "string"
          },
          "ouiType": {
            "type": "string"
          },
          "vlanMode": {
            "type": "string"
          },
          "speedAndDuplex": {
            "type": "string"
          },
          "ouiTransientId": {
            "type": "string"
          },
          "osaId": {
            "type": "string"
          },
          "ovcType": {
            "type": "string"
          },
          "tc1BandwidthProfile": {
            "type": "string"
          },
          "tc2BandwidthProfile": {
            "type": "string"
          },
          "tc4BandwidthProfile": {
            "type": "string"
          },
          "tc4Inclusions": {
            "type": "string"
          },
          "InterfaceRate": {
            "type": "string"
          },
          "interfaceType": {
            "type": "string"
          },
          "portId": {
            "description": "The NTD port number."
          },
          "vlan": {
            "type": "string"
          },
          "productSpecification": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "version": {
                "type": "string"
              },
              "specificationType": {
                "type": "string"
              }
            }
          },
          "productRef": {
            "type": "array",
            "description": "The realised records under this product — access service (OAC), NTD (OTD) and, nested within it, the NTD ports (OUI).",
            "items": {
              "$ref": "#/components/schemas/OpticommProductRecord"
            }
          },
          "place": {
            "type": "array",
            "description": "The property the service is delivered at.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The Opticomm Property ID (OPC #)."
                },
                "href": {
                  "type": "string",
                  "format": "uri",
                  "description": "Link to the property on the Check Networks API."
                },
                "name": {
                  "type": "string"
                },
                "@referredType": {
                  "type": "string"
                }
              }
            }
          },
          "productCharacteristic": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "valueType": {
                  "type": "string"
                },
                "value": {}
              }
            }
          },
          "realizingResource": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "OpticommServiceHealthAck": {
        "type": "object",
        "description": "The carrier-style acknowledgement for a requested health report. The RAG report arrives asynchronously — read it at /opticomm/service_health/{hrId} (or the service's reads).",
        "properties": {
          "id": {
            "type": "string",
            "description": "The health report reference (OHR #).",
            "example": "OHR000000105096"
          },
          "status": {
            "type": "string",
            "example": "Acknowledged"
          },
          "externalId": {
            "type": "string",
            "description": "Your reference, echoed when supplied."
          }
        }
      },
      "OpticommServiceHealthReport": {
        "type": "object",
        "description": "The carrier's own npis-service-health report fields, from the latest callback. The carrier-side correlation key is Check Networks' own and is omitted — the wrapper carries YOUR reference.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The health report reference (OHR #).",
            "example": "OHR000000105096"
          },
          "oacId": {
            "type": "string",
            "example": "OAC000000250963"
          },
          "status": {
            "type": "string",
            "example": "Complete"
          },
          "specificationType": {
            "type": "string",
            "example": "Service Health Template"
          },
          "currentCondition": {
            "type": "string",
            "description": "The overall RAG roll-up.",
            "example": "Green"
          }
        }
      },
      "OpticommHealthCategory": {
        "type": "object",
        "description": "One health category from the carrier's report, verbatim.",
        "properties": {
          "type": {
            "type": "string",
            "example": "Connectivity"
          },
          "version": {
            "type": "string"
          },
          "healthCategoryItem": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "@type": {
                  "type": "string"
                },
                "id": {
                  "type": "string",
                  "example": "Session Status"
                },
                "status": {
                  "type": "string",
                  "description": "RAG.",
                  "example": "Green"
                },
                "value": {
                  "type": "string"
                },
                "unit": {
                  "type": "string"
                },
                "timeStamp": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "OpticommServiceHealth": {
        "type": "object",
        "description": "One service-health request: Check Networks' tracking fields around the carrier's own report. Upstream has no report read — reports arrive only by callback — so this read is a Check Networks extension; `serviceHealth` and `healthCategory` are absent until the report lands. `requestStatus` is Check Networks' own request lifecycle: upstream has no failure state, so a failed request is visible here rather than masquerading as InProgress.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The health report reference (OHR #).",
            "example": "OHR000000105096"
          },
          "externalId": {
            "type": "string",
            "description": "Your reference for the request, when supplied on create."
          },
          "status": {
            "type": "string",
            "enum": [
              "InProgress",
              "Complete"
            ]
          },
          "requestStatus": {
            "type": "string",
            "enum": [
              "requested",
              "complete",
              "failed"
            ]
          },
          "requestedAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time"
          },
          "serviceHealth": {
            "$ref": "#/components/schemas/OpticommServiceHealthReport"
          },
          "healthCategory": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OpticommHealthCategory"
            }
          }
        }
      },
      "OpticommSiteRestriction": {
        "type": "object",
        "description": "The qualification body — the property's serviceability, features, charges, boundaries, NTD/port inventory and technology, exactly as the carrier answers them. Upstream resource links that do not resolve here (`supportingProduct[].href`, `supportingResource[].href`, product catalog hrefs) are omitted; `siteRestriction.href` points at this API's own address resource.",
        "properties": {
          "href": {
            "type": "string",
            "description": "The qualified property on this API.",
            "example": "https://api.checknetworks.com/opticomm/geographicAddress/OPC000000016441"
          },
          "id": {
            "type": "string",
            "example": "OPC000000016441"
          },
          "name": {
            "type": "string",
            "description": "The property's display address.",
            "example": "16 Lochiel Parkway, Campbelltown, SA 5074"
          },
          "role": {
            "type": "string"
          },
          "customerAuthorityDate": {
            "type": "string",
            "format": "date",
            "description": "Echoed on a transfer qualification."
          },
          "serviceabilityStatus": {
            "type": "string",
            "description": "Serviceable / Rejected, as upstream enumerates it.",
            "example": "Serviceable"
          },
          "supportingProduct": {
            "type": "array",
            "description": "Product instances already at the property. `serviceProviderId` names the RSP the end user deals with today and is kept; the upstream `href` is not resolvable here and is omitted.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "serviceProviderId": {
                  "type": "string"
                },
                "resourceRef": {
                  "type": "string"
                },
                "@type": {
                  "type": "string"
                },
                "@baseType": {
                  "type": "string"
                },
                "@schemaLocation": {
                  "type": "string"
                }
              }
            }
          },
          "supportingProductFeatures": {
            "type": "object",
            "description": "Feature availability at the property, as one object: the carrier's swagger declares an array, but the live carrier sends one object, and this API relays what the carrier sends. `productAvailability` is present only when the request asked for it (`?productAvailability=true`).",
            "properties": {
              "FTPUNIV": {
                "type": "boolean"
              },
              "IPoE": {
                "type": "boolean"
              },
              "IPv6": {
                "type": "boolean"
              },
              "IPv6IPoE": {
                "type": "boolean"
              },
              "TC1": {
                "type": "boolean"
              },
              "TC2": {
                "type": "boolean"
              },
              "MTU": {
                "type": "number"
              },
              "QinQ": {
                "type": "boolean"
              },
              "type": {
                "type": "string"
              },
              "version": {
                "type": "string"
              },
              "capacityAvailability": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "available": {
                      "type": "boolean"
                    },
                    "capacity": {
                      "type": "number"
                    },
                    "featureType": {
                      "type": "string"
                    },
                    "unitOfMeasure": {
                      "type": "string"
                    },
                    "@type": {
                      "type": "string"
                    },
                    "@schemaLocation": {
                      "type": "string"
                    }
                  }
                }
              },
              "productAvailability": {
                "type": "array",
                "description": "The bandwidth products orderable at the property, by Opticomm's product code.",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "Opt-WSL3-100"
                    },
                    "name": {
                      "type": "string",
                      "example": "Opt-WSL3-100"
                    },
                    "@referredType": {
                      "type": "string"
                    }
                  }
                }
              },
              "bandwidthRatesSupported": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "bandwidthRate": {
                      "type": "number"
                    },
                    "featureType": {
                      "type": "string"
                    },
                    "supported": {
                      "type": "boolean"
                    },
                    "unitOfMeasure": {
                      "type": "string"
                    }
                  }
                }
              },
              "@baseType": {
                "type": "string"
              },
              "@schemaLocation": {
                "type": "string"
              }
            },
            "patternProperties": {
              "^@type$": {
                "type": "string"
              }
            }
          },
          "supportingRelatedLocationFeatures": {
            "type": "object",
            "description": "Charges, activity flags and demand/transfer availability.",
            "properties": {
              "newDevelopmentsChargeApplies": {
                "type": "boolean"
              },
              "newConnectionChargeApplies": {
                "type": "boolean"
              },
              "activeEndUserRegistration": {
                "type": "boolean"
              },
              "activeOpenAppointment": {
                "type": "boolean"
              },
              "activeOpenOrder": {
                "type": "boolean"
              },
              "newDevelopmentsCharge": {
                "type": "object",
                "description": "Upstream ProductOfferingPrice (catalog hrefs omitted)."
              },
              "newConnectionCharge": {
                "type": "object",
                "description": "Upstream ProductOfferingPrice (catalog hrefs omitted)."
              },
              "demandTypeAvailability": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "transferTypeAvailability": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "velocityLocation": {
                "type": "boolean"
              },
              "velocityStatus": {
                "type": "string"
              },
              "velocityOntType": {
                "type": "string"
              },
              "velocityUpgrade": {
                "type": "boolean"
              },
              "@baseType": {
                "type": "string"
              },
              "@schemaLocation": {
                "type": "string"
              },
              "@type": {
                "type": "string"
              }
            }
          },
          "supportingRelatedSiteBoundaries": {
            "type": "object",
            "properties": {
              "region": {
                "type": "string",
                "example": "Urban"
              },
              "community": {
                "type": "string"
              },
              "communityCode": {
                "type": "string"
              },
              "communityVendor": {
                "type": "string"
              },
              "exchange": {
                "type": "string"
              },
              "osaId": {
                "type": "string"
              },
              "rfsDate": {
                "type": "string",
                "format": "date"
              },
              "olcDate": {
                "type": "string",
                "format": "date"
              },
              "transitionStart": {
                "type": "string",
                "format": "date"
              },
              "transitionEnd": {
                "type": "string",
                "format": "date"
              },
              "@baseType": {
                "type": "string"
              },
              "@schemaLocation": {
                "type": "string"
              },
              "@type": {
                "type": "string"
              }
            }
          },
          "supportingResource": {
            "type": "array",
            "description": "The NTD (OTD) inventory — device, bandwidth, UNI ports.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "example": "OTD000000027035"
                },
                "type": {
                  "type": "string",
                  "example": "OTD"
                },
                "version": {
                  "type": "string"
                },
                "OTDBandwidth": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "bandwidth": {
                        "type": "number"
                      },
                      "bandwidthType": {
                        "type": "string"
                      },
                      "unitOfMeasure": {
                        "type": "string"
                      }
                    }
                  }
                },
                "OTDInstallDate": {
                  "type": "string"
                },
                "serial": {
                  "type": "string"
                },
                "vendor": {
                  "type": "string"
                },
                "model": {
                  "type": "string"
                },
                "ouiPortD": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "example": "1-OUI-D2"
                      },
                      "status": {
                        "type": "string",
                        "example": "Free"
                      },
                      "interfaceType": {
                        "type": "string"
                      }
                    }
                  }
                },
                "ouiPortV": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {},
                      "status": {
                        "type": "string"
                      }
                    }
                  }
                },
                "batteryPowerUnit": {
                  "type": "boolean"
                },
                "batteryPowerUnitMonitored": {
                  "type": "string"
                },
                "powerSupplywithBatteryBackupInstallDate": {
                  "type": "string"
                },
                "@baseType": {
                  "type": "string"
                },
                "@schemaLocation": {
                  "type": "string"
                }
              },
              "patternProperties": {
                "^@type$": {
                  "type": "string"
                }
              }
            }
          },
          "supportingTechnology": {
            "type": "object",
            "properties": {
              "primaryAccessTechnology": {
                "type": "string",
                "example": "FTTP"
              },
              "serviceabilityClass": {
                "type": "integer",
                "example": 3
              },
              "serviceabilityDate": {
                "type": "string",
                "format": "date"
              },
              "@baseType": {
                "type": "string"
              },
              "@schemaLocation": {
                "type": "string"
              },
              "@type": {
                "type": "string"
              }
            }
          },
          "@baseType": {
            "type": "string"
          },
          "@schemaLocation": {
            "type": "string"
          },
          "@type": {
            "type": "string"
          }
        }
      },
      "OpticommSiteQualification": {
        "type": "object",
        "description": "The carrier's own npis-service-qualification `SiteQualification` document — an integration built against Opticomm reads it unchanged. Served from Check Networks' qualification cache (fresh until 01:00 Sydney the next day); a request carrying `customerAuthorityDate` is always answered live. `href` points at this API's own resources.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The qualified Opticomm Property ID (OPC #).",
            "example": "OPC000000016441"
          },
          "href": {
            "type": "string",
            "description": "This qualification on this API.",
            "example": "https://api.checknetworks.com/opticomm/singleSiteQualification/OPC000000016441"
          },
          "siteRestriction": {
            "$ref": "#/components/schemas/OpticommSiteRestriction"
          },
          "@baseType": {
            "type": "string"
          },
          "@schemaLocation": {
            "type": "string"
          }
        }
      },
      "NumberRoutingStep": {
        "type": "object",
        "description": "One route in a number's routing chain. The first step takes the call; each step with a `failover` hands it to the next step when it fails. A chain has at most 4 steps. A `time_of_day` step picks a destination by the time, and a `geographic` step by where the caller is (13, 1300 and 1800 numbers only); each falls back to `fallback`. Their destinations are plain routes, not another time-of-day or geographic step. A step read back always carries `routeType`, `routeTarget`, `disconnectResponse`, `redirectCallerId`, `label` and `failover`; a step sent needs only `routeType`, and a field left out is read as null (`disconnectResponse` as `hangup`).",
        "required": [
          "routeType"
        ],
        "properties": {
          "routeType": {
            "type": "string",
            "enum": [
              "trunk",
              "redirect",
              "sip_address",
              "fax2email",
              "disconnected",
              "time_of_day",
              "geographic",
              "route_to_server"
            ],
            "description": "Where this step sends the call. `route_to_server` is set by Check Networks only: a chain that has one is read here but cannot be sent back. `fax2email` needs the number on a fax plan."
          },
          "routeTarget": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255,
            "description": "Per `routeType`: a trunk's `sipUsername` or its `id` (sent as either; read back as the `sipUsername`, or the `id` for a trunk with none, such as an IP-authenticated trunk), a phone number, a SIP URI (`sip:` or `sips:`, not a private or reserved address) or an email address. Null for `disconnected`, `time_of_day` and `geographic`. A phone number is never 000, 112 or 106, in any form (`+61000`, `0061112`, `1831000`): that is a `422`, \"Calls can’t be diverted to an emergency number (000, 112 or 106).\""
          },
          "disconnectResponse": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "hangup",
              "busy_486",
              "reject_603",
              "unallocated_404",
              "out_of_service_410",
              "no_answer",
              null
            ],
            "description": "For `disconnected`: what the caller hears. `hangup` when you send none. Null for every other route type."
          },
          "redirectCallerId": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "original_caller",
              "diverting_number",
              null
            ],
            "description": "For `redirect`: the caller ID the forwarded call shows, the original caller's (the default) or this number. Null for every other route type."
          },
          "label": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255,
            "description": "Your name for this step; null for none."
          },
          "failover": {
            "type": [
              "object",
              "null"
            ],
            "description": "When the call moves on to the next step. Null on the last step, and on a step that never fails over.",
            "required": [
              "trigger",
              "seconds"
            ],
            "properties": {
              "trigger": {
                "type": "string",
                "enum": [
                  "afterSeconds",
                  "whenUnreachable"
                ],
                "description": "`afterSeconds`: after `seconds` of ringing unanswered. `whenUnreachable`: when the destination cannot be reached."
              },
              "seconds": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "For `afterSeconds`: one of 5, 10, 15, 30, 45, 60, 90, 120 or 180 (or a value Check Networks already set on this chain). Null for `whenUnreachable`.",
                "example": 30
              }
            }
          },
          "timezone": {
            "type": "string",
            "enum": [
              "Australia/Sydney",
              "Australia/Melbourne",
              "Australia/Brisbane",
              "Australia/Adelaide",
              "Australia/Perth",
              "Australia/Darwin",
              "Australia/Hobart",
              "Pacific/Auckland"
            ],
            "description": "For `time_of_day`, required there and only there; the time zone its windows are in."
          },
          "windows": {
            "type": "array",
            "maxItems": 12,
            "description": "For `time_of_day`, required there and only there; checked in order, the first match takes the call.",
            "items": {
              "type": "object",
              "required": [
                "days",
                "start",
                "end",
                "routeType"
              ],
              "properties": {
                "days": {
                  "type": "array",
                  "minItems": 1,
                  "description": "The days of the week, 0 (Sunday) to 6 (Saturday).",
                  "items": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 6
                  },
                  "example": [
                    1,
                    2,
                    3,
                    4,
                    5
                  ]
                },
                "start": {
                  "type": "string",
                  "description": "HH:MM, 24-hour. A window may cross midnight (22:00 to 06:00).",
                  "example": "09:00"
                },
                "end": {
                  "type": "string",
                  "example": "17:00"
                },
                "routeType": {
                  "type": "string",
                  "enum": [
                    "trunk",
                    "redirect",
                    "sip_address",
                    "fax2email",
                    "disconnected",
                    "route_to_server"
                  ]
                },
                "routeTarget": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "disconnectResponse": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "hangup",
                    "busy_486",
                    "reject_603",
                    "unallocated_404",
                    "out_of_service_410",
                    "no_answer",
                    null
                  ]
                },
                "redirectCallerId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "original_caller",
                    "diverting_number",
                    null
                  ]
                },
                "label": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          },
          "rules": {
            "type": "array",
            "maxItems": 12,
            "description": "For `geographic`, required there and only there; checked in order, the first match takes the call.",
            "items": {
              "type": "object",
              "required": [
                "mode",
                "routeType"
              ],
              "properties": {
                "mode": {
                  "type": "string",
                  "enum": [
                    "state",
                    "area"
                  ],
                  "description": "`state`: callers in `states`. `area`: callers from mobile originating location (MOLI) codes in `molis`, or fixed numbers in the standard zone units in `szus`."
                },
                "states": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "example": [
                    "QLD",
                    "NSW"
                  ]
                },
                "molis": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "example": [
                    "001"
                  ]
                },
                "szus": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "example": [
                    "Bowral"
                  ]
                },
                "routeType": {
                  "type": "string",
                  "enum": [
                    "trunk",
                    "redirect",
                    "sip_address",
                    "fax2email",
                    "disconnected",
                    "route_to_server"
                  ]
                },
                "routeTarget": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "disconnectResponse": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "hangup",
                    "busy_486",
                    "reject_603",
                    "unallocated_404",
                    "out_of_service_410",
                    "no_answer",
                    null
                  ]
                },
                "redirectCallerId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "original_caller",
                    "diverting_number",
                    null
                  ]
                },
                "label": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          },
          "fallback": {
            "type": "object",
            "description": "For `time_of_day` and `geographic`, required there; where the call goes when no window or rule matches.",
            "required": [
              "routeType"
            ],
            "properties": {
              "routeType": {
                "type": "string",
                "enum": [
                  "trunk",
                  "redirect",
                  "sip_address",
                  "fax2email",
                  "disconnected",
                  "route_to_server"
                ]
              },
              "routeTarget": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "disconnectResponse": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "hangup",
                  "busy_486",
                  "reject_603",
                  "unallocated_404",
                  "out_of_service_410",
                  "no_answer",
                  null
                ]
              },
              "redirectCallerId": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "original_caller",
                  "diverting_number",
                  null
                ]
              },
              "label": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        }
      },
      "SmsDelivery": {
        "type": "object",
        "description": "Where a mobile number's inbound SMS are delivered. A number with no method still receives and stores its messages (`GET /sms/{number}`); they are just not forwarded.\n\nEvery webhook request is signed: the `X-Signature-256` header is `sha256=` and the hex HMAC-SHA256 of the raw request body, keyed with the number's secret. Compare it in constant time and reject a request that does not match.",
        "required": [
          "method",
          "vendor",
          "destination",
          "secretSet"
        ],
        "properties": {
          "method": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "webhook",
              "email",
              null
            ],
            "description": "How messages are forwarded. Null when they are not."
          },
          "vendor": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "generic",
              "3cx",
              "yeastar",
              null
            ],
            "description": "The payload shape of a webhook: `generic` (our own), `3cx` or `yeastar`. Null unless `method` is `webhook`."
          },
          "destination": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255,
            "description": "The webhook URL (a public HTTPS address) or the email address. Null when `method` is null.",
            "example": "https://pbx.example.com/sms"
          },
          "secretSet": {
            "type": "boolean",
            "description": "Whether a signing secret is stored. The secret itself is never returned on a read."
          },
          "secret": {
            "type": "string",
            "description": "Only in the answer to the `PATCH` that generated it: the new signing secret. Store it now; it is not returned again.",
            "example": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
          }
        }
      },
      "DidNumber": {
        "type": "object",
        "description": "A phone number on your account.",
        "required": [
          "number",
          "description",
          "routeType",
          "routeTarget",
          "routingSteps",
          "hasAdvancedRouting",
          "routing",
          "faxEnabled",
          "faxPlanId",
          "smsEnabled",
          "smsDelivery",
          "status",
          "emergencyAddressId",
          "ipnd",
          "portOutCode",
          "endUser",
          "monthlyCost",
          "currency"
        ],
        "properties": {
          "number": {
            "type": "string",
            "description": "The E.164 formatted phone number.",
            "example": "61299999999"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "A label or description for this number. Null when you have not set one."
          },
          "externalRef": {
            "$ref": "#/components/schemas/ExternalRef"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "routeType": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "trunk",
              "redirect",
              "sip_address",
              "fax2email",
              "disconnected",
              "time_of_day",
              "geographic",
              "route_to_server",
              null
            ],
            "description": "How incoming calls to this number are routed first: the first step of `routing`. Null for unrouted numbers. `route_to_server` is not yet generally available."
          },
          "routeTarget": {
            "type": [
              "string",
              "null"
            ],
            "description": "The target for the first route (trunk sipUsername, redirect number, SIP URI or fax email); null for disconnected, unrouted and composite routes."
          },
          "trunkType": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "trunk",
              "residentialLine",
              null
            ],
            "description": "On a `trunk` route, where `routeTarget` is found: `trunk` at `GET /trunks/{username}`, `residentialLine` at `GET /residential-lines/{username}`. Null on every other route."
          },
          "routingSteps": {
            "type": "integer",
            "minimum": 0,
            "description": "How many routes the number's chain has: the first route and its failovers. 0 for an unrouted number.",
            "example": 1
          },
          "hasAdvancedRouting": {
            "type": "boolean",
            "description": "True when the chain has a failover, or its first route is time of day or geographic. A `PATCH` with `routeType` on such a number answers `409` unless it sends `replaceRouting: true`."
          },
          "routing": {
            "type": "array",
            "description": "The whole routing chain, first route first, as the portal shows it. Send it back, changed, as `routing` on `PATCH /numbers/{number}`.",
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/NumberRoutingStep"
                },
                {
                  "required": [
                    "routeType",
                    "routeTarget",
                    "disconnectResponse",
                    "redirectCallerId",
                    "label",
                    "failover"
                  ]
                }
              ]
            }
          },
          "faxEnabled": {
            "type": "boolean",
            "description": "Whether this number takes faxes: true while it is on one of your fax plans (`faxPlanId`). Only such a number can be routed to `fax2email`."
          },
          "faxPlanId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The `id` of the fax plan this number is on (`GET /fax/plans`); null when it is on none."
          },
          "smsEnabled": {
            "type": "boolean",
            "description": "Whether this number can send and receive SMS (a mobile number you hold)."
          },
          "smsDelivery": {
            "description": "Where this mobile number's inbound SMS are delivered. Null for any number that is not a mobile number.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/SmsDelivery"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "suspended",
              "releasing",
              "cancelled"
            ],
            "description": "`releasing` while a release is being carried out; once it is done the number is gone."
          },
          "emergencyAddressId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The `id` of the emergency address this number is listed at (`GET /emergency-addresses`). Null until one is linked. A change to a number in use shows here once the register has been updated, a moment after the call."
          },
          "ipnd": {
            "type": [
              "object",
              "null"
            ],
            "description": "The last IPND record sent for this number and what the IPND said about it; null when none has been sent. The IPND record is the number's address, uploaded to the national database after the fact: it never changes how a call is routed or connected, and a call to 000 goes through whatever it says. A rejected record needs the emergency address fixed so emergency services are given the right one.",
            "required": [
              "status",
              "lastSubmittedAt",
              "directoryListing",
              "errors"
            ],
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "waiting",
                  "accepted",
                  "rejected",
                  "fileRejected"
                ],
                "description": "`waiting` until the IPND answers; `accepted`; `rejected` when it refused the record, with the reasons in `errors`; `fileRejected` when the whole upload it was in was refused, so the record itself is not at fault."
              },
              "lastSubmittedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When the record was uploaded; null while it waits to go."
              },
              "directoryListing": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "unlisted",
                  "serviceAddress",
                  "separateAddress",
                  null
                ],
                "description": "Whether the record lists the number in the public directory, as the emergency address's list code sets it: `unlisted`; listed at the service address; or listed at a separate directory address. Null when the address is no longer on the account."
              },
              "errors": {
                "type": "array",
                "description": "Each code the IPND returned, explained. Empty when there were none.",
                "items": {
                  "type": "object",
                  "required": [
                    "code",
                    "meaning",
                    "fixInAddress"
                  ],
                  "properties": {
                    "code": {
                      "type": "string",
                      "description": "The IPND's code, as its manager writes it.",
                      "example": "MS 053"
                    },
                    "meaning": {
                      "type": "string",
                      "description": "What it means, in plain words."
                    },
                    "fixInAddress": {
                      "type": "boolean",
                      "description": "True when a field of the emergency address needs correcting."
                    }
                  }
                }
              }
            }
          },
          "portOutCode": {
            "type": [
              "string",
              "null"
            ],
            "description": "A mobile number's port-out code from the carrier. Your end user gives it to their new provider to move the number away. It is an identifier, not a password. Null on a fixed number, or when the carrier has not given one.",
            "example": "MOB123456"
          },
          "endUser": {
            "type": [
              "string",
              "null"
            ],
            "description": "The end user who holds this number, by its public number: the one it is tagged to, or else the end user of the trunk it is on. Null when the number is your own.",
            "example": "100042"
          },
          "monthlyCost": {
            "type": [
              "string",
              "null"
            ],
            "deprecated": true,
            "description": "Monthly recurring cost for this number as a decimal dollar amount, without GST. Null when no hosting product prices this number's category, which is not the same as free. Deprecated: read `monthlyCostExGst`, `monthlyCostGst` and `monthlyCostIncGst` instead.",
            "example": "4.95"
          },
          "monthlyCostExGst": {
            "type": [
              "string",
              "null"
            ],
            "description": "The monthly cost without GST, as a decimal dollar amount. Null, with the other two, when nothing prices this number.",
            "example": "4.95"
          },
          "monthlyCostGst": {
            "type": [
              "string",
              "null"
            ],
            "description": "The GST on the monthly cost; `0.00` on a GST-free account.",
            "example": "0.50"
          },
          "monthlyCostIncGst": {
            "type": [
              "string",
              "null"
            ],
            "description": "The monthly cost with GST.",
            "example": "5.45"
          },
          "currency": {
            "type": "string",
            "description": "The currency for `monthlyCost`.",
            "example": "AUD"
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the number was added to the account's stock, in UTC."
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the number last changed, in UTC."
          }
        }
      },
      "NumberOrder": {
        "type": "object",
        "description": "A number order. Accepted is not done: an order is recorded `pending`, the numbers are allocated and routed in the background, usually within a minute, and the order ends `completed` with its numbers or `failed` with `error`. An order inside a bundle is a `draft`, holding nothing, until the bundle is released.",
        "required": [
          "id",
          "status",
          "type",
          "szu",
          "blockSize",
          "spare",
          "trunk",
          "emergencyAddressId",
          "routeType",
          "routeTarget",
          "bundle",
          "error",
          "numbers",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The order's id, for `GET /numbers/orders/{id}`."
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "pending",
              "completed",
              "failed",
              "cancelled"
            ],
            "description": "`draft`: in a bundle, waiting for it to be released. `pending`: being set up. `completed`: the numbers are yours, listed in `numbers`. `failed`: nothing was allocated; `error` says why. `cancelled`: taken out of its bundle, or the bundle was abandoned."
          },
          "type": {
            "type": "string",
            "enum": [
              "fixed",
              "mobile",
              "local_rate_1300",
              "toll_free_1800",
              "nz_geographic",
              "nz_0800"
            ],
            "description": "The number type ordered."
          },
          "szu": {
            "type": [
              "string",
              "null"
            ],
            "description": "The numbering area of a geographic order; null for other types.",
            "example": "Brisbane"
          },
          "blockSize": {
            "type": "integer",
            "enum": [
              1,
              10,
              100
            ],
            "description": "How many consecutive numbers the order is for."
          },
          "spare": {
            "type": "boolean",
            "description": "True when the numbers were ordered spare: on no trunk, routed to Disconnected until you set their route."
          },
          "trunk": {
            "type": [
              "string",
              "null"
            ],
            "description": "The `sipUsername` of the trunk the numbers go on. Null for a spare order.",
            "example": "acme-main"
          },
          "emergencyAddressId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The emergency address the numbers are listed at; null for a spare order."
          },
          "routeType": {
            "type": "string",
            "enum": [
              "trunk",
              "redirect",
              "sip_address",
              "disconnected"
            ],
            "description": "Where the order said calls go: `trunk` rings the trunk, `redirect` forwards to `routeTarget`, `sip_address` sends to a SIP URI, and a spare order is `disconnected`."
          },
          "routeTarget": {
            "type": [
              "string",
              "null"
            ],
            "description": "The trunk's `sipUsername`, the forward number or the SIP URI; null when spare."
          },
          "bundle": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The bundle the order is in, when it was placed in one."
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why a `failed` order failed, or why a `cancelled` one was cancelled, in plain words. Null otherwise.",
            "example": "No complete block of 10 numbers (e.g. X0–X9) is available."
          },
          "numbers": {
            "type": "array",
            "description": "The numbers allocated, once `completed`, each with the route it has now. Empty until then.",
            "items": {
              "type": "object",
              "required": [
                "number",
                "routeType",
                "routeTarget"
              ],
              "properties": {
                "number": {
                  "type": "string",
                  "description": "E.164 digits, with no leading `+`.",
                  "example": "61755512340"
                },
                "routeType": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "trunk",
                    "redirect",
                    "sip_address",
                    "fax2email",
                    "disconnected",
                    "time_of_day",
                    "geographic",
                    "route_to_server",
                    null
                  ],
                  "description": "How the number's calls are routed, as `GET /numbers/{number}` shows it."
                },
                "routeTarget": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The route's destination, as `GET /numbers/{number}` shows it."
                }
              }
            }
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "ResLineResolution": {
        "type": "object",
        "description": "What happens to a Res Line that a change would leave with no number. A request refused with `409` `res_line_needs_number` names each line in `error.resLines`; send it again with one of these for each line, and the change and the choice are made together.",
        "required": [
          "residentialLine",
          "action"
        ],
        "additionalProperties": false,
        "properties": {
          "residentialLine": {
            "type": "string",
            "description": "The line's SIP username, as `/residential-lines/{username}` names it.",
            "example": "res-4821"
          },
          "action": {
            "type": "string",
            "enum": [
              "allocate_number",
              "move_number",
              "suspend",
              "cancel"
            ],
            "description": "`allocate_number` orders a new number like the one leaving, at its emergency address unless `emergencyAddressId` names another; it is billed like any number. `move_number` puts `number`, another of your active numbers, on the line and routes it there. `suspend` stops the line making and taking calls until you resume it; it keeps billing. `cancel` cancels the line for good. A line in contract has an early termination charge, which is shown and accepted on the line's page in the portal, so `cancel` answers `422` for it: choose another here."
          },
          "number": {
            "type": "string",
            "description": "For `move_number`, the number to move to the line, E.164 digits.",
            "example": "61755512346"
          },
          "emergencyAddressId": {
            "type": "string",
            "format": "uuid",
            "description": "For `allocate_number`, the new number's emergency address. Defaults to the leaving number's."
          }
        }
      },
      "EmergencyAddress": {
        "type": "object",
        "description": "The address emergency services are given for a number, with the customer it is listed under. In Australia this is the number's IPND (Integrated Public Number Database) listing, and every Australian number needs one linked before it can be routed. Link a number to an address with `emergencyAddressId` on `PATCH /numbers/{number}`. Fields are the IPND's own, with its lengths.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true,
            "description": "The address's identifier, as `emergencyAddressId` on a number names it.",
            "example": "9b2f4c1e-6a7d-4e0b-9c3a-2d5e8f1a7b64"
          },
          "country": {
            "type": "string",
            "enum": [
              "AU"
            ],
            "description": "The country whose emergency register lists the address. `AU` is the only value today; it may be omitted when creating one.",
            "example": "AU"
          },
          "label": {
            "type": "string",
            "maxLength": 80,
            "description": "Your name for the address. Unique on your account.",
            "example": "Head Office"
          },
          "listing": {
            "type": "object",
            "properties": {
              "listCode": {
                "type": "string",
                "enum": [
                  "LE",
                  "UL",
                  "SA"
                ],
                "description": "How the listing appears in directories: `LE` listed entry, `UL` unlisted, `SA` listed with the address suppressed."
              },
              "usageCode": {
                "type": "string",
                "enum": [
                  "R",
                  "B",
                  "G",
                  "C",
                  "N"
                ],
                "description": "Who uses the service: `R` residential, `B` business, `G` government, `C` charity, `N` not available."
              },
              "findingNameSameAsCustomer": {
                "type": "boolean",
                "default": true,
                "description": "Whether the directory finding name is the customer's name. When false on an `LE` or `SA` listing, `findingName1` is required."
              },
              "findingName1": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 40
              },
              "findingName2": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 40
              },
              "findingTitle": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 12
              }
            }
          },
          "customer": {
            "type": "object",
            "properties": {
              "name1": {
                "type": "string",
                "maxLength": 40,
                "description": "The customer's surname or business name."
              },
              "name2": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 40,
                "description": "The customer's given names."
              },
              "longName": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 80
              },
              "title": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 12
              },
              "contactName1": {
                "type": "string",
                "maxLength": 40
              },
              "contactName2": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 40
              },
              "contactNumber": {
                "type": "string",
                "maxLength": 20
              }
            }
          },
          "serviceAddress": {
            "type": "object",
            "description": "Where the service is used, which is the address emergency services are sent to. Give a `streetName` or a `buildingProperty`.",
            "properties": {
              "gnafPid": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 32,
                "description": "The G-NAF address detail PID, the `gnafId` of a `GET /addresses/search` result. Sent on a create or an update, it fills every other service address field from that address in the shape the IPND record needs (building, unit, level, street number and suffix, street name and type, locality, state, postcode), as the portal's address search does; a field sent beside it wins over the filled one. An unknown PID answers `422` on this field. The answer shows the filled address."
              },
              "buildingType": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 6
              },
              "buildingNumber": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 5
              },
              "buildingNumberSuffix": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 1
              },
              "floorType": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 2
              },
              "floorNumber": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 4
              },
              "buildingProperty": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 40
              },
              "buildingLocation": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 30
              },
              "houseNumber": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 5
              },
              "houseNumberSuffix": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 3
              },
              "streetName": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 25
              },
              "streetType": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 8
              },
              "streetSuffix": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 6
              },
              "locality": {
                "type": "string",
                "maxLength": 40
              },
              "state": {
                "type": "string",
                "maxLength": 3,
                "example": "QLD"
              },
              "postcode": {
                "type": "string",
                "pattern": "^[0-9]{4}$",
                "example": "4000"
              }
            }
          },
          "directoryAddress": {
            "type": "object",
            "description": "The address printed in directories. On an `LE` or `SA` listing that does not use the service address, `locality`, `state`, `postcode` and a `streetName` or `buildingProperty` are required.",
            "properties": {
              "sameAsService": {
                "type": "boolean",
                "default": true
              },
              "gnafPid": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 32,
                "description": "The `gnafId` of a `GET /addresses/search` result. Sent, it fills the directory address's street number, street name and type, locality, state and postcode from that address and sets `sameAsService` to false, unless those fields are sent beside it. An unknown PID answers `422` on this field."
              },
              "buildingProperty": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 40
              },
              "houseNumber": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 5
              },
              "streetName": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 25
              },
              "streetType": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 8
              },
              "locality": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 40
              },
              "state": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 3
              },
              "postcode": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^[0-9]{4}$"
              }
            }
          },
          "liveNumbers": {
            "type": "integer",
            "readOnly": true,
            "description": "How many of your numbers are listed at this address. It cannot be deleted while any are.",
            "example": 2
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "FaxPlan": {
        "type": "object",
        "description": "A fax plan. A number sends and receives faxes only while it is on an open plan.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The plan's ID.",
            "example": "9b2f6c1e-3a47-4d0b-8a55-2f0d6f6f2c11"
          },
          "kind": {
            "type": "string",
            "enum": [
              "bundle",
              "service"
            ],
            "description": "`bundle` is the Fax Bundle: one number, pages included in the monthly fee. `service` is the fax service: any number of numbers, a monthly fee for each, and a charge for each page sent."
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "closed"
            ]
          },
          "endUser": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number of the end user the plan is for, or null when it is your own.",
            "example": "100245"
          },
          "numbers": {
            "type": "array",
            "description": "The numbers on the plan now, as E.164 digits.",
            "items": {
              "type": "string"
            },
            "example": [
              "61299990001"
            ]
          },
          "openedOn": {
            "type": "string",
            "format": "date"
          },
          "closedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the plan was opened, in UTC."
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the plan last changed, in UTC."
          }
        }
      },
      "CallingPermission": {
        "type": "string",
        "description": "A calling-permission class that can be applied to a trunk. `AUEmergency` and `AUFreecall` are always enabled and cannot be removed; the remaining classes are opt-in per trunk, subject to the ceiling the wholesaler has configured.",
        "enum": [
          "AUEmergency",
          "AUFreecall",
          "AUNational",
          "AUMobile",
          "AU13",
          "NZNational",
          "NZMobile",
          "International"
        ],
        "example": "AUNational"
      },
      "TrunkNumberFormat": {
        "type": "string",
        "enum": [
          "national",
          "international",
          "internationalDigits"
        ],
        "description": "How an Australian number is written on calls delivered to a trunk. `national`: `0` plus the national number (`0755501234`). `international`: with a plus (`+61755501234`). `internationalDigits`: international digits only, with no plus (`61755501234`).",
        "example": "international"
      },
      "TrunkIpEntry": {
        "type": "object",
        "description": "One entry on a trunk's IP ACL.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The entry's id, as `DELETE /trunks/{username}/ips/{ipId}` takes it.",
            "example": "0192f0c4-5b7e-7c1a-9d3e-2f6a8b4c1d20"
          },
          "ipAddress": {
            "type": "string",
            "description": "The allowed address in CIDR form (a single host is `/32`, or `/128` for IPv6), or the host name when `type` is `host`.",
            "example": "203.0.113.10/32"
          },
          "type": {
            "type": "string",
            "enum": [
              "cidr",
              "host"
            ],
            "description": "`cidr` for an address or range; `host` for a host name, which is resolved on its DNS TTL and allows the addresses it resolves to."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "A label for this IP entry."
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the entry was added, in UTC."
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the entry last changed, in UTC."
          }
        }
      },
      "SipTrunk": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The trunk's public id. Every trunk has one, including a trunk set up without a SIP credential, so every `/trunks/{username}` endpoint accepts it in place of the SIP username. Trunk events carry it as `trunkId`. The internal database id is never exposed.",
            "example": "9b2f6c1e-4a7d-4f0e-8d3a-2c5b7e9f1a04"
          },
          "name": {
            "type": "string",
            "description": "A friendly name for this trunk."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "An optional description for this trunk."
          },
          "externalRef": {
            "$ref": "#/components/schemas/ExternalRef"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "authMethod": {
            "type": "string",
            "description": "The SIP authentication method. A trunk is always `both`: it accepts either registration with its credential or a source IP on its IP ACL. The other values remain for compatibility and are not returned for a trunk.",
            "enum": [
              "registration",
              "ip_acl",
              "both"
            ]
          },
          "sipUsername": {
            "type": [
              "string",
              "null"
            ],
            "description": "The trunk's platform-generated SIP digest username. Every `/trunks/{username}` endpoint accepts it, as it accepts `id`. Null on a trunk set up without a SIP credential, which authenticates only by IP: address that trunk by its `id`.",
            "example": "784512"
          },
          "sipDomain": {
            "type": "string",
            "description": "The SIP domain for this trunk.",
            "example": "sip.checknetworks.com.au"
          },
          "type": {
            "type": "string",
            "enum": [
              "payg",
              "ultimate"
            ],
            "description": "The trunk's plan. This is what decides the price: on `ultimate` each channel is a recurring billed assignment, on `payg` the channels are a ceiling and outbound calls are metered per use."
          },
          "channels": {
            "type": "integer",
            "description": "Maximum concurrent calls allowed on this trunk. On `ultimate` this is also the number of channels billed."
          },
          "maxInternational": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Maximum concurrent international calls. **Null means no trunk-level limit** — the trunk inherits your account's cap rather than being capped at zero. Setting it to `0` is a different thing entirely: that blocks international calling on this trunk. A limit applies only while `International` is among `callingPermissions`; without it this is null."
          },
          "cpsLimit": {
            "type": "integer",
            "description": "Maximum calls per second."
          },
          "faxEnabled": {
            "type": "boolean",
            "description": "Whether T.38 fax is enabled."
          },
          "activeCalls": {
            "type": "integer",
            "readOnly": true,
            "description": "Calls up on the trunk now, as the portal's Concurrency card counts them. `GET /voice/calls/active?trunk=` lists them."
          },
          "recordingEnabled": {
            "type": "boolean",
            "description": "Whether call recording is on. When it is, every call on the trunk is recorded."
          },
          "callingPermissions": {
            "type": "array",
            "description": "The calling-permission classes applied to this trunk (its call barring). `AUEmergency` and `AUFreecall` are always listed: 000 and freecall numbers are never barred.",
            "items": {
              "$ref": "#/components/schemas/CallingPermission"
            }
          },
          "defaultCallerId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The default outbound caller ID presented for calls from this trunk."
          },
          "forcePrivateCli": {
            "type": "boolean",
            "description": "Whether all outbound calls present as Private/Anonymous regardless of the caller ID set."
          },
          "forceOutboundCli": {
            "type": "boolean",
            "description": "Whether every outbound call presents `defaultCallerId`, whatever caller ID the PBX sends."
          },
          "defaultState": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "NSW",
              "VIC",
              "QLD",
              "SA",
              "WA",
              "TAS",
              "NT",
              "ACT",
              null
            ],
            "description": "The default registration state for this trunk. Null when none is set."
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "suspended",
              "cancelled"
            ],
            "description": "A `suspended` trunk makes and receives no calls: new outbound calls are refused, and calls to its numbers are refused before they reach your PBX. It still places 000 (and 112 and 106) calls, and for an hour after one, calls to its numbers are delivered so the emergency service can call back. See `suspendedBy`."
          },
          "suspendedBy": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "account",
              "checkNetworks",
              null
            ],
            "description": "Who suspended the trunk, while `status` is `suspended`. `account`: you did (in the portal or with `POST /trunks/{username}/suspend`), and you can resume it. `checkNetworks`: we placed a hold (for example for non-payment or fraud), which only we lift; `POST /trunks/{username}/resume` answers 409. Null when the trunk is not suspended."
          },
          "calledNumberFormat": {
            "$ref": "#/components/schemas/TrunkNumberFormat",
            "description": "How the dialled number is written in the Request-URI and To of calls delivered to this trunk. `national` is an Australian number as `0` plus the national number (`0755501234`); a number that is not Australian is delivered as digits only."
          },
          "callerNumberFormat": {
            "$ref": "#/components/schemas/TrunkNumberFormat",
            "description": "How an Australian caller's number is written in From on calls delivered to this trunk. A number's own inbound format, where set, overrides this for calls to that number. An overseas or withheld caller is delivered as received."
          },
          "provisioningState": {
            "type": "string",
            "enum": [
              "pending",
              "active"
            ],
            "description": "Whether the trunk's latest change (to the trunk, its SIP credential or its IP ACL) has reached every customer SBC. `pending` until the next network reload, which runs every minute; `active` once every SBC has it. A new trunk reads `pending` at first: wait for `active` before a test call."
          },
          "provisionedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the voice network was first confirmed to hold the trunk's latest change. Null while `provisioningState` is `pending`."
          },
          "internationalHold": {
            "type": [
              "object",
              "null"
            ],
            "description": "An international-cap hold on the trunk, or null. While it is in force the trunk's international calls are refused; calls within Australia, and 000, still go. Raise a support ticket to have it released.",
            "required": [
              "since",
              "capMinutes",
              "trippedMinutes"
            ],
            "properties": {
              "since": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When the hold was placed."
              },
              "capMinutes": {
                "type": "integer",
                "description": "The trunk's international minutes cap for the period."
              },
              "trippedMinutes": {
                "type": "integer",
                "description": "The international minutes the trunk had made when the hold was placed."
              }
            }
          },
          "pendingPlanChange": {
            "type": [
              "object",
              "null"
            ],
            "description": "A plan or channel change booked for the next billing cycle, or null. A downgrade made with `PATCH /trunks/{username}` is booked this way; `DELETE /trunks/{username}/plan-change` cancels it.",
            "required": [
              "direction",
              "type",
              "channels",
              "effectiveOn"
            ],
            "properties": {
              "direction": {
                "type": "string",
                "enum": [
                  "upgrade",
                  "downgrade",
                  "none"
                ],
                "description": "Which way the change moves the trunk from its current plan and channels."
              },
              "type": {
                "type": "string",
                "enum": [
                  "payg",
                  "ultimate"
                ],
                "description": "The plan the trunk moves to."
              },
              "channels": {
                "type": "integer",
                "description": "The channels billed after the change; 0 on `payg`."
              },
              "effectiveOn": {
                "type": "string",
                "format": "date",
                "description": "The date the change takes effect, the start of the next billing cycle."
              }
            }
          },
          "bookedChange": {
            "$ref": "#/components/schemas/BookedChangeRef"
          },
          "connection": {
            "type": "object",
            "description": "What a PBX needs to connect to the trunk, as the portal's Trunk Configuration panel shows it.",
            "required": [
              "registrar",
              "udpTcpPort",
              "tlsPort",
              "srtpRequired",
              "codecs",
              "dtmfMode",
              "dtmfWarning",
              "numberFormat"
            ],
            "properties": {
              "registrar": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The host name the PBX registers to and sends calls to.",
                "example": "sip.checknetworks.com.au"
              },
              "udpTcpPort": {
                "type": "integer",
                "description": "The SIP port for UDP and TCP.",
                "example": 5060
              },
              "tlsPort": {
                "type": "integer",
                "description": "The SIP port for TLS.",
                "example": 5061
              },
              "srtpRequired": {
                "type": "boolean",
                "description": "Whether the trunk requires SRTP. When it does, the PBX must use TLS on `tlsPort`."
              },
              "codecs": {
                "type": "array",
                "description": "The codecs offered, in preference order.",
                "items": {
                  "type": "string"
                },
                "example": [
                  "PCMA",
                  "PCMU",
                  "G722"
                ]
              },
              "dtmfMode": {
                "type": "string",
                "enum": [
                  "rfc2833",
                  "inband"
                ],
                "description": "How DTMF digits travel between the network and the PBX."
              },
              "dtmfWarning": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "A warning when `dtmfMode` is `inband`, which loses digits on some calls. Null otherwise."
              },
              "numberFormat": {
                "$ref": "#/components/schemas/TrunkNumberFormat",
                "description": "The form the called number arrives in, as `calledNumberFormat`."
              },
              "allowList": {
                "type": "array",
                "description": "The addresses to allow through your firewall for this trunk, read from DNS. Returned by `GET /trunks/{username}` only, not on the list. Empty when DNS could not be read.",
                "items": {
                  "type": "string"
                },
                "example": [
                  "203.0.113.20",
                  "203.0.113.21"
                ]
              }
            }
          },
          "endUser": {
            "type": [
              "string",
              "null"
            ],
            "description": "The end user this trunk belongs to, by its public number; its calls are billed to that end user. Null when the trunk is your own.",
            "example": "100042"
          },
          "allowedCountries": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "This trunk's own list of countries it may call (ISO 3166 alpha-2), or null when it follows your account's list.",
            "example": [
              "GB"
            ]
          },
          "effectiveAllowedCountries": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The countries this trunk's international calls may reach: its own list, else your account's. A call to any other country is refused. Calls to Australia and New Zealand follow `callingPermissions` (New Zealand is `NZMobile` and `NZNational`, and is never in a list), high-risk destinations stay blocked whatever the list says, and 000 always connects.",
            "example": [
              "GB",
              "US"
            ]
          },
          "followsAccountList": {
            "type": "boolean",
            "description": "True when the trunk has no list of its own and follows your account's."
          },
          "dailySpendCapExGst": {
            "type": [
              "string",
              "null"
            ],
            "description": "The trunk's daily spend cap, ex GST, as a dollar string; null is no cap. The cap is measured on our rated cost to you for the trunk's outbound calls since midnight Brisbane time.",
            "example": "50.00"
          },
          "dailySpendCapGst": {
            "type": [
              "string",
              "null"
            ],
            "description": "The GST on the cap.",
            "example": "5.00"
          },
          "dailySpendCapIncGst": {
            "type": [
              "string",
              "null"
            ],
            "description": "The cap with GST.",
            "example": "55.00"
          },
          "spendTodayExGst": {
            "type": "string",
            "description": "The trunk's outbound calls today, ex GST, since midnight Brisbane time. A call counts when it ends, so calls still up are not in it yet.",
            "example": "12.40"
          },
          "spendTodayGst": {
            "type": "string",
            "example": "1.24"
          },
          "spendTodayIncGst": {
            "type": "string",
            "example": "13.64"
          },
          "spendCapHeld": {
            "type": "boolean",
            "description": "True while the trunk is held for reaching its daily spend cap: its outbound calls are refused, all but 000 and 1800. Inbound calls are not affected."
          },
          "spendCapReleasesAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the hold lifts by itself, the next midnight Brisbane time. Null when the trunk is not held. Release Spend Cap Hold lifts it sooner."
          },
          "currency": {
            "type": "string",
            "enum": [
              "AUD"
            ]
          },
          "ips": {
            "type": "array",
            "description": "IP ACL entries for this trunk. Empty when the trunk authenticates only by registration.",
            "items": {
              "$ref": "#/components/schemas/TrunkIpEntry"
            }
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the trunk was created, in UTC."
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the trunk last changed, in UTC."
          }
        }
      },
      "TransitBlackhole": {
        "type": "object",
        "description": "A blackhole on one address of an IP transit service. All traffic to the address is dropped at our border until the blackhole expires or is released.",
        "required": [
          "id",
          "serviceNumber",
          "address",
          "route",
          "placedBy",
          "placedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The blackhole's ID. Use it to release the blackhole.",
            "example": "6f0c2d5e-3b1a-4c8e-9a47-2d1f5b7c9e10"
          },
          "serviceNumber": {
            "type": "string",
            "description": "The IP transit service the address belongs to.",
            "example": "IPT612021859279"
          },
          "address": {
            "type": "string",
            "description": "The blackholed address, IPv4 or IPv6.",
            "example": "203.0.113.5"
          },
          "route": {
            "type": "string",
            "description": "The address as the host route that is dropped, a `/32` or a `/128`.",
            "example": "203.0.113.5/32"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "The reason you gave when you placed it. Always `null` on one Check Networks placed.",
            "example": "Volumetric attack"
          },
          "placedBy": {
            "type": "string",
            "enum": [
              "customer",
              "staff"
            ],
            "description": "`customer` when your portal user or API key placed it, `staff` when Check Networks did."
          },
          "placedAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the blackhole lifts by itself. One you place always has an expiry; one Check Networks places may have none."
          },
          "releasedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it was released or expired. `null` while it is in force."
          }
        }
      },
      "Cdr": {
        "type": "object",
        "description": "One call detail record, as `GET /voice/cdrs` lists it and `GET /voice/cdrs/{cgrid}` reads it.",
        "properties": {
          "cgrid": {
            "type": "string",
            "description": "A unique id for this call. Use it to de-duplicate, and to read one call with `GET /voice/cdrs/{cgrid}`. A re-rated call keeps its id."
          },
          "source": {
            "type": "string",
            "description": "The originating number or SIP URI.",
            "example": "61299999999"
          },
          "callerId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The caller ID that was presented, digits only, as the portal shows it. Null when the caller withheld it or none was presented.",
            "example": "61299999999"
          },
          "destination": {
            "type": "string",
            "description": "The dialled number.",
            "example": "61398765432"
          },
          "durationSeconds": {
            "type": "integer",
            "description": "Total call duration in seconds."
          },
          "cost": {
            "type": "string",
            "deprecated": true,
            "description": "Call cost as a decimal dollar amount, without GST. Deprecated: read `costExGst`, `costGst` and `costIncGst` instead.",
            "example": "0.55"
          },
          "costExGst": {
            "type": "string",
            "description": "The call's cost without GST, as rated.",
            "example": "0.55"
          },
          "costGst": {
            "type": "string",
            "description": "The GST on the call; `0.00` on a GST-free account.",
            "example": "0.06"
          },
          "costIncGst": {
            "type": "string",
            "description": "The call's cost with GST.",
            "example": "0.61"
          },
          "currency": {
            "type": "string",
            "description": "The currency for `cost`.",
            "example": "AUD"
          },
          "rerated": {
            "type": "boolean",
            "description": "Whether the call was re-rated after it was first priced. A re-rated call is listed once, at its new price in `costExGst`, `costGst` and `costIncGst`, and counted once in the summary."
          },
          "previousCostExGst": {
            "type": [
              "string",
              "null"
            ],
            "description": "The price before the most recent re-rate, without GST: the price the call had just before its current one. A call re-rated more than once has only that one here. Null when it was not re-rated.",
            "example": "0.60"
          },
          "previousCostGst": {
            "type": [
              "string",
              "null"
            ],
            "description": "The GST on `previousCostExGst`. Null when the call was not re-rated.",
            "example": "0.06"
          },
          "previousCostIncGst": {
            "type": [
              "string",
              "null"
            ],
            "description": "The price before the most recent re-rate, with GST. Null when the call was not re-rated.",
            "example": "0.66"
          },
          "answered": {
            "type": "boolean",
            "description": "Whether the call was answered."
          },
          "setupTime": {
            "type": "string",
            "format": "date-time",
            "description": "When the call was initiated."
          },
          "answerTime": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the call was answered. Null if unanswered."
          },
          "direction": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "inbound",
              "outbound",
              "internal",
              null
            ],
            "description": "The call's direction."
          },
          "disposition": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "in_progress",
              "answered",
              "busy",
              "no_answer",
              "failed",
              "cancelled",
              "blocked",
              null
            ],
            "description": "The call's final state. `blocked` means the call never reached a carrier (barred call class, high-risk prefix, account hold or insufficient credit) — distinct from `failed`.\n"
          },
          "sipCauseCode": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The SIP response code that ended the call, when the call reached SIP signalling."
          },
          "callClass": {
            "type": [
              "string",
              "null"
            ],
            "description": "The permission class the dialled destination fell into (e.g. AUMobile, International).",
            "example": "AUMobile"
          },
          "trunk": {
            "type": [
              "string",
              "null"
            ],
            "description": "The sipUsername of the trunk (as returned by `GET /trunks`) this call belongs to; null for a call with no trunk.\n"
          },
          "trunkType": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "trunk",
              "residentialLine",
              null
            ],
            "description": "Where `trunk` is found: `trunk` at `GET /trunks/{username}`, `residentialLine` at `GET /residential-lines/{username}`. Null with no trunk.\n"
          },
          "endUser": {
            "type": [
              "string",
              "null"
            ],
            "description": "The end user of the call's trunk, by its public number; the call is billed to that end user. Null for your own trunk or a call with no trunk.\n",
            "example": "100042"
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the call record was written, in UTC."
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the call record last changed (a re-rate), in UTC."
          }
        }
      },
      "NetworkOutages": {
        "description": "Check Networks outages affecting your account's services, in the list envelope every list uses.",
        "required": [
          "queryDateTime",
          "total",
          "page",
          "perPage",
          "results"
        ],
        "properties": {
          "queryDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "When this query was received, in UTC"
          },
          "total": {
            "type": "integer",
            "description": "Number of outages matching the query"
          },
          "page": {
            "type": "integer",
            "description": "The page number returned"
          },
          "perPage": {
            "type": "integer",
            "description": "The number of outages per page"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NetworkOutage"
            }
          }
        },
        "type": "object"
      },
      "TicketCategory": {
        "type": "string",
        "description": "The ticket's category — what kind of work it is, used for routing and for\nfiltering the list.\n\nDeclared in one place and referenced everywhere a category appears\n(filter, create, and the ticket body), so the values you may send are\nalways exactly the values you can be returned.\n\n`security_incident` is a first-class category rather than a technical\nticket with a note, because the ticket register doubles as the\nsecurity-incident register.\n\n`remote_hands` is on-site hands-and-eyes work at a facility.\n`scam_traceback` is a scam-call traceback handed to a wholesale client to\ncontinue tracing their own end customer; both are raised by us and appear\non your tickets, so an integration filtering the list must expect them.\n`scam_report` is yours to raise: a scam call or SMS, or a spoofed number,\nreported by you or your customer.\n",
        "enum": [
          "billing",
          "technical",
          "provisioning",
          "security_incident",
          "remote_hands",
          "general",
          "scam_traceback",
          "scam_report"
        ]
      },
      "TicketComplaint": {
        "type": [
          "object",
          "null"
        ],
        "description": "The complaint and its clocks, null when the ticket is not a complaint. A complaint about one of your end users is yours to handle under the Telecommunications Consumer Complaints Handling Standard: acknowledge it by `acknowledgeDueAt`, answer an urgent one by `urgentResponseDueAt`, resolve it by `resolutionDueAt`, and answer a TIO case by `tioDueAt`. The due times count in working days from when the complaint was received.",
        "required": [
          "urgent",
          "receivedAt",
          "acknowledgedAt",
          "acknowledgeDueAt",
          "urgentResponseDueAt",
          "resolutionDueAt",
          "outcome",
          "tioReference",
          "tioDueAt"
        ],
        "properties": {
          "urgent": {
            "type": "boolean",
            "description": "An urgent complaint has a shorter resolution deadline."
          },
          "receivedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the complaint arrived, which the deadlines count from."
          },
          "acknowledgedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the complaint was acknowledged to the consumer, or null while it has not been."
          },
          "acknowledgeDueAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "urgentResponseDueAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Set when the consumer asked for urgent handling; null otherwise."
          },
          "resolutionDueAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the complaint must be resolved. Not the support target of the same name on the ticket."
          },
          "outcome": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "resolved",
              "withdrawn",
              "unresolved",
              "closed_no_further_action",
              null
            ],
            "description": "How the complaint ended, once recorded. Record it with the resolve on `PATCH /tickets/{ticketRef}`."
          },
          "tioReference": {
            "type": [
              "string",
              "null"
            ],
            "description": "The TIO's case reference, once a TIO case is logged.",
            "example": "TIO-2026-00123"
          },
          "tioDueAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the response to the TIO is due, once a TIO case is logged."
          }
        }
      },
      "TicketSummary": {
        "type": "object",
        "description": "A support ticket header (list projection).",
        "required": [
          "reference",
          "subject",
          "status",
          "priority",
          "category",
          "awaitingCustomerReply",
          "canResolve",
          "resolveBlockedReason",
          "canReopen",
          "relatedService",
          "isComplaint",
          "complaint"
        ],
        "properties": {
          "reference": {
            "type": "string",
            "description": "The public ticket reference, e.g. `INC-7K3F9Q`. Use this to address the ticket in all other endpoints.",
            "example": "INC-7K3F9Q"
          },
          "subject": {
            "type": "string",
            "example": "Service down at Head Office"
          },
          "externalRef": {
            "$ref": "#/components/schemas/ExternalRef"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "pending",
              "resolved",
              "closed"
            ],
            "description": "`open` and `pending` are active states; `resolved` and `closed` are closed-out. `pending` means Check Networks is waiting for your reply, and the response time clock is stopped until you reply. Replying to a resolved/closed ticket re-opens it."
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "normal",
              "high",
              "urgent"
            ]
          },
          "category": {
            "$ref": "#/components/schemas/TicketCategory"
          },
          "endUser": {
            "type": [
              "string",
              "null"
            ],
            "description": "The end user the ticket is about, by its public number. Null when the ticket is your own.",
            "example": "100042"
          },
          "relatedService": {
            "type": [
              "object",
              "null"
            ],
            "description": "What the ticket is linked to, by the same public reference `POST /tickets` takes: a data service's PRI (its AVC when it has none), a trunk's SIP username (its id when it has none), a number in E.164 without the `+`, or an invoice number. Null when the ticket is linked to none of these.",
            "required": [
              "type",
              "ref"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "data",
                  "trunk",
                  "number",
                  "invoice"
                ]
              },
              "ref": {
                "type": "string",
                "example": "PRI000123456789"
              }
            }
          },
          "isComplaint": {
            "type": "boolean",
            "description": "Whether the ticket is a complaint. `complaint` carries its deadlines."
          },
          "complaint": {
            "$ref": "#/components/schemas/TicketComplaint"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the ticket last changed, in UTC."
          },
          "lastActivityAt": {
            "type": "string",
            "format": "date-time",
            "description": "Bumped on every message and state change — the list sorts by this, newest first."
          },
          "awaitingCustomerReply": {
            "type": "boolean",
            "description": "True while the ticket is `pending`, waiting on your reply."
          },
          "canResolve": {
            "type": "boolean",
            "description": "Whether `PATCH` with `status=resolved` would succeed now."
          },
          "resolveBlockedReason": {
            "type": [
              "object",
              "null"
            ],
            "description": "Why the ticket cannot be resolved now, or null. A refused resolve answers 422 with the same `code`.",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "ticket_not_open"
                ]
              },
              "message": {
                "type": "string"
              }
            }
          },
          "canReopen": {
            "type": "boolean",
            "description": "Whether `PATCH` with `status=open` would re-open the ticket (it is resolved or closed)."
          }
        }
      },
      "TicketFaultChecklist": {
        "type": "object",
        "description": "The checklist answers given. A question left unanswered is absent.",
        "properties": {
          "newService": {
            "type": "boolean",
            "description": "The service was connected recently and has never worked."
          },
          "devicesPowered": {
            "type": "boolean",
            "description": "The end user's devices are powered on, and have been restarted."
          },
          "cabledDirectly": {
            "type": "boolean",
            "description": "The router (or phone) is cabled straight to our equipment, with nothing between."
          },
          "siteAvailability": {
            "type": "string",
            "maxLength": 255,
            "description": "When someone is at the site to let a technician in.",
            "example": "Weekdays 8am to 5pm"
          },
          "inductionNeeded": {
            "type": "boolean",
            "description": "A technician needs a site induction before they can enter."
          }
        }
      },
      "TicketCreateRequest": {
        "type": "object",
        "required": [
          "subject",
          "category",
          "body"
        ],
        "properties": {
          "subject": {
            "type": "string",
            "maxLength": 255,
            "example": "Service down at Head Office"
          },
          "category": {
            "$ref": "#/components/schemas/TicketCategory"
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "normal",
              "high",
              "urgent"
            ],
            "default": "normal"
          },
          "body": {
            "type": "string",
            "maxLength": 20000,
            "description": "The opening message, as Markdown."
          },
          "externalRef": {
            "$ref": "#/components/schemas/ExternalRef"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "endUser": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 64,
            "description": "The end user the ticket is about, by its public number. One of your end users that is not archived; any other number is a 422. Omitted or null raises the ticket as your own.",
            "example": "100042"
          },
          "relatedService": {
            "type": [
              "object",
              "null"
            ],
            "description": "Optionally link the ticket to one of your services, or to one of your invoices for a billing question. The reference is validated against your account.",
            "required": [
              "type",
              "ref"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "data",
                  "trunk",
                  "number",
                  "invoice"
                ]
              },
              "ref": {
                "type": "string",
                "maxLength": 64,
                "description": "The record's public identifier: an NBN service reference (AVC/PRI) for `data`, the trunk digest username for `trunk`, the phone number for `number`, or the invoice number for `invoice`. An invoice must be one of yours that has been issued (issued, paid or void); a draft is a 422.",
                "example": "AVC000012345678"
              }
            }
          },
          "isComplaint": {
            "type": "boolean",
            "default": false,
            "description": "Raise the ticket as a complaint: its deadlines start from now, as `POST /tickets/{ticketRef}/complaint` would start them."
          },
          "complaintUrgent": {
            "type": "boolean",
            "default": false,
            "description": "With `isComplaint`, raise it as an urgent complaint. Ignored without it."
          },
          "fault": {
            "type": [
              "object",
              "null"
            ],
            "description": "The fault, on a `technical` ticket about a data service, trunk or number: required there, and refused on any other ticket. There is no limit on open fault tickets for one service unless we set one; a service at it is refused with `fault_ticket_limit`, so add to the open ticket instead.",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "description": "For a data service: `speed`, `dropouts`, `noConnection`, `noService` or `other`. For a trunk or a number: `noDialTone`, `noCalls`, `callQuality`, `noInternational`, `nuisanceCalls`, `hardware` or `other`. Any other is a 422 on `fault.type`.",
                "enum": [
                  "speed",
                  "dropouts",
                  "noConnection",
                  "noService",
                  "noDialTone",
                  "noCalls",
                  "callQuality",
                  "noInternational",
                  "nuisanceCalls",
                  "hardware",
                  "other"
                ]
              },
              "symptoms": {
                "type": "array",
                "maxItems": 20,
                "items": {
                  "type": "string",
                  "maxLength": 255
                },
                "example": [
                  "Drops every evening",
                  "Router shows no sync"
                ]
              },
              "testRefs": {
                "type": "array",
                "maxItems": 20,
                "description": "Tests and health checks you have run on this data service: a test's `id` from `POST /nbn/diagnostics`, or a health check's `hrId`. One of another service, or unknown, is a 422 on `fault.testRefs.{n}`. A trunk or a number has none to link.",
                "items": {
                  "type": "string",
                  "maxLength": 64
                }
              },
              "siteContact": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "Who our technician calls about access to the site.",
                "properties": {
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 32
                  },
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "email",
                    "maxLength": 255
                  }
                }
              },
              "accessNotes": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 2000,
                "example": "Side gate, dog on site."
              },
              "preferredAppointment": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255,
                "description": "When suits the site for a technician, in your words.",
                "example": "Tuesday morning"
              },
              "checklist": {
                "$ref": "#/components/schemas/TicketFaultChecklist"
              },
              "additionalContacts": {
                "type": "array",
                "maxItems": 10,
                "description": "Email addresses to copy on our emails about the ticket.",
                "items": {
                  "type": "string",
                  "format": "email",
                  "maxLength": 255
                }
              }
            }
          }
        }
      },
      "TicketFaultTestRef": {
        "type": "object",
        "description": "A test or health check linked to a fault ticket.",
        "required": [
          "ref",
          "kind"
        ],
        "properties": {
          "ref": {
            "type": "string",
            "description": "The test's id (`GET /nbn/diagnostics/{id}`) or the health check's `hrId`."
          },
          "kind": {
            "type": "string",
            "enum": [
              "test",
              "healthCheck"
            ]
          }
        }
      },
      "TicketFaultSiteContact": {
        "type": [
          "object",
          "null"
        ],
        "description": "Who to contact at the site, when one was given.",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "TicketFault": {
        "type": [
          "object",
          "null"
        ],
        "description": "A fault ticket's fields, as raised with `POST /tickets`. Null on a ticket that is not a fault ticket.",
        "required": [
          "serviceKind",
          "type",
          "symptoms",
          "testRefs",
          "siteContact",
          "accessNotes",
          "preferredAppointment",
          "checklist",
          "additionalContacts"
        ],
        "properties": {
          "serviceKind": {
            "type": "string",
            "enum": [
              "data",
              "voice"
            ],
            "description": "`data` for a data service, `voice` for a trunk or a number: the list `type` is from."
          },
          "type": {
            "type": "string",
            "enum": [
              "speed",
              "dropouts",
              "noConnection",
              "noService",
              "noDialTone",
              "noCalls",
              "callQuality",
              "noInternational",
              "nuisanceCalls",
              "hardware",
              "other"
            ]
          },
          "symptoms": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "testRefs": {
            "type": "array",
            "description": "The tests and health checks of the service you linked.",
            "items": {
              "$ref": "#/components/schemas/TicketFaultTestRef"
            }
          },
          "siteContact": {
            "$ref": "#/components/schemas/TicketFaultSiteContact"
          },
          "accessNotes": {
            "type": [
              "string",
              "null"
            ]
          },
          "preferredAppointment": {
            "type": [
              "string",
              "null"
            ]
          },
          "checklist": {
            "$ref": "#/components/schemas/TicketFaultChecklist"
          },
          "additionalContacts": {
            "type": "array",
            "description": "Email addresses copied on our emails about the ticket.",
            "items": {
              "type": "string",
              "format": "email"
            }
          }
        }
      },
      "TicketMessage": {
        "type": "object",
        "description": "One public entry in a ticket's conversation thread.",
        "required": [
          "id",
          "kind",
          "author",
          "body"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The message's id, as the `ticket.replied` webhook names it in `messageId`. Opaque.",
            "example": "0192f0c4-5b7e-7c1a-9d3e-2f6a8b4c1d23"
          },
          "kind": {
            "type": "string",
            "enum": [
              "reply",
              "event"
            ],
            "description": "`reply` is a human message; `event` is a system timeline entry (e.g. a status change)."
          },
          "author": {
            "type": "string",
            "description": "Display label for the author: `Support` for Check Networks staff, the user's name for portal users, `API` for messages posted via this API, `System` for event entries.",
            "example": "Support"
          },
          "body": {
            "type": "string",
            "description": "The message body as Markdown."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "The same as `createdAt`; a message is never edited."
          },
          "attachments": {
            "type": "array",
            "description": "Attachment metadata. Download the content from `GET /tickets/{ticketRef}/attachments/{attachmentId}`.",
            "items": {
              "type": "object",
              "required": [
                "id",
                "filename"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "example": "0192f0c4-5b7e-7c1a-9d3e-2f6a8b4c1d24"
                },
                "filename": {
                  "type": "string",
                  "example": "modem-lights.jpg"
                },
                "mimeType": {
                  "type": "string",
                  "example": "image/jpeg"
                },
                "sizeBytes": {
                  "type": "integer",
                  "example": 482113
                },
                "isInline": {
                  "type": "boolean",
                  "description": "True when the file is embedded in the message body (referenced as `cid:<id>`), rather than listed alongside it."
                }
              }
            }
          }
        }
      },
      "Ticket": {
        "description": "A support ticket with its public conversation thread.",
        "allOf": [
          {
            "$ref": "#/components/schemas/TicketSummary"
          },
          {
            "type": "object",
            "required": [
              "messages",
              "firstResponseDueAt",
              "resolutionDueAt",
              "fault",
              "escalation"
            ],
            "properties": {
              "fault": {
                "$ref": "#/components/schemas/TicketFault"
              },
              "escalation": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "Your latest escalation with `POST /tickets/{ticketRef}/escalate`; null until you escalate. Each one is also on the thread.",
                "required": [
                  "escalatedAt",
                  "reason"
                ],
                "properties": {
                  "escalatedAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "reason": {
                    "type": "string"
                  }
                }
              },
              "resolvedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "closedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "firstResponseDueAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When our first response is due, under your support targets. The clock counts business hours (around the clock for an `urgent` ticket) and stops while the ticket is `pending`."
              },
              "resolutionDueAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When we aim to resolve the ticket, on the same clock. A complaint's own resolution deadline is `complaint.resolutionDueAt`."
              },
              "csat": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "Your satisfaction rating, once submitted.",
                "properties": {
                  "rating": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 5
                  },
                  "comment": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "submittedAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              },
              "messages": {
                "type": "array",
                "description": "The public conversation thread, oldest first. Internal Check Networks notes are never included.",
                "items": {
                  "$ref": "#/components/schemas/TicketMessage"
                }
              }
            }
          }
        ]
      },
      "TicketsSummary": {
        "type": "object",
        "description": "The ticket report's figures over a range, as the portal's Support Reports page shows them.",
        "required": [
          "from",
          "to",
          "total",
          "open",
          "complaints",
          "byStatus",
          "byPriority",
          "byCategory",
          "volumeByMonth",
          "firstResponseMetPercent",
          "resolutionMetPercent",
          "averageFirstResponseMinutes",
          "averageResolutionMinutes",
          "csat"
        ],
        "properties": {
          "from": {
            "type": "string",
            "format": "date",
            "example": "2026-08-23"
          },
          "to": {
            "type": "string",
            "format": "date",
            "example": "2026-11-21"
          },
          "total": {
            "type": "integer",
            "description": "Tickets raised in the range."
          },
          "open": {
            "type": "integer",
            "description": "Of those, the ones still `open` or `pending`."
          },
          "complaints": {
            "type": "integer",
            "description": "Of those, the complaints."
          },
          "byStatus": {
            "type": "object",
            "description": "Tickets by status, every status listed, zeros included.",
            "additionalProperties": {
              "type": "integer"
            },
            "example": {
              "open": 4,
              "pending": 1,
              "resolved": 12,
              "closed": 3
            }
          },
          "byPriority": {
            "type": "object",
            "description": "Tickets by priority, every priority listed, zeros included.",
            "additionalProperties": {
              "type": "integer"
            },
            "example": {
              "low": 2,
              "normal": 14,
              "high": 3,
              "urgent": 1
            }
          },
          "byCategory": {
            "type": "object",
            "description": "Tickets by category, every category listed, zeros included.",
            "additionalProperties": {
              "type": "integer"
            },
            "example": {
              "billing": 5,
              "technical": 11,
              "general": 4
            }
          },
          "volumeByMonth": {
            "type": "array",
            "description": "Tickets raised each month of the range, oldest first, months with none included.",
            "items": {
              "type": "object",
              "required": [
                "month",
                "count"
              ],
              "properties": {
                "month": {
                  "type": "string",
                  "example": "2026-10"
                },
                "count": {
                  "type": "integer"
                }
              }
            }
          },
          "firstResponseMetPercent": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The percentage of tickets with a first response that had it by the target. Null when none in range had both.",
            "example": 92
          },
          "resolutionMetPercent": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The percentage of resolved tickets resolved by the target. Null when none in range had both.",
            "example": 85
          },
          "averageFirstResponseMinutes": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The average minutes from raising a ticket to our first response, over the tickets that had one."
          },
          "averageResolutionMinutes": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The average minutes from raising a ticket to its resolution, over the resolved ones."
          },
          "csat": {
            "type": "object",
            "required": [
              "count",
              "average"
            ],
            "properties": {
              "count": {
                "type": "integer",
                "description": "Tickets in range with a satisfaction rating."
              },
              "average": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Their average rating, 1 to 5, to two decimal places. Null when none were rated.",
                "example": 4.5
              }
            }
          }
        }
      },
      "OutageSubscription": {
        "type": "object",
        "description": "An email address or Australian mobile subscribed to our outage notices for your account. It is `pending` until the person follows the link they are sent, and only then are notices sent to it.",
        "required": [
          "id",
          "channel",
          "address",
          "scope",
          "status",
          "confirmedAt",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The subscription's id, for `DELETE /outages/subscriptions/{id}`."
          },
          "channel": {
            "type": "string",
            "enum": [
              "email",
              "sms"
            ]
          },
          "address": {
            "type": "string",
            "description": "The email address in lower case, or the mobile in E.164.",
            "example": "+61412345678"
          },
          "scope": {
            "type": "string",
            "enum": [
              "all",
              "data",
              "voice",
              "mobile"
            ],
            "description": "Which outages it is told of."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "active"
            ],
            "description": "`pending` until the person confirms by the link; `active` after."
          },
          "confirmedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "Watch": {
        "type": "object",
        "description": "A subscription that emails one or more people when something we track changes. The human-facing counterpart to a webhook.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The watch's identifier — use this to fetch or remove it.",
            "example": "01J9ZC8Q6H0000000000000000"
          },
          "reference": {
            "type": "string",
            "description": "What is being watched: an order reference (the carrier's, e.g. `OPO000000230683`, or ours, `PND…` — both address the same order), a technician appointment reference, a service identifier (a carrier service id, or a trunk's SIP username), or an outage reference.",
            "example": "OPO000000230683"
          },
          "referenceType": {
            "type": "string",
            "description": "The kind of thing `reference` names, worked out from the reference itself — you never send it. It tells you which group in `GET /watch/event-types` applies to this watch. Treat it as an open set rather than an enum you switch on exhaustively: more kinds land on this same endpoint over time.",
            "example": "order"
          },
          "supplier": {
            "type": [
              "string",
              "null"
            ],
            "description": "The carrier the watched reference belongs to, filled in from the order. Null on a watch that is not carrier-specific.",
            "example": "opticomm"
          },
          "eventTypes": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Which events this watch notifies on. Null — the default — means every event.",
            "example": null
          },
          "emails": {
            "type": "array",
            "description": "Where notifications are sent. Lowercased and de-duplicated on save.",
            "items": {
              "type": "string",
              "format": "email"
            },
            "example": [
              "noc@example.com"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "disabled"
            ],
            "description": "`disabled` is what removing a watch produces — the record is kept, and watching the same reference again re-enables it.",
            "example": "active"
          },
          "lastNotifiedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When this watch last caused an email to be sent."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the watch last changed, in UTC."
          }
        }
      },
      "EventTypeItem": {
        "type": "object",
        "description": "One event you can subscribe to. `GET /webhooks/event-types` and `GET /watch/event-types` both list items of this shape.",
        "required": [
          "value",
          "label",
          "referenceType"
        ],
        "properties": {
          "value": {
            "type": "string",
            "description": "The value to send: in a webhook's `events`, or in a watch's `eventTypes`.",
            "example": "outage.closed"
          },
          "label": {
            "type": "string",
            "description": "How this event is described to a reader, as the notification emails name it.",
            "example": "Outage Resolved"
          },
          "referenceType": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "order",
              "appointment",
              "service",
              "outage",
              null
            ],
            "description": "The kind of watched thing this event applies to, matching a watch's own `referenceType`. Null on the webhook list: a webhook is not about one kind of reference.",
            "example": "outage"
          }
        }
      },
      "WebhookEventType": {
        "type": "string",
        "description": "A subscribable webhook event type, or `*` for every event.\n\nDeclared in one place and referenced by both the subscription request and\nthe subscription you get back, so anything you can be told about is\nsomething you can subscribe to. (They drifted apart once: five order and\nservice events reached the response list while the request list still\nrejected them, which left a generated client unable to subscribe to\nevents the same spec said existed.)\n\nThe three `transit.blackhole.*` types are not available yet: IP transit is\nnot offered by API yet, so subscribing to one answers `422` and none is\nsent until it is. They are listed so a client built now knows them.\n\n`ping` is deliberately absent — it is sent only by\n`POST /webhooks/{webhookId}/test`, regardless of what the subscription\ncovers, so it is not something to subscribe to.\n",
        "enum": [
          "*",
          "ticket.created",
          "ticket.replied",
          "ticket.statusChanged",
          "ticket.csatSubmitted",
          "ticket.informationRequired",
          "voice.call.completed",
          "voice.voicemail.received",
          "voice.recording.ready",
          "trunk.down",
          "trunk.up",
          "voice.hold.placed",
          "voice.hold.released",
          "number.assigned",
          "number.unassigned",
          "number.released",
          "number.suspended",
          "number.reactivated",
          "ipnd.recordRejected",
          "trunk.planChangeScheduled",
          "trunk.planChangeCancelled",
          "trunk.planChanged",
          "bookedChange.applied",
          "bookedChange.cancelled",
          "bookedChange.failed",
          "bookedChange.rescheduled",
          "invoice.issued",
          "invoice.paid",
          "invoice.voided",
          "payment.received",
          "payment.succeeded",
          "payment.failed",
          "payment.reversed",
          "creditNote.issued",
          "dispute.raised",
          "dispute.decided",
          "invoice.overdue",
          "paymentMethod.expiring",
          "credit.thresholdReached",
          "credit.callsBlocked",
          "credit.callsRestored",
          "priceRise.noticed",
          "usage.thresholdReached",
          "usageAlert.triggered",
          "data.realm.approved",
          "data.realm.rejected",
          "data.radius.sessionRetrieved",
          "order.statusChanged",
          "order.delayed",
          "order.appointmentRequired",
          "order.ntdFull",
          "port.actionRequired",
          "service.provisioned",
          "service.suspended",
          "service.resumed",
          "service.disconnected",
          "service.ceaseScheduled",
          "diagnostic.completed",
          "serviceHealth.reportReady",
          "ontUpgrade.completed",
          "appointment.booked",
          "appointment.rescheduled",
          "appointment.cancelled",
          "outage.opened",
          "outage.updated",
          "outage.closed",
          "degradation.opened",
          "degradation.updated",
          "degradation.closed",
          "quote.completed",
          "quote.actionRequired",
          "quote.closed",
          "transit.blackhole.placed",
          "transit.blackhole.released",
          "transit.blackhole.expired",
          "endUser.spendThreshold",
          "callerId.statusChanged",
          "endUser.creditNote.issued",
          "endUser.dispute.raised",
          "endUser.dispute.decided",
          "sms.received",
          "sms.delivered",
          "sms.failed",
          "fax.received",
          "fax.sent",
          "fax.failed",
          "account.suspended",
          "account.reinstated",
          "endUser.created",
          "endUser.updated",
          "endUser.suspended",
          "endUser.reactivated",
          "webhook.endpointDisabled",
          "delegation.used",
          "export.ready",
          "export.failed"
        ]
      },
      "WebhookFilters": {
        "type": "object",
        "description": "Limits an endpoint to some services or end users. An event about a service is sent when its service is in `serviceIds` or its end user is in `endUserIds`. An event about no service or end user (an invoice, a ticket) is sent only when the endpoint names its type in `events`, not through `*`. Empty lists, or no filters, mean every event the endpoint takes.",
        "additionalProperties": false,
        "properties": {
          "serviceIds": {
            "type": "array",
            "maxItems": 100,
            "description": "Services by the id their events carry in `data.serviceId`: a data service's id, a trunk's `sipUsername`, a transit or colocation uuid.",
            "items": {
              "type": "string",
              "maxLength": 128
            },
            "example": [
              "AVC000123456789"
            ]
          },
          "endUserIds": {
            "type": "array",
            "maxItems": 100,
            "description": "End users by number.",
            "items": {
              "type": "string",
              "maxLength": 128
            },
            "example": [
              "500001"
            ]
          }
        }
      },
      "WebhookSubscription": {
        "type": "object",
        "description": "A registered webhook endpoint. The signing secret is returned once — at registration or rotation — and is never readable afterwards.",
        "required": [
          "id",
          "url",
          "events",
          "isActive"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The endpoint's id, as `/webhooks/{webhookId}` takes it. Opaque.",
            "example": "0192f0c4-5b7e-7c1a-9d3e-2f6a8b4c1d21"
          },
          "url": {
            "type": "string",
            "description": "Your HTTPS endpoint. Must resolve to a public address (port 443 or 8443).",
            "example": "https://example.com/hooks/checknetworks"
          },
          "events": {
            "type": "array",
            "description": "Subscribed event types, or `[\"*\"]` for all events.",
            "items": {
              "$ref": "#/components/schemas/WebhookEventType"
            }
          },
          "filters": {
            "$ref": "#/components/schemas/WebhookFilters"
          },
          "isActive": {
            "type": "boolean",
            "description": "Endpoints are disabled automatically after 20 consecutive dead deliveries (each delivery is 6 attempts over ~8.6h). While disabled, events are still recorded as `dead` deliveries with zero attempts rather than dropped. Re-enable with a PATCH once your endpoint is healthy, then replay dead deliveries to catch up."
          },
          "consecutiveFailures": {
            "type": "integer",
            "description": "Dead deliveries in a row; the endpoint is disabled automatically at 20. Resets to zero on a successful delivery or re-enable — the dead deliveries themselves remain in the delivery history."
          },
          "disabledAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "disabledReason": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "auto",
              "manual",
              null
            ],
            "description": "Why the endpoint is off: `auto` after 20 dead deliveries in a row, `manual` when you turned it off. Null while it is on."
          },
          "lastDeliveredAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When a delivery last succeeded, or null if none has."
          },
          "lastError": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the latest dead delivery failed. Cleared by the next successful delivery.",
            "example": "Endpoint answered HTTP 503."
          },
          "previousSecretExpiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "After a secret rotation, when the previous secret stops signing deliveries. Null when no rotation window is open."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the endpoint last changed, in UTC."
          }
        }
      },
      "sequence": {
        "type": "integer",
        "description": "A counter for the deliveries to this endpoint: each delivery queued for it takes the next number. A redelivery or a replay is a new delivery, so it takes a new, higher number, and an old event sent again sorts after newer ones. Do not order events by it: order them by `occurredAt`, which a redelivery keeps, and use `eventId` to drop repeats.",
        "example": 1042
      },
      "WebhookDelivery": {
        "type": "object",
        "description": "One attempted delivery of one event to one endpoint. Rows are written before\nthe delivery is attempted and are never removed, so the history survives a\nfailed endpoint — and the endpoint being deleted.\n",
        "required": [
          "id",
          "eventId",
          "eventType",
          "status",
          "attempts",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The delivery id. Use it to redeliver. Opaque."
          },
          "webhookId": {
            "type": "string",
            "format": "uuid",
            "description": "The endpoint it went to, as `GET /webhooks` names it."
          },
          "test": {
            "type": "boolean",
            "description": "`true` for a delivery sent by `POST /webhooks/{webhookId}/test`."
          },
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "The event's id, as sent in the `eventId` field of the delivered payload.\nA redelivery carries the SAME `eventId` as the attempt it replays, so\nhandlers that de-duplicate on it treat the replay as the same event.\n"
          },
          "eventType": {
            "type": "string",
            "example": "ticket.replied"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "delivered",
              "dead"
            ],
            "description": "`queued` is in flight, `delivered` was acknowledged with a 2xx, and\n`dead` exhausted its retries.\n"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "attempts": {
            "type": "integer",
            "description": "Delivery attempts made so far for this record."
          },
          "responseCode": {
            "type": [
              "integer",
              "null"
            ],
            "description": "HTTP status your endpoint returned on the last attempt, if it answered."
          },
          "lastError": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the last attempt failed — the transport or HTTP error we saw."
          },
          "payload": {
            "description": "The event body that was POSTed to your endpoint."
          },
          "lastAttemptAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "deliveredAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the delivery record last changed (an attempt), in UTC."
          }
        }
      },
      "EndUserAddress": {
        "type": "object",
        "description": "An Australian street address, as the End User form in the portal takes it.",
        "required": [
          "line1",
          "suburb",
          "state",
          "postcode"
        ],
        "properties": {
          "line1": {
            "type": "string",
            "maxLength": 255,
            "example": "12 Example Street"
          },
          "line2": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "line3": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "suburb": {
            "type": "string",
            "maxLength": 128,
            "example": "Brisbane City"
          },
          "state": {
            "type": "string",
            "enum": [
              "ACT",
              "NSW",
              "NT",
              "QLD",
              "SA",
              "TAS",
              "VIC",
              "WA"
            ],
            "example": "QLD"
          },
          "postcode": {
            "type": "string",
            "pattern": "^\\d{4}$",
            "example": "4000"
          }
        }
      },
      "EndUser": {
        "type": "object",
        "description": "One of your end users: a customer of yours who uses your services. Named\nby its number (`endUser`), which every other end-user call takes.\n\n**Family violence safety.** While an active safety record suppresses the\nend user's contact details, `contactsMasked` is true and the contacts and\nboth addresses are null, exactly as the portal masks them. Only\n`POST /end-users/{endUser}/contacts/reveal` returns them, on the\n`safety:read` scope, and every reveal is audited.\n",
        "required": [
          "endUser",
          "type",
          "name",
          "status",
          "contactsMasked",
          "invoiceDelivery",
          "usageNotificationMethod",
          "currency"
        ],
        "properties": {
          "endUser": {
            "type": "string",
            "description": "The end user's number. Every end-user call names the end user by it.",
            "example": "820412"
          },
          "type": {
            "type": "string",
            "enum": [
              "residential",
              "business"
            ]
          },
          "name": {
            "type": "string",
            "description": "The person's name, or the contact name for a business.",
            "example": "Jane Citizen"
          },
          "businessName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The legal business name. Set for a business end user only."
          },
          "tradingName": {
            "type": [
              "string",
              "null"
            ]
          },
          "abn": {
            "type": [
              "string",
              "null"
            ],
            "description": "The ABN, as 11 digits.",
            "example": "51824753556"
          },
          "acn": {
            "type": [
              "string",
              "null"
            ]
          },
          "externalRef": {
            "type": [
              "string",
              "null"
            ],
            "description": "Your own reference for the end user, such as its id in your CRM. Find an end user by it with `GET /end-users?externalRef=`.",
            "example": "CRM-10442"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "suspended",
              "archived"
            ],
            "description": "`suspended`: its voice services are cut off (a 000 call still goes\nthrough). `archived`: a former end user, put away; it can be restored.\n"
          },
          "suspendReason": {
            "type": [
              "string",
              "null"
            ],
            "description": "The reason given when it was suspended. Null unless `status` is `suspended`."
          },
          "lastVerifiedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When a one-time code sent to the end user last proved who was on the call (`POST /end-users/{endUser}/verification-codes`). Nothing requires it."
          },
          "contactsMasked": {
            "type": "boolean",
            "description": "True while a family violence safety record withholds the contacts and addresses below."
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "altContactName": {
            "type": [
              "string",
              "null"
            ],
            "description": "Another person to contact."
          },
          "altContactPhone": {
            "type": [
              "string",
              "null"
            ]
          },
          "billingEmail": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "description": "Where bills go, when not to `email`."
          },
          "serviceAddress": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/EndUserAddress"
              },
              {
                "type": "null"
              }
            ]
          },
          "billingSameAsService": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True when bills go to the service address. Null while the contacts are masked."
          },
          "billingAddress": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/EndUserAddress"
              },
              {
                "type": "null"
              }
            ],
            "description": "The billing address. Null when it is the service address."
          },
          "invoiceDelivery": {
            "type": "string",
            "enum": [
              "email",
              "post",
              "none"
            ]
          },
          "usageNotificationMethod": {
            "type": "string",
            "enum": [
              "email",
              "sms"
            ],
            "description": "How the end user is told about their data usage."
          },
          "paymentTermsDays": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Days to pay their bills. Null uses your default."
          },
          "invoiceFormat": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "summary",
              "detailed",
              null
            ],
            "description": "Summary or detailed bills. Null uses your default."
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ],
            "description": "The end user's own time zone: their bills are cut on it, and their\nportal shows times in it. Null is your zone. Change it with\n`PATCH /end-users/{endUser}`; a change applies from their next billing\nperiod.\n",
            "example": "Australia/Perth"
          },
          "creditLimit": {
            "type": [
              "string",
              "null"
            ],
            "description": "A credit limit for your own records, in dollars including GST. Nothing\nreads it: it stops no call and no service. Null is none.\n",
            "example": "500.00"
          },
          "spendLimit": {
            "type": [
              "string",
              "null"
            ],
            "description": "A monthly spend limit, in dollars including GST. The end user is\nemailed when the month's bill reaches 50, 85 and 100 per cent of it.\nNothing is stopped. Null is none.\n",
            "example": "150.00"
          },
          "currency": {
            "type": "string",
            "enum": [
              "AUD"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "description": "The free-text notes on the end user's details. Your notes history is `/end-users/{endUser}/notes`."
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "EndUserDetails": {
        "type": "object",
        "description": "The details of an end user that create and update share, as the End User\nform in the portal takes them. Send `null` to clear a field.\n",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255,
            "example": "Jane Citizen"
          },
          "businessName": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255,
            "description": "The legal business name. Required for a business end user; ignored for a residential one."
          },
          "tradingName": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255,
            "description": "Kept for a business end user only."
          },
          "abn": {
            "type": [
              "string",
              "null"
            ],
            "description": "An ABN, checked with the ATO check digit. Spaces are allowed. Kept for a business end user only.",
            "example": "51 824 753 556"
          },
          "acn": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{9}$",
            "description": "Kept for a business end user only."
          },
          "externalRef": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 64,
            "description": "Your own reference for the end user, such as its id in your CRM."
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "maxLength": 255
          },
          "phone": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 32
          },
          "altContactName": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "altContactPhone": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 32
          },
          "billingEmail": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "maxLength": 255
          },
          "invoiceDelivery": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "email",
              "post",
              "none",
              null
            ],
            "description": "How their bills are sent. On a create, left out or null takes your default."
          },
          "usageNotificationMethod": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "email",
              "sms",
              null
            ],
            "description": "How they are told about their data usage. On a create, left out or null is email."
          },
          "paymentTermsDays": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 90,
            "description": "Days to pay their bills. Null uses your default."
          },
          "invoiceFormat": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "summary",
              "detailed",
              null
            ],
            "description": "Null uses your default."
          },
          "creditLimit": {
            "type": [
              "string",
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 1000000,
            "description": "Dollars including GST, for your own records; nothing reads it. Null is none.",
            "example": "500.00"
          },
          "spendLimit": {
            "type": [
              "string",
              "number",
              "null"
            ],
            "minimum": 1,
            "maximum": 1000000,
            "description": "A monthly spend limit, in dollars including GST. The end user is\nemailed at 50, 85 and 100 per cent of it; nothing is stopped. Null is\nnone.\n",
            "example": "150.00"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 5000
          }
        }
      },
      "EndUserSettings": {
        "type": "object",
        "description": "An end user's own defaults for the calls to their lines, whether they get billing texts, and whether you bill them through the platform.",
        "required": [
          "blockInternationalInbound",
          "allowNzInbound",
          "billingSms",
          "isBilled"
        ],
        "properties": {
          "blockInternationalInbound": {
            "type": "boolean",
            "description": "Block calls from overseas numbers to their lines, by default."
          },
          "allowNzInbound": {
            "type": "boolean",
            "description": "While international calls are blocked, still let New Zealand (+64) callers through."
          },
          "billingSms": {
            "type": "boolean",
            "description": "Whether they get the billing texts you have switched on (payment\nreminders, final notices, receipts, failed automatic payments). False\nwhen they asked you to stop them; their billing emails still go.\n"
          },
          "isBilled": {
            "type": "boolean",
            "description": "Whether you bill them through the platform. False for an end user you\nbill some other way: they get no bill from it, and their services need\nno retail price. What we bill you does not change. Every end user\nstarts billed.\n"
          }
        }
      },
      "EndUserNote": {
        "type": "object",
        "description": "One of your own notes on an end user. The end user never sees it.",
        "required": [
          "id",
          "body",
          "pinned",
          "author",
          "authorType",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The note's public id."
          },
          "body": {
            "type": "string"
          },
          "pinned": {
            "type": "boolean"
          },
          "author": {
            "type": "string",
            "description": "Who wrote it. A note added through the API names the key, as \"<key name> (API key)\"."
          },
          "authorType": {
            "type": "string",
            "enum": [
              "user",
              "apiKey"
            ]
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "EndUserSafetyRecord": {
        "type": "object",
        "description": "A family violence safety record on an end user (F2025L00664). Legal\nobligations attach to this data: see the End users safety help page. While\none is active with `suppressContactDisclosure`, the end user's contacts are\nmasked on every other read. The record's own safe contacts (the safe\nnumber, email and postal address) are masked on every read of it, this one\nincluded: `safeContactNumber`, `safeContactEmail` and `safePostalAddress`\nare always null here, `safeContactsMasked` says whether any is recorded,\nand only `POST /end-users/{endUser}/safety-records/{recordId}/safe-contacts/reveal`\nreturns them.\n",
        "required": [
          "id",
          "status",
          "identifiedReason",
          "suppressContactDisclosure",
          "safeContactsMasked"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The record's public id."
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "closed"
            ]
          },
          "identifiedReason": {
            "type": "string",
            "enum": [
              "domestic_family_violence",
              "non_domestic_sexual_violence"
            ]
          },
          "agreedCommunicationMethod": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "phone",
              "sms",
              "email",
              "post",
              "online_chat",
              "webform",
              null
            ]
          },
          "agreedCommunicationTime": {
            "type": [
              "string",
              "null"
            ]
          },
          "suppressContactDisclosure": {
            "type": "boolean"
          },
          "safeContactsMasked": {
            "type": "boolean",
            "description": "Whether the record holds a safe number, safe email or safe postal address. They are masked on this read; the safe-contacts reveal returns them, audited."
          },
          "safeContactNumber": {
            "type": [
              "string",
              "null"
            ],
            "description": "Always null: masked. Read it with the safe-contacts reveal. Write it on the record's create or update; left out of an update, it is kept."
          },
          "safeContactEmail": {
            "type": [
              "string",
              "null"
            ],
            "description": "Always null: masked. Read it with the safe-contacts reveal. Write it on the record's create or update; left out of an update, it is kept."
          },
          "safePostalAddress": {
            "description": "Where their bills are posted under `safe_post`, never the end user's own address. Always null here: masked, as the safe number and email are. Read it with the safe-contacts reveal.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/EndUserAddress"
              },
              {
                "type": "null"
              }
            ]
          },
          "billDelivery": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "safe_email",
              "safe_post",
              "portal_only",
              "none",
              null
            ],
            "description": "How the end user wants their bills while the record is active: `safe_email` emails bills and billing notices to `safeContactEmail` only; `safe_post` sends none and alerts you to post them to `safePostalAddress`; `portal_only` sends none, and they read their bills in the portal; `none` sends no bills or billing notices. Null: bills follow `agreedCommunicationMethod`."
          },
          "billDeliveryNote": {
            "type": [
              "string",
              "null"
            ],
            "description": "Anything more about how they want their bills."
          },
          "billDeliveryRequest": {
            "type": [
              "string",
              "null"
            ],
            "deprecated": true,
            "description": "The same as `billDeliveryNote`. Deprecated: read `billDelivery` and `billDeliveryNote`."
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "identifiedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "identifiedBy": {
            "type": [
              "string",
              "null"
            ],
            "description": "The portal user who raised it; null when raised by API (the audit log names the key)."
          },
          "safetyConfirmedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "supportAdvisedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "supportAdvisedBy": {
            "type": [
              "string",
              "null"
            ]
          },
          "furtherSupportRequested": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "closedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "closedBy": {
            "type": [
              "string",
              "null"
            ]
          },
          "retentionExpiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Set on close; the earliest the record may be disposed of."
          }
        }
      },
      "EndUserSafetyRecordInput": {
        "type": "object",
        "description": "A safety record's own fields, with the portal's rules. On a change, a field left out stays as it is.",
        "properties": {
          "identifiedReason": {
            "type": "string",
            "enum": [
              "domestic_family_violence",
              "non_domestic_sexual_violence"
            ],
            "description": "Required when raising a record."
          },
          "agreedCommunicationMethod": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "phone",
              "sms",
              "email",
              "post",
              "online_chat",
              "webform",
              null
            ]
          },
          "agreedCommunicationTime": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 120
          },
          "suppressContactDisclosure": {
            "type": "boolean",
            "default": true
          },
          "safeContactNumber": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 40,
            "description": "Stored encrypted and masked on every read. On a change, left out keeps it and null clears it."
          },
          "safeContactEmail": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "maxLength": 255,
            "description": "Stored encrypted and masked on every read. On a change, left out keeps it and null clears it."
          },
          "safePostalAddress": {
            "description": "Where their bills are posted under `safe_post`. A PO Box is fine. Null clears it. `safe_post` with no safe postal address on the record is refused (422, on `safePostalAddress`).",
            "oneOf": [
              {
                "$ref": "#/components/schemas/EndUserAddress"
              },
              {
                "type": "null"
              }
            ]
          },
          "billDelivery": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "safe_email",
              "safe_post",
              "portal_only",
              "none",
              null
            ],
            "description": "How the end user wants their bills; see the record's `billDelivery`. `safe_post` needs a `safePostalAddress`."
          },
          "billDeliveryNote": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "billDeliveryRequest": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255,
            "deprecated": true,
            "description": "Sets `billDeliveryNote`. Deprecated: send `billDelivery` and `billDeliveryNote`; ignored when `billDeliveryNote` is sent."
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 2000
          }
        }
      },
      "EndUserLogin": {
        "type": "object",
        "description": "A login to the end user's own portal.",
        "required": [
          "id",
          "email",
          "role"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The login's public id."
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": "string"
          },
          "role": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "owner",
              "admin",
              "billing",
              "technical",
              null
            ]
          },
          "lastSignInAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "EndUserLoginInvite": {
        "type": "object",
        "description": "An invite to the end user's portal not yet accepted or revoked. One that ran out is listed with `expired` true, so you can resend it.",
        "required": [
          "id",
          "email",
          "role"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The invite's public id."
          },
          "email": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "enum": [
              "owner",
              "admin",
              "billing",
              "technical"
            ]
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "expired": {
            "type": "boolean"
          }
        }
      },
      "EndUserRepresentative": {
        "type": "object",
        "description": "Someone the end user has authorised to act for them (IGN017). Only an active one confers authority.",
        "required": [
          "id",
          "name",
          "kind",
          "authorities",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The representative's public id."
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "authorised_representative",
              "advocate",
              "power_of_attorney"
            ]
          },
          "authorities": {
            "type": "array",
            "description": "The areas they may act on. `full` covers every area and is then the only one listed.",
            "items": {
              "type": "string",
              "enum": [
                "full",
                "billing",
                "complaints",
                "hardship",
                "technical",
                "dfv"
              ]
            }
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "revoked"
            ]
          },
          "appointedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "revokedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "revocationReason": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "EndUserService": {
        "type": "object",
        "description": "A service an end user owns, or a number they hold.",
        "required": [
          "kind",
          "reference"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "dataService",
              "trunk",
              "number",
              "transitService",
              "vpnUser",
              "faxPlan",
              "hostedPbx",
              "other"
            ]
          },
          "reference": {
            "type": "string",
            "description": "The reference the service's own calls take: a data service's service\nreference, a trunk's SIP username, a number, an IP transit service's\nnumber, a fax plan's id, a hosted PBX's id. A closed hosted PBX is not\nlisted.\n",
            "example": "AVC000123456789"
          },
          "label": {
            "type": [
              "string",
              "null"
            ],
            "description": "A name that helps tell it apart, such as a data service's username or a number's label."
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "The service's own status, as its own calls show it."
          },
          "suspensionTakesEffect": {
            "$ref": "#/components/schemas/SuspensionTakesEffect",
            "description": "For a suspended data service, how soon the suspension takes effect, as on GET /data/services/{ref}. Null for any other service."
          },
          "assignmentId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The billed assignment the service carries, when it has one. End it with\n`DELETE /end-users/{endUser}/services/{assignmentId}`. Always null for a\nnumber.\n"
          },
          "product": {
            "type": [
              "string",
              "null"
            ],
            "description": "The product the assignment bills."
          },
          "startsOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "endsOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The last day the assignment is billed, once it has been ended."
          }
        }
      },
      "EndUserImport": {
        "type": "object",
        "description": "One end-user import, as the portal's Import page lists it. The counts are\nnull while it is `processing`. A `failed` import stopped part-way: its\ncounts are of the rows it wrote, and the rest of the `total` were not run.",
        "required": [
          "id",
          "status",
          "source",
          "filename",
          "total",
          "created",
          "skipped",
          "failed",
          "createdAt",
          "finishedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The import's id."
          },
          "status": {
            "type": "string",
            "enum": [
              "processing",
              "finished",
              "failed"
            ],
            "description": "`processing` on the queue, `finished`, or `failed` when its run\nstopped part-way or had not started an hour after it was queued\n(then nothing was written). Import the rows not run again: those already\nmade are skipped as duplicates."
          },
          "source": {
            "type": "string",
            "description": "Where it was sent from, `api` or the portal (`wholesale`).",
            "example": "api"
          },
          "filename": {
            "type": [
              "string",
              "null"
            ],
            "description": "The file's name, or null for rows sent as JSON."
          },
          "total": {
            "type": "integer",
            "description": "The rows read from the file."
          },
          "created": {
            "type": [
              "integer",
              "null"
            ],
            "description": "End users made."
          },
          "skipped": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Rows passed over as duplicates of an end user already there, or of a row earlier in the file."
          },
          "failed": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Rows not made because a check failed (a missing name, a business with no business name, a bad email, an invite with no email) or an unexpected error."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "finishedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "EndUserImportDetail": {
        "description": "One end-user import with each row's outcome, as the portal's import page shows it.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EndUserImport"
          },
          {
            "type": "object",
            "required": [
              "rows"
            ],
            "properties": {
              "rows": {
                "type": "array",
                "description": "Each row read, in file order. Empty while the import is `processing`.",
                "items": {
                  "type": "object",
                  "required": [
                    "rowNumber",
                    "outcome",
                    "endUser",
                    "name",
                    "email",
                    "reason"
                  ],
                  "properties": {
                    "rowNumber": {
                      "type": "integer",
                      "description": "The line in the file, or the row's place in `rows` counting from 1."
                    },
                    "outcome": {
                      "type": "string",
                      "enum": [
                        "created",
                        "skipped",
                        "failed"
                      ]
                    },
                    "endUser": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The end user made from this row, by number."
                    },
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The row's email. Null while a family violence safety record withholds the contacts of the end user made from it."
                    },
                    "reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why it was skipped or failed, or what went wrong after it was made (an invite that could not be sent)."
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "NotificationSettings": {
        "type": "object",
        "description": "Where automated mail goes, and the usage notices sent to your residential end users.",
        "required": [
          "notificationEmail",
          "fallbackEmail",
          "usageNotifications"
        ],
        "properties": {
          "notificationEmail": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "description": "The address automated mail goes to, such as a NOC alias. Null sends it to your primary or billing contact (`fallbackEmail`).",
            "example": "noc@example.com.au"
          },
          "fallbackEmail": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where mail goes while `notificationEmail` is null.",
            "example": "accounts@example.com.au"
          },
          "usageNotifications": {
            "type": "object",
            "required": [
              "enabled",
              "smsSender",
              "availableSenders"
            ],
            "properties": {
              "enabled": {
                "type": "boolean",
                "description": "Whether your residential end users are told at 50%, 85% and 100% of their data allowance. Off by default: they go out under your name, and SMS is billed to you."
              },
              "smsSender": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The approved sender the SMS go as; null sends email only.",
                "example": "ACME"
              },
              "availableSenders": {
                "type": "array",
                "description": "The approved senders you may send as.",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "PortalBranding": {
        "type": "object",
        "description": "The end-user portal's branding, as Portal Branding shows it in the\nportal. The same values theme the end-user portal and the emails your end\nusers are sent.\n",
        "required": [
          "displayName",
          "brandColor",
          "supportEmail",
          "supportPhone",
          "supportUrl",
          "supportHours",
          "afterHoursPhone",
          "ticketsEnabled",
          "emailLogoPosition",
          "logos"
        ],
        "properties": {
          "displayName": {
            "type": "string",
            "maxLength": 120,
            "description": "The brand name end users see. Empty until first set."
          },
          "brandColor": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^#[0-9A-Fa-f]{6}$",
            "description": "Filled under white text, so it must reach 4.5:1 contrast against\nwhite. Null uses the platform's colour.\n"
          },
          "supportEmail": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "supportPhone": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 40
          },
          "supportUrl": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "supportHours": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 120,
            "description": "Free text, such as \"Mon to Fri, 8am to 6pm\", in the portal footer."
          },
          "afterHoursPhone": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 40,
            "description": "A fault number for outside those hours, in the portal footer."
          },
          "ticketsEnabled": {
            "type": "boolean",
            "description": "Whether end users may raise tickets in the end-user portal."
          },
          "emailLogoPosition": {
            "type": "string",
            "enum": [
              "top",
              "signature"
            ],
            "description": "Where the logo sits in emails to end users."
          },
          "logos": {
            "type": "object",
            "required": [
              "light",
              "dark"
            ],
            "description": "Where to download each logo (with your token), or null when none is\nset.\n",
            "properties": {
              "light": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri",
                "description": "The main logo, also the logo on your end users' invoices."
              },
              "dark": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri",
                "description": "The logo shown in dark mode."
              }
            }
          }
        }
      },
      "PortalDomain": {
        "type": "object",
        "description": "The end-user portal's custom domain: the hostname claimed, the DNS records\nto publish for it, and where its verification stands.\n",
        "required": [
          "domain",
          "status",
          "live",
          "records",
          "checkedAt",
          "checkError",
          "verifiedAt",
          "expiresAt"
        ],
        "properties": {
          "domain": {
            "type": "string",
            "example": "portal.yourbrand.com.au"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "verified",
              "failed"
            ],
            "description": "`pending` until both records check out; `verified` once they have and\nthe portal answers on the domain; `failed` when the claim expired\nunverified (claim the domain again for a new TXT record).\n"
          },
          "live": {
            "type": "boolean",
            "description": "Whether the end-user portal is served on this domain now."
          },
          "records": {
            "type": "array",
            "description": "The records to publish at your DNS host.",
            "items": {
              "type": "object",
              "required": [
                "purpose",
                "type",
                "name",
                "value",
                "lastCheck"
              ],
              "properties": {
                "purpose": {
                  "type": "string",
                  "enum": [
                    "routing",
                    "ownership"
                  ]
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "CNAME",
                    "TXT"
                  ]
                },
                "name": {
                  "type": "string"
                },
                "value": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "lastCheck": {
                  "type": "string",
                  "enum": [
                    "passed",
                    "failed",
                    "not_checked"
                  ],
                  "description": "The record's result at the last verify."
                }
              }
            }
          },
          "checkedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the records were last checked."
          },
          "checkError": {
            "type": [
              "string",
              "null"
            ],
            "description": "What the last check found missing."
          },
          "verifiedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When an unverified claim stops holding the domain (seven days after\nit was made). Null once verified.\n"
          }
        }
      },
      "DfvSupportChannel": {
        "type": "object",
        "description": "A way for an affected person to reach you (s18). The statement needs at\nleast two different types, and one that reaches a person.\n",
        "required": [
          "id",
          "type",
          "label",
          "value",
          "connectsToIndividual",
          "supportsCallback",
          "hours"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The channel's public id."
          },
          "type": {
            "type": "string",
            "enum": [
              "phone_line",
              "webform",
              "online_chat",
              "in_person",
              "email"
            ]
          },
          "label": {
            "type": "string",
            "maxLength": 120
          },
          "value": {
            "type": "string",
            "maxLength": 255,
            "description": "The number, address or link."
          },
          "connectsToIndividual": {
            "type": "boolean",
            "description": "Reaches a person. Always false for a web form."
          },
          "supportsCallback": {
            "type": "boolean"
          },
          "hours": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 120
          }
        }
      },
      "DfvStatement": {
        "type": "object",
        "description": "Your own domestic and family violence statement (F2025L00664, ss16-18), shown\non your end-user portal once published, else ours. Approval by your most\nsenior executive and publishing are done in the portal, at `portalUrl`.\n",
        "required": [
          "safetyCommitment",
          "continuityCommitment",
          "nonPaymentCommitment",
          "contactInstructions",
          "supportOrganisations",
          "accessibilityNote",
          "interimNotice",
          "supportAvailableFrom",
          "channels",
          "approval",
          "publishedAt",
          "readyToPublish",
          "outstanding",
          "portalUrl"
        ],
        "properties": {
          "safetyCommitment": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 4000,
            "description": "s17(2)(a), your safety policies and procedures."
          },
          "continuityCommitment": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 4000,
            "description": "s17(2)(b), staying connected and reversing restrictions."
          },
          "nonPaymentCommitment": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 4000,
            "description": "s17(2)(c), non-payment and financial hardship assistance."
          },
          "contactInstructions": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 4000,
            "description": "s17(2)(d), how to contact you for assistance."
          },
          "supportOrganisations": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 4000,
            "description": "Your own wording, shown beside the six statutory support services."
          },
          "accessibilityNote": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 4000
          },
          "interimNotice": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 4000,
            "description": "Shown until `supportAvailableFrom`; changing it keeps approval."
          },
          "supportAvailableFrom": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "channels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DfvSupportChannel"
            }
          },
          "approval": {
            "type": [
              "object",
              "null"
            ],
            "description": "Null until approved, and again after a wording change.",
            "required": [
              "name",
              "title",
              "approvedAt"
            ],
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "title": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "approvedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            }
          },
          "publishedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "readyToPublish": {
            "type": "boolean",
            "description": "Approved, with nothing outstanding."
          },
          "outstanding": {
            "type": "array",
            "description": "What stands between the statement and publishing.",
            "items": {
              "type": "string"
            }
          },
          "portalUrl": {
            "type": "string",
            "format": "uri",
            "description": "The portal page where the statement is approved and published."
          }
        }
      },
      "ComplaintsProcess": {
        "type": "object",
        "description": "Your own complaints-handling process and network outage\ncomplaints-handling process (Consumer Complaints Handling Industry\nStandard 2018, s8(1)(f), s10A, s10B), shown on your end-user portal once\npublished, else ours. Approval by a named person and publishing are done\nin the portal, at `portalUrl`.\n",
        "required": [
          "processSummary",
          "outageProcessSummary",
          "contactPhone",
          "contactEmail",
          "contactUrl",
          "contactPostalAddress",
          "hours",
          "approval",
          "publishedAt",
          "readyToPublish",
          "outstanding",
          "portalUrl"
        ],
        "properties": {
          "processSummary": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 4000,
            "description": "s8(1)(f), how you handle complaints."
          },
          "outageProcessSummary": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 4000,
            "description": "s10B, how you handle complaints about a network outage."
          },
          "contactPhone": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 60
          },
          "contactEmail": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "contactUrl": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "contactPostalAddress": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "hours": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 120
          },
          "approval": {
            "type": [
              "object",
              "null"
            ],
            "description": "Null until approved, and again after a summary change.",
            "required": [
              "name",
              "title",
              "approvedAt"
            ],
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "title": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "approvedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            }
          },
          "publishedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "readyToPublish": {
            "type": "boolean",
            "description": "Approved, with nothing outstanding."
          },
          "outstanding": {
            "type": "array",
            "description": "What stands between the process and publishing.",
            "items": {
              "type": "string"
            }
          },
          "portalUrl": {
            "type": "string",
            "format": "uri",
            "description": "The portal page where the process is approved and published."
          }
        }
      },
      "CreditAlertRecipient": {
        "type": "object",
        "description": "One person who receives credit warnings, by email or by SMS.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The recipient's public id, for `DELETE /account/credit-alerts/recipients/{recipientId}`."
          },
          "type": {
            "type": "string",
            "enum": [
              "email",
              "mobile"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "mobile": {
            "type": [
              "string",
              "null"
            ],
            "description": "An Australian mobile, as stored."
          }
        }
      },
      "CreditAlertSettings": {
        "type": "object",
        "description": "Your credit warning settings, as the portal's Credit Alerts page holds them.",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "thresholds": {
            "type": "array",
            "description": "The percentages of your credit limit a warning is sent at.",
            "items": {
              "type": "integer"
            }
          },
          "availableThresholds": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "example": [
              80,
              90,
              95,
              100
            ]
          },
          "channels": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "email",
                "sms"
              ]
            }
          },
          "recipients": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreditAlertRecipient"
            }
          },
          "fallbackEmail": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "description": "Where warnings go while there are no recipients, your billing contact."
          }
        }
      },
      "InvoiceDispute": {
        "type": "object",
        "description": "A dispute you raised on one of our invoices, and where it is up to.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The dispute's public id."
          },
          "invoiceId": {
            "type": "string",
            "description": "The invoice's `id` (a ULID), as `GET /account/invoices` gives it."
          },
          "invoiceNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "lineId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The line disputed, by its public id as the invoice's `lineItems[].id`, or null for the invoice as a whole."
          },
          "lineDescription": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "description": "Where the dispute is up to, as the portal shows it."
          },
          "amount": {
            "type": "string",
            "description": "The amount disputed, with GST.",
            "example": "45.00"
          },
          "currency": {
            "type": "string",
            "example": "AUD"
          },
          "reason": {
            "type": "string"
          },
          "ticketRef": {
            "type": [
              "string",
              "null"
            ],
            "description": "The support ticket the dispute opened."
          },
          "creditNoteId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The credit note it was resolved with, if any."
          },
          "creditNoteNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "resolutionNotes": {
            "type": [
              "string",
              "null"
            ]
          },
          "raisedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "resolvedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "InvoiceGroup": {
        "type": "object",
        "description": "A named section of an invoice: a site, a department or a cost centre. The account's own groups section our invoice to you; an end user's section the invoices you send that end user. Changes apply from the next invoice; an issued invoice keeps the groups as they were.",
        "required": [
          "id",
          "name",
          "serviceCount"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The group's public id.",
            "example": "8d3f1a62-4c9e-4b07-a2d5-6e1b9c7f3a48"
          },
          "name": {
            "type": "string",
            "description": "Unique among the owner's groups, ignoring case. At most 100 characters.",
            "example": "Brisbane office"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The billing description printed under the group's heading.",
            "example": "Level 3, 100 Eagle St"
          },
          "poNumber": {
            "type": [
              "string",
              "null"
            ],
            "description": "The purchase order number printed with the group, unless a service sets its own.",
            "example": "PO-4471"
          },
          "costCentre": {
            "type": [
              "string",
              "null"
            ],
            "description": "The cost centre printed with the group, unless a service sets its own.",
            "example": "CC-210"
          },
          "serviceCount": {
            "type": "integer",
            "description": "How many services are in the group.",
            "example": 3
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "InvoiceGroupInput": {
        "type": "object",
        "description": "A group's fields. On create, `name` is required; on update, only the fields sent change, and a blank or null description, PO or cost centre clears it.",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100,
            "example": "Brisbane office"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255,
            "example": "Level 3, 100 Eagle St"
          },
          "poNumber": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 64,
            "example": "PO-4471"
          },
          "costCentre": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 64,
            "example": "CC-210"
          }
        }
      },
      "InvoiceService": {
        "type": "object",
        "description": "A service's place on one owner's invoice: its invoice group (at most one) and its own billing label, PO number and cost centre, which override the group's. The service is named as invoice lines name it.",
        "properties": {
          "serviceType": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "data_service",
              "trunk",
              "fax_plan",
              "transit_service",
              "vpn_user",
              null
            ],
            "example": "data_service"
          },
          "serviceRef": {
            "type": [
              "string",
              "null"
            ],
            "example": "AVC000123456789"
          },
          "endUser": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number of the end user the service is set on, if any.",
            "example": "100245"
          },
          "product": {
            "type": [
              "string",
              "null"
            ],
            "example": "nbn 100/20"
          },
          "invoiceGroupId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The group the service is in, by its public id. Null for none, which prints under Other.",
            "example": "8d3f1a62-4c9e-4b07-a2d5-6e1b9c7f3a48"
          },
          "invoiceGroup": {
            "type": [
              "string",
              "null"
            ],
            "example": "Brisbane office"
          },
          "invoiceLabel": {
            "type": [
              "string",
              "null"
            ],
            "description": "The service's own billing label, printed with its lines.",
            "example": "Reception"
          },
          "poNumber": {
            "type": [
              "string",
              "null"
            ],
            "description": "The service's own PO number. Null uses its group's.",
            "example": null
          },
          "costCentre": {
            "type": [
              "string",
              "null"
            ],
            "description": "The service's own cost centre. Null uses its group's.",
            "example": "CC-305"
          }
        }
      },
      "PartnerCommissionRun": {
        "type": "object",
        "description": "One month's commission for one of your partners. Figures are stored without GST; each carries its GST and the figure with GST. `gstShown`, beside the results, says which the portal shows.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The run's public id, for `GET /partners/commission-runs/{runId}`."
          },
          "partnerId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The partner's user id, as on GET /account/users."
          },
          "partnerName": {
            "type": [
              "string",
              "null"
            ]
          },
          "month": {
            "type": [
              "string",
              "null"
            ],
            "example": "2026-10"
          },
          "periodStart": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "periodEnd": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "finalised",
              "paid"
            ]
          },
          "basis": {
            "type": [
              "string",
              "null"
            ],
            "description": "What the rate was applied to."
          },
          "revenueExGst": {
            "type": "string"
          },
          "revenueGst": {
            "type": "string"
          },
          "revenueIncGst": {
            "type": "string"
          },
          "commissionExGst": {
            "type": "string"
          },
          "commissionGst": {
            "type": "string"
          },
          "commissionIncGst": {
            "type": "string"
          },
          "clawbackExGst": {
            "type": "string",
            "description": "Clawbacks taken off this run."
          },
          "clawbackGst": {
            "type": "string"
          },
          "clawbackIncGst": {
            "type": "string"
          },
          "payableExGst": {
            "type": "string",
            "description": "Commission less clawbacks, what the partner is paid."
          },
          "payableGst": {
            "type": "string"
          },
          "payableIncGst": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "example": "AUD"
          },
          "finalisedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "paidOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "paidReference": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "PartnerCommissionClawback": {
        "type": "object",
        "description": "Commission taken back because revenue it was paid on was reversed: a credit note, a write-off or a dishonoured payment. It comes off the partner's next runs until `remaining` is zero.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The clawback's public id."
          },
          "partnerId": {
            "type": [
              "string",
              "null"
            ]
          },
          "partnerName": {
            "type": [
              "string",
              "null"
            ]
          },
          "reason": {
            "type": "string"
          },
          "invoiceNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "sourceRunId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The run that paid the commission now taken back, by its public id."
          },
          "sourceMonth": {
            "type": [
              "string",
              "null"
            ],
            "example": "2026-08"
          },
          "ratePercent": {
            "type": "string"
          },
          "clawbackExGst": {
            "type": "string"
          },
          "clawbackGst": {
            "type": "string"
          },
          "clawbackIncGst": {
            "type": "string"
          },
          "remainingExGst": {
            "type": "string",
            "description": "What is still to come off."
          },
          "remainingGst": {
            "type": "string"
          },
          "remainingIncGst": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "occurredAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "RetailInvoice": {
        "type": "object",
        "description": "An invoice you issued to one of your end users. Never one of the invoices Check Networks issues to you: those are on /account/invoices. Money is a decimal dollar string, each amount as ex-GST, GST and inc-GST.",
        "required": [
          "id",
          "type",
          "invoiceNumber",
          "endUser",
          "status",
          "totalExGst",
          "totalGst",
          "totalIncGst",
          "amountPaid",
          "amountDue",
          "currency"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "01jd3z6r9k2m4n8p0q5s7t1v3w"
          },
          "type": {
            "type": "string",
            "enum": [
              "retail_invoice"
            ]
          },
          "invoiceNumber": {
            "type": "string",
            "example": "R-000412"
          },
          "endUser": {
            "type": "string",
            "description": "The end user's number.",
            "example": "482113"
          },
          "endUserName": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "unpaid",
              "overdue",
              "paid",
              "void",
              "held"
            ],
            "description": "`held` only on a final invoice that answered held for approval; the lists never carry a held invoice (see /end-users/invoice-approvals)."
          },
          "final": {
            "type": "boolean",
            "description": "True on an end user's final invoice."
          },
          "periodStart": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "periodEnd": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "issuedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "dueDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "paidAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "totalExGst": {
            "type": "string",
            "example": "45.41"
          },
          "totalGst": {
            "type": "string",
            "example": "4.54"
          },
          "totalIncGst": {
            "type": "string",
            "example": "49.95"
          },
          "amountPaid": {
            "type": "string",
            "description": "What has been paid against this invoice, inc. GST.",
            "example": "0.00"
          },
          "amountDue": {
            "type": "string",
            "description": "What is still owed on it, inc. GST.",
            "example": "49.95"
          },
          "currency": {
            "type": "string",
            "example": "AUD"
          },
          "remindersPausedUntil": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "While payment reminders on this invoice are paused, the day they start again."
          },
          "remindersPauseReason": {
            "type": [
              "string",
              "null"
            ],
            "description": "The reason given for the pause. On the single invoice only."
          },
          "lines": {
            "type": "array",
            "description": "On the single invoice only.",
            "items": {
              "type": "object",
              "properties": {
                "description": {
                  "type": "string"
                },
                "serviceType": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "quantity": {
                  "type": [
                    "number",
                    "string"
                  ]
                },
                "unitPriceExGst": {
                  "type": "string",
                  "description": "Up to 5 decimals.",
                  "example": "45.41"
                },
                "amountExGst": {
                  "type": "string"
                },
                "amountGst": {
                  "type": "string"
                },
                "amountIncGst": {
                  "type": "string"
                },
                "servicePeriodStart": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date"
                },
                "servicePeriodEnd": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date"
                }
              }
            }
          }
        }
      },
      "RetailPayment": {
        "type": "object",
        "description": "A payment applied to an end-user invoice. Money is a decimal dollar string.",
        "required": [
          "id",
          "type",
          "method",
          "status",
          "amount",
          "appliedToInvoice",
          "currency"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "retail_payment"
            ]
          },
          "method": {
            "type": "string",
            "description": "`recorded` for one you recorded; otherwise the gateway that took it.",
            "example": "recorded"
          },
          "status": {
            "type": "string",
            "enum": [
              "applied",
              "reversed"
            ]
          },
          "amount": {
            "type": "string",
            "description": "The whole payment, inc. GST.",
            "example": "49.95"
          },
          "appliedToInvoice": {
            "type": "string",
            "description": "The part of it applied to this invoice. A payment can cover several invoices, oldest first.",
            "example": "49.95"
          },
          "currency": {
            "type": "string",
            "example": "AUD"
          },
          "reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "paidOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The day it was paid, on your account's time zone."
          }
        }
      },
      "RetailCreditNote": {
        "type": "object",
        "description": "A credit note you issued to one of your end users, the only correction to one of their invoices. Money is a decimal dollar string.",
        "required": [
          "id",
          "type",
          "creditNoteNumber",
          "endUser",
          "status",
          "totalExGst",
          "totalGst",
          "totalIncGst",
          "currency"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "01jd3z8b2c4d6f8g0h2j4k6m8n"
          },
          "type": {
            "type": "string",
            "enum": [
              "retail_credit_note"
            ]
          },
          "creditNoteNumber": {
            "type": "string",
            "example": "RCN-000031"
          },
          "endUser": {
            "type": "string",
            "example": "482113"
          },
          "status": {
            "type": "string",
            "enum": [
              "issued"
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "invoiceId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The end-user invoice it corrects."
          },
          "invoiceNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "issuedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "totalExGst": {
            "type": "string"
          },
          "totalGst": {
            "type": "string"
          },
          "totalIncGst": {
            "type": "string",
            "example": "10.00"
          },
          "currency": {
            "type": "string",
            "example": "AUD"
          },
          "lines": {
            "type": "array",
            "description": "On the single credit note only.",
            "items": {
              "type": "object",
              "properties": {
                "description": {
                  "type": "string"
                },
                "quantity": {
                  "type": [
                    "number",
                    "string"
                  ]
                },
                "amountExGst": {
                  "type": "string"
                },
                "amountGst": {
                  "type": "string"
                },
                "amountIncGst": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "EndUserLedgerEntry": {
        "type": "object",
        "description": "One transaction on an end user's account. Money is a decimal dollar string, inc. GST unless named otherwise.",
        "required": [
          "id",
          "date",
          "type",
          "direction",
          "debit",
          "credit",
          "balance"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The entry's public id."
          },
          "date": {
            "type": "string",
            "format": "date",
            "description": "On your calendar."
          },
          "type": {
            "type": "string",
            "enum": [
              "invoice",
              "invoice_void",
              "payment",
              "payment_reversal",
              "credit_note",
              "adjustment",
              "opening_balance"
            ]
          },
          "reference": {
            "type": [
              "string",
              "null"
            ],
            "description": "The document number, where there is one."
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "direction": {
            "type": "string",
            "enum": [
              "debit",
              "credit"
            ],
            "description": "`debit` adds to what they owe; `credit` takes off it."
          },
          "amountExGst": {
            "type": "string"
          },
          "amountGst": {
            "type": "string"
          },
          "amountIncGst": {
            "type": "string"
          },
          "debit": {
            "type": "string",
            "example": "49.95"
          },
          "credit": {
            "type": "string",
            "example": "0.00"
          },
          "balance": {
            "type": "string",
            "description": "The running balance after this transaction."
          },
          "paidOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "On an invoice, the day it was paid in full."
          },
          "document": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "retail_invoice",
                  "retail_credit_note"
                ]
              },
              "id": {
                "type": "string"
              },
              "url": {
                "type": "string",
                "description": "Its path on this API.",
                "example": "/end-users/invoices/01jd3z6r9k2m4n8p0q5s7t1v3w"
              }
            }
          }
        }
      },
      "HardshipCase": {
        "type": "object",
        "description": "An end user's financial hardship case: an arrangement in force, or an application under assessment. Money is a decimal dollar string.",
        "required": [
          "id",
          "type",
          "endUser",
          "status",
          "options"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The case's public id, as `/end-users/{endUser}/hardship/{caseId}` takes it."
          },
          "type": {
            "type": "string",
            "enum": [
              "hardship_case"
            ]
          },
          "endUser": {
            "type": "string"
          },
          "endUserName": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "proposed",
              "active",
              "completed",
              "cancelled",
              "declined"
            ],
            "description": "`proposed` is an application under assessment; `active` an arrangement in force."
          },
          "options": {
            "type": "array",
            "description": "The assistance agreed, from the options you offer (/retail/hardship-options).",
            "items": {
              "type": "string"
            }
          },
          "pauseAutopay": {
            "type": "boolean",
            "description": "Whether automatic payments are paused while it is open."
          },
          "openedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "startsOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "reviewOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "endsOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "assessmentDueAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "The deadline to assess an application, in business days on your calendar."
          },
          "assessedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "closedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "instalmentAmount": {
            "type": [
              "string",
              "null"
            ],
            "description": "On a payment plan, each instalment."
          },
          "instalmentCount": {
            "type": [
              "integer",
              "null"
            ]
          },
          "reliefAmount": {
            "type": [
              "string",
              "null"
            ],
            "description": "Fee or debt relief agreed."
          },
          "currency": {
            "type": "string",
            "example": "AUD"
          }
        }
      },
      "EndUserDispute": {
        "type": "object",
        "description": "An end user's dispute of a charge on an invoice you issued them. While it is open the disputed amount is not collected.",
        "required": [
          "id",
          "type",
          "endUser",
          "invoiceId",
          "status",
          "amountDisputed",
          "resolution"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The dispute's public id, as `/end-users/disputes/{id}` takes it."
          },
          "type": {
            "type": "string",
            "enum": [
              "invoice_dispute"
            ]
          },
          "endUser": {
            "type": "string"
          },
          "endUserName": {
            "type": [
              "string",
              "null"
            ]
          },
          "invoiceId": {
            "type": "string"
          },
          "invoiceNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "invoiceLineId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The line disputed, by its public id, or null for the bill as a whole."
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "under_review",
              "resolved_credited",
              "resolved_no_change",
              "rejected"
            ]
          },
          "amountDisputed": {
            "type": "string",
            "example": "12.50"
          },
          "currency": {
            "type": "string",
            "example": "AUD"
          },
          "raisedBy": {
            "type": [
              "string",
              "null"
            ],
            "description": "Who raised it, by kind (for example the end user's own portal login)."
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "description": "What the end user said."
          },
          "raisedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "resolution": {
            "type": "object",
            "properties": {
              "inProgress": {
                "type": "boolean",
                "description": "A decision is queued and has neither landed nor failed."
              },
              "requested": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The last decision asked for."
              },
              "requestedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "error": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Why the last decision could not be completed. Retry sends it again."
              },
              "notes": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "resolvedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "creditNoteId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "On a credited dispute, the credit note (/end-users/credit-notes/{id})."
              }
            }
          }
        }
      },
      "RetailPriceBookItem": {
        "type": "object",
        "description": "One product in your retail price book: what your end users are charged for\nit. Prices are held ex-GST; the GST and the price with GST are worked out\nunder your own tax settings and the product's GST treatment.",
        "required": [
          "id",
          "productId",
          "product",
          "sku",
          "priceExGst",
          "priceGst",
          "priceIncGst",
          "setupFeeExGst",
          "setupFeeGst",
          "setupFeeIncGst",
          "currency",
          "effectiveFrom",
          "planId"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The price's public id, used to change or remove it.",
            "example": "9c4e7b21-3a5f-4d18-b6e2-0f8a1c5d7e94"
          },
          "productId": {
            "type": "string",
            "format": "uuid",
            "description": "The product's public id.",
            "example": "6f1c2a9e-4b7d-4e2a-9c1f-2d8b5e7a3c10"
          },
          "product": {
            "type": [
              "string",
              "null"
            ],
            "description": "The product's name.",
            "example": "nbn 100/20 Home"
          },
          "sku": {
            "type": [
              "string",
              "null"
            ],
            "example": "NBN-100-20"
          },
          "priceExGst": {
            "type": "string",
            "description": "The price each period (a month, or a year for an annual product), ex-GST.",
            "example": "79.00"
          },
          "priceGst": {
            "type": "string",
            "example": "7.90"
          },
          "priceIncGst": {
            "type": "string",
            "example": "86.90"
          },
          "setupFeeExGst": {
            "type": [
              "string",
              "null"
            ],
            "description": "The setup fee, ex-GST. Null when none is set, so the setup fee falls\nback to your default markup on ours; \"0.00\" is a free connection.",
            "example": "99.00"
          },
          "setupFeeGst": {
            "type": [
              "string",
              "null"
            ],
            "example": "9.90"
          },
          "setupFeeIncGst": {
            "type": [
              "string",
              "null"
            ],
            "example": "108.90"
          },
          "currency": {
            "type": "string",
            "example": "AUD"
          },
          "effectiveFrom": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The day the price applies from. Every end user on the product moves to it then.",
            "example": "2026-12-01"
          },
          "planId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The product's default call plan, one of your own published plans. It\nprices calls for end users whose service has no plan of its own. Null\nfor none.",
            "example": null
          }
        }
      },
      "RetailPlan": {
        "type": "object",
        "description": "One of your own call plans for your end users. A plan is versioned: published versions never change, and every edit goes to the plan's one draft, which is opened from the latest version on the first edit. A published version prices calls from its `effectiveFrom` date.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The plan's public ID.",
            "example": "1d6f3b84-7e2a-4c91-a5d0-6b9e2f4c8a17"
          },
          "code": {
            "type": "string",
            "description": "The plan's code, unique across all plans.",
            "example": "RETAIL-830100-MOB"
          },
          "name": {
            "type": "string",
            "example": "Mobile Benefits"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": "string",
            "example": "AUD"
          },
          "archived": {
            "type": "boolean",
            "description": "An archived plan cannot be given to another service. Services already on it keep being rated by it."
          },
          "workingVersion": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The version an edit starts from: the draft, else the version in effect, else the latest. Null for a plan with no version yet.",
            "example": 2
          },
          "effectiveVersion": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The published version that prices calls today, or null.",
            "example": 1
          },
          "draftVersion": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The open draft, or null when there is none.",
            "example": 2
          },
          "assignedServices": {
            "type": "integer",
            "description": "How many of your end users' services the plan is pinned to.",
            "example": 12
          },
          "versions": {
            "type": "array",
            "description": "Every version, oldest first.",
            "items": {
              "type": "object",
              "properties": {
                "versionNo": {
                  "type": "integer",
                  "example": 1
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "draft",
                    "published",
                    "superseded"
                  ],
                  "description": "`superseded` is a published version a later one has replaced from its effective date. It still prices calls made before then."
                },
                "effectiveFrom": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date",
                  "description": "The date the version prices calls from. Null on a draft."
                },
                "publishedAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "destinationCount": {
                  "type": "integer",
                  "example": 312
                },
                "notes": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Where the version came from, such as the card it was copied from.",
                  "example": "Generated from WS_BASE v3."
                }
              }
            }
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "RetailPlanDestination": {
        "type": "object",
        "description": "One destination on a call plan version: the calls to numbers starting with `prefix` (the longest matching prefix wins). Each rate is shown ex-GST, its GST, and with GST, as your end user's invoice will bill it under your own tax settings. Rates are dollar amounts to up to 5 decimal places.",
        "properties": {
          "name": {
            "type": "string",
            "example": "Australia Mobile"
          },
          "prefix": {
            "type": "string",
            "description": "The number prefix, in E.164 digits without the `+`. It names the destination on every version.",
            "example": "614"
          },
          "perMinuteExGst": {
            "type": "string",
            "description": "The rate per minute, ex-GST.",
            "example": "0.03"
          },
          "perMinuteGst": {
            "type": "string",
            "example": "0.003"
          },
          "perMinuteIncGst": {
            "type": "string",
            "example": "0.033"
          },
          "connectionFeeExGst": {
            "type": "string",
            "description": "The charge for each answered call, ex-GST.",
            "example": "0.075"
          },
          "connectionFeeGst": {
            "type": "string",
            "example": "0.0075"
          },
          "connectionFeeIncGst": {
            "type": "string",
            "example": "0.0825"
          },
          "minimumChargeExGst": {
            "type": "string",
            "description": "The least an answered call costs, ex-GST.",
            "example": "0.00"
          },
          "minimumChargeGst": {
            "type": "string",
            "example": "0.00"
          },
          "minimumChargeIncGst": {
            "type": "string",
            "example": "0.00"
          },
          "currency": {
            "type": "string",
            "example": "AUD"
          },
          "firstIncrementSeconds": {
            "type": "integer",
            "description": "The first billing increment, in seconds.",
            "example": 60
          },
          "subsequentIncrementSeconds": {
            "type": "integer",
            "description": "Each billing increment after the first, in seconds.",
            "example": 60
          }
        }
      },
      "RetailPriceSourced": {
        "type": "object",
        "description": "The price that will bill today, ex-GST with its GST, and where it comes\nfrom: `service_price` (this service's own price), `retail_book` (your\nprice book), `default_markup` (your markup on what we charge you) or\n`unpriced` (nothing prices it: it bills nothing and holds the end user's\ninvoice for you to approve).",
        "required": [
          "source",
          "priceExGst",
          "priceGst",
          "priceIncGst"
        ],
        "properties": {
          "source": {
            "type": "string",
            "enum": [
              "service_price",
              "retail_book",
              "default_markup",
              "unpriced"
            ]
          },
          "priceExGst": {
            "type": "string",
            "example": "45.00"
          },
          "priceGst": {
            "type": "string",
            "example": "4.50"
          },
          "priceIncGst": {
            "type": "string",
            "example": "49.50"
          }
        }
      },
      "EndUserServiceBilling": {
        "type": "object",
        "description": "How one service you have given an end user bills. Its own price and setup\nfee, when set, win over your price book; null means the book applies.\nPrices are ex-GST, with the GST worked out under your tax settings.",
        "required": [
          "assignmentId",
          "product",
          "sku",
          "planId",
          "priceExGst",
          "priceGst",
          "priceIncGst",
          "setupFeeExGst",
          "setupFeeGst",
          "setupFeeIncGst",
          "notBilled",
          "endsOn",
          "currency",
          "billsAt",
          "setupBillsAt"
        ],
        "properties": {
          "assignmentId": {
            "type": "string",
            "format": "uuid",
            "description": "The service's public id.",
            "example": "4b8e2d17-6c3f-4a90-9d5e-1f7a3c6b2e08"
          },
          "product": {
            "type": [
              "string",
              "null"
            ],
            "example": "SIP Trunk"
          },
          "sku": {
            "type": [
              "string",
              "null"
            ],
            "example": "SIP_TRUNK"
          },
          "planId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The call plan pinned to this service, one of your own, by its public id. Null uses the product's default plan.",
            "example": "1d6f3b84-7e2a-4c91-a5d0-6b9e2f4c8a17"
          },
          "priceExGst": {
            "type": [
              "string",
              "null"
            ],
            "description": "This service's own price each period, ex-GST. Null when the price book applies.",
            "example": "45.00"
          },
          "priceGst": {
            "type": [
              "string",
              "null"
            ],
            "example": "4.50"
          },
          "priceIncGst": {
            "type": [
              "string",
              "null"
            ],
            "example": "49.50"
          },
          "setupFeeExGst": {
            "type": [
              "string",
              "null"
            ],
            "description": "This service's own setup fee, ex-GST. Null when the price book applies; \"0.00\" is free.",
            "example": null
          },
          "setupFeeGst": {
            "type": [
              "string",
              "null"
            ],
            "example": null
          },
          "setupFeeIncGst": {
            "type": [
              "string",
              "null"
            ],
            "example": null
          },
          "notBilled": {
            "type": "boolean",
            "description": "True when the whole service, its fees and its usage, is left off the\nend user's invoices. Our invoice to you is not changed."
          },
          "endsOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The last day the service is billed to the end user, once ended."
          },
          "currency": {
            "type": "string",
            "example": "AUD"
          },
          "billsAt": {
            "$ref": "#/components/schemas/RetailPriceSourced"
          },
          "setupBillsAt": {
            "$ref": "#/components/schemas/RetailPriceSourced"
          }
        }
      },
      "EndUserCharge": {
        "type": "object",
        "description": "One of your own charges on an end user's bill. The amount is ex-GST;\nGST is added on the invoice.",
        "required": [
          "id",
          "kind",
          "description",
          "priceExGst",
          "priceGst",
          "priceIncGst",
          "currency",
          "startsOn",
          "endsOn",
          "billFrom",
          "invoiced",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The charge's public id, for `/end-users/{endUser}/charges/{chargeId}`.",
            "example": "5b8e2c71-9d4a-4f36-8e0b-1a7c3d9f6e25"
          },
          "kind": {
            "type": "string",
            "enum": [
              "recurring",
              "once_off"
            ],
            "description": "Recurring bills each month in advance; once-off bills once, on the next invoice."
          },
          "description": {
            "type": "string",
            "example": "Managed Wi-Fi support"
          },
          "priceExGst": {
            "type": "string",
            "description": "The amount each month (recurring) or once, ex-GST.",
            "example": "25.00"
          },
          "priceGst": {
            "type": "string",
            "example": "2.50"
          },
          "priceIncGst": {
            "type": "string",
            "example": "27.50"
          },
          "currency": {
            "type": "string",
            "example": "AUD"
          },
          "startsOn": {
            "type": "string",
            "format": "date",
            "description": "The start date (recurring) or the date of the charge (once-off)."
          },
          "endsOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The last day a recurring charge bills. Null for no end, and for a once-off charge."
          },
          "billFrom": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The first day a recurring charge bills from. Null for a once-off charge."
          },
          "invoiced": {
            "type": "boolean",
            "description": "True once a held or issued invoice carries it. A once-off charge can no\nlonger change or be removed then; a recurring one can change only its\ndescription, amount (for months not yet charged) and end date, and is\nended rather than removed."
          },
          "status": {
            "type": "string",
            "enum": [
              "Active",
              "Scheduled",
              "Ended",
              "Invoiced",
              "Not Yet Invoiced"
            ]
          }
        }
      },
      "RetailInvoiceSettings": {
        "type": "object",
        "description": "The settings printed on every invoice to your end users, as Retail Settings sets them in the portal. The logo is set under the portal's branding and domain settings, not here.",
        "properties": {
          "displayName": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255,
            "description": "The business name your end-user invoices are issued by. Null for your account's name.",
            "example": "Brandy Telecom"
          },
          "abn": {
            "type": [
              "string",
              "null"
            ],
            "description": "Your ABN, printed on each tax invoice: 11 digits, which must pass the ATO check digit. Spaces are accepted on a write and stored as bare digits.",
            "example": "51824753556"
          },
          "defaultTermsDays": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 90,
            "description": "Days to pay for an end user with no terms of its own. Null for 14 days.",
            "example": 30
          },
          "defaultInvoiceDelivery": {
            "type": "string",
            "enum": [
              "email",
              "post",
              "none"
            ],
            "description": "The invoice delivery a new end user starts with.",
            "example": "email"
          },
          "invoiceCopyEmail": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "description": "Blind-copied on each end-user invoice email. Null sends no copy.",
            "example": "accounts@brandy.example"
          },
          "defaultInvoiceFormat": {
            "type": "string",
            "enum": [
              "summary",
              "detailed"
            ],
            "description": "Summary or detailed invoices, for an end user with no choice of its own. Detailed lists each call under its usage line.",
            "example": "summary"
          },
          "invoiceNumberPrefix": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 12,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9\\-]*$",
            "description": "Leads every end-user invoice and credit note number. Null for none.",
            "example": "BT-"
          },
          "invoiceNextNumber": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 999999999999,
            "description": "The next number of one running sequence across all your end users, shared by invoices and credit notes. Null numbers each invoice by end user and month. Each bill run moves it on.",
            "example": 1042
          },
          "remittanceText": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 2000,
            "description": "The bank transfer details printed on each invoice.",
            "example": "BSB 062-000, account 1234 5678, reference your invoice number."
          },
          "bpayBillerCode": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{3,10}$",
            "description": "Your own BPAY biller code, 3 to 10 digits.",
            "example": "123456"
          }
        }
      },
      "RetailReminderSchedule": {
        "type": "object",
        "description": "When your end users are reminded of an overdue invoice. Reminders only: no end user is suspended automatically.",
        "required": [
          "enabled",
          "reminderDays",
          "finalNoticeDays",
          "sendNotices"
        ],
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether overdue end users are reminded at all. Off until you turn it on.",
            "example": true
          },
          "reminderDays": {
            "type": "integer",
            "minimum": 1,
            "maximum": 365,
            "description": "Days after the due date the first reminder is sent.",
            "example": 7
          },
          "finalNoticeDays": {
            "type": "integer",
            "minimum": 1,
            "maximum": 365,
            "description": "Days after the due date the final notice is sent. Must be after the first reminder.",
            "example": 14
          },
          "sendNotices": {
            "type": "boolean",
            "description": "Whether the reminders are emailed to the end user. Off for a wholesaler that chases its end users through its own system: the reminder stages are still recorded.",
            "example": true
          }
        }
      },
      "RetailNotice": {
        "type": "object",
        "description": "A notice your end users receive that you may reword.",
        "properties": {
          "key": {
            "type": "string",
            "description": "The notice's key, used in its path.",
            "example": "retail.invoice"
          },
          "name": {
            "type": "string",
            "example": "End-user invoice email"
          },
          "group": {
            "type": "string",
            "description": "The notices are grouped as in the portal.",
            "example": "End-user billing emails"
          },
          "description": {
            "type": "string",
            "description": "When the notice is sent.",
            "example": "Sent to an end user with each invoice from your bill run, the invoice PDF attached."
          },
          "reworded": {
            "type": "boolean",
            "description": "Whether you have saved your own wording. False sends the Check Networks default.",
            "example": false
          },
          "requiredContent": {
            "type": "array",
            "description": "The placeholders that must stay in the subject or the body.",
            "items": {
              "type": "string"
            },
            "example": [
              "{{ invoice_number }}"
            ]
          },
          "tokens": {
            "type": "array",
            "description": "Every placeholder the notice offers. Any other placeholder is refused.",
            "items": {
              "type": "object",
              "properties": {
                "placeholder": {
                  "type": "string",
                  "example": "{{ invoice_number }}"
                },
                "label": {
                  "type": "string",
                  "example": "Invoice number"
                },
                "required": {
                  "type": "boolean",
                  "example": true
                }
              }
            }
          }
        }
      },
      "RetailNoticeDetail": {
        "allOf": [
          {
            "$ref": "#/components/schemas/RetailNotice"
          },
          {
            "type": "object",
            "properties": {
              "subject": {
                "type": "string",
                "description": "The subject in effect.",
                "example": "Invoice {{ invoice_number }} from {{ brand }}"
              },
              "body": {
                "type": "string",
                "description": "The body in effect, in Markdown. A statutory footer, where a notice has one, is added on every send and is not part of it.",
                "example": "Hi {{ customer_name }},\n\nYour invoice **{{ invoice_number }}** from {{ brand }} is attached."
              },
              "default": {
                "type": "object",
                "description": "The Check Networks default wording, which a reset goes back to.",
                "properties": {
                  "subject": {
                    "type": "string",
                    "example": "Invoice {{ invoice_number }} from {{ brand }}"
                  },
                  "body": {
                    "type": "string",
                    "example": "Hi {{ customer_name }},\n\nYour invoice **{{ invoice_number }}** from {{ brand }} is attached."
                  }
                }
              }
            }
          }
        ]
      },
      "RetailPaymentGateway": {
        "type": "object",
        "description": "One payment gateway you take your end users' card or direct debit payments through. No key, webhook secret or callback address is ever returned.",
        "properties": {
          "gateway": {
            "type": "string",
            "enum": [
              "stripe",
              "square",
              "gocardless"
            ],
            "example": "stripe"
          },
          "name": {
            "type": "string",
            "example": "Stripe"
          },
          "connected": {
            "type": "boolean",
            "description": "Whether keys for this gateway are saved.",
            "example": true
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "unverified",
              "verified",
              "disabled",
              null
            ],
            "description": "`verified`: the keys passed our check when they were last saved or the gateway was switched back on. `unverified`: they did not, so end users are not offered it. `disabled`: you switched it off and its keys are kept. Null when not connected.",
            "example": "verified"
          },
          "working": {
            "type": "boolean",
            "description": "Whether end users are offered this gateway now (its status is verified).",
            "example": true
          },
          "supportedMethods": {
            "type": "array",
            "description": "The payment methods this gateway can take.",
            "items": {
              "type": "string",
              "enum": [
                "card",
                "direct_debit"
              ]
            },
            "example": [
              "card"
            ]
          },
          "enabledMethods": {
            "type": "array",
            "description": "The payment methods you have turned it on for. Empty when not connected.",
            "items": {
              "type": "string",
              "enum": [
                "card",
                "direct_debit"
              ]
            },
            "example": [
              "card"
            ]
          },
          "verifiedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the keys last passed our check. Null when they never have, or after a failed check.",
            "example": "2026-11-20T03:15:00+00:00"
          },
          "lastCheckedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When we last checked the keys, whether or not they passed. The keys are checked when they are saved or the gateway is switched back on. Null when no check has been recorded.",
            "example": "2026-11-20T03:15:00+00:00"
          },
          "lastError": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the last check failed, as the portal shows it: the gateway's own reason and its HTTP status, or why it could not be reached. Null when it passed or none has run. Never contains key material.",
            "example": null
          }
        }
      },
      "EndUserSpend": {
        "type": "object",
        "description": "An end user's spend this month against the monthly spend limit you set on them. Spent is their Next Bill Estimate so far, with GST: the same figure their spend alerts and your portal show. The limit is an alert only; nothing is stopped when it is reached.",
        "required": [
          "endUser",
          "month",
          "limit",
          "spentExGst",
          "spentGst",
          "spentIncGst",
          "currency",
          "percent",
          "tiersReached",
          "usageExcluded"
        ],
        "properties": {
          "endUser": {
            "type": "string",
            "description": "The end user's number.",
            "example": "SA123456"
          },
          "month": {
            "type": "string",
            "description": "The calendar month, in the billing time zone (Australia/Brisbane).",
            "example": "2026-11"
          },
          "periodStart": {
            "type": "string",
            "format": "date",
            "example": "2026-11-01"
          },
          "periodEnd": {
            "type": "string",
            "format": "date",
            "example": "2026-11-30"
          },
          "limit": {
            "type": "string",
            "description": "The monthly spend limit, in dollars, GST-inclusive.",
            "example": "100.00"
          },
          "spentExGst": {
            "type": "string",
            "description": "Spent so far this month without GST, in dollars.",
            "example": "77.27"
          },
          "spentGst": {
            "type": "string",
            "example": "7.73"
          },
          "spentIncGst": {
            "type": "string",
            "description": "Spent so far with GST: the figure compared with `limit`.",
            "example": "85.00"
          },
          "currency": {
            "type": "string",
            "example": "AUD"
          },
          "percent": {
            "type": "integer",
            "description": "Whole per cent of the limit spent, rounded down.",
            "example": 85
          },
          "tiersReached": {
            "type": "array",
            "description": "The alert tiers (50, 85 and 100 per cent) reached this month.",
            "items": {
              "type": "integer",
              "enum": [
                50,
                85,
                100
              ]
            },
            "example": [
              50,
              85
            ]
          },
          "usageExcluded": {
            "type": "boolean",
            "description": "Call usage is not in `spent` yet, as on the end user's Next Bill Estimate; the figure is their services and charges only."
          }
        }
      },
      "EndUserUsageRecord": {
        "type": "object",
        "description": "A record of usage you rated yourself, billed on your end user's next invoice. Money is a dollar string. The unit price is to up to five decimal places of a dollar; the amount is the quantity times the unit price, rounded up to the cent, as the invoice bills it. GST is worked under your own tax settings and the record's `gst` treatment.",
        "required": [
          "id",
          "endUser",
          "usageDate",
          "description",
          "quantity",
          "unit",
          "unitPriceExGst",
          "unitPriceGst",
          "unitPriceIncGst",
          "amountExGst",
          "amountGst",
          "amountIncGst",
          "currency",
          "gst",
          "reference",
          "service",
          "source",
          "billed"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The record's public id, for `DELETE /usage/{usageId}`.",
            "example": "3e9a1c57-2b4d-4f80-a6c3-9d1e7b5f2a64"
          },
          "endUser": {
            "type": "string",
            "description": "The end user's number.",
            "example": "5012345678"
          },
          "usageDate": {
            "type": "string",
            "format": "date",
            "description": "The day of the usage.",
            "example": "2026-07-10"
          },
          "description": {
            "type": "string",
            "description": "What the usage was, as it is printed on the invoice.",
            "example": "Managed service hours"
          },
          "quantity": {
            "type": "string",
            "description": "How much, to up to four decimal places.",
            "example": "1.5"
          },
          "unit": {
            "type": "string",
            "description": "The unit of the quantity.",
            "example": "hours"
          },
          "unitPriceExGst": {
            "type": "string",
            "description": "The price of one unit, ex GST.",
            "example": "120.00"
          },
          "unitPriceGst": {
            "type": "string",
            "description": "The GST on one unit.",
            "example": "12.00"
          },
          "unitPriceIncGst": {
            "type": "string",
            "description": "The price of one unit with GST.",
            "example": "132.00"
          },
          "amountExGst": {
            "type": "string",
            "description": "Quantity times unit price, ex GST, rounded up to the cent.",
            "example": "180.00"
          },
          "amountGst": {
            "type": "string",
            "description": "The GST on the amount.",
            "example": "18.00"
          },
          "amountIncGst": {
            "type": "string",
            "description": "The amount with GST.",
            "example": "198.00"
          },
          "currency": {
            "type": "string",
            "example": "AUD"
          },
          "gst": {
            "type": "string",
            "enum": [
              "gst",
              "free",
              "exempt"
            ],
            "description": "The GST treatment: `gst` adds GST, `free` and `exempt` add none."
          },
          "reference": {
            "type": "string",
            "description": "Your own reference for the record, unique on your account.",
            "example": "JOB-20931"
          },
          "service": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The end user's service the usage relates to, if you named one: its `assignmentId` from List an End User's Services.",
            "example": null
          },
          "source": {
            "type": "string",
            "enum": [
              "api",
              "sftp",
              "portal"
            ],
            "description": "How the record was added."
          },
          "billed": {
            "type": "boolean",
            "description": "Whether a held or issued invoice carries it. A billed record can no longer be removed."
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "EndUserUsageInput": {
        "type": "object",
        "description": "One record of usage you rated yourself. The unit price is in dollars, ex GST, as the portal takes it. A record can come to at most $999,999.99.",
        "required": [
          "usageDate",
          "description",
          "quantity",
          "unit",
          "unitPrice",
          "reference"
        ],
        "properties": {
          "usageDate": {
            "type": "string",
            "format": "date",
            "description": "The day of the usage. Not in the future, and not in a bill period the end user already has a held or issued invoice for.",
            "example": "2026-07-10"
          },
          "description": {
            "type": "string",
            "maxLength": 255,
            "description": "What the usage was. On a summary invoice, records with the same description, unit, unit price and GST treatment are one line; on a detailed invoice each record is its own line.",
            "example": "Managed service hours"
          },
          "quantity": {
            "type": [
              "string",
              "number"
            ],
            "description": "How much, above 0, to up to four decimal places.",
            "example": "1.5"
          },
          "unit": {
            "type": "string",
            "maxLength": 32,
            "example": "hours"
          },
          "unitPrice": {
            "type": [
              "string",
              "number"
            ],
            "description": "The price of one unit in dollars, **ex GST**, from 0, to up to five decimal places.",
            "example": "120.00"
          },
          "gst": {
            "type": "string",
            "enum": [
              "gst",
              "free",
              "exempt"
            ],
            "default": "gst",
            "description": "The GST treatment. `gst` when left out."
          },
          "reference": {
            "type": "string",
            "maxLength": 128,
            "description": "Your own reference for the record, unique on your account: a record with a reference already added is refused, so you can resend safely.",
            "example": "JOB-20931"
          },
          "service": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "One of the end user's services the usage relates to, by its `assignmentId` from List an End User's Services."
          }
        }
      },
      "XeroStatus": {
        "type": "object",
        "description": "Your own Xero connection, as Integrations → Xero in the portal shows it: whether it works, what still stops a push, and how much is waiting.",
        "required": [
          "configured",
          "connected",
          "needsReconnect",
          "problems",
          "counts"
        ],
        "properties": {
          "configured": {
            "type": "boolean",
            "description": "Xero can be connected here. `false` means connecting is not available at the moment."
          },
          "connected": {
            "type": "boolean",
            "description": "An organisation is connected and Xero still accepts the connection."
          },
          "needsReconnect": {
            "type": "boolean",
            "description": "Xero no longer accepts the connection (it expired, or was removed in Xero). Nothing is sent until you connect again in the portal."
          },
          "organisation": {
            "type": [
              "string",
              "null"
            ],
            "description": "The connected Xero organisation's name.",
            "example": "Demo Company (AU)"
          },
          "pushFrom": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "Only documents from this date on are sent: the day you connected. Earlier ones are taken to be in your books already.",
            "example": "2026-11-01"
          },
          "pushPayments": {
            "type": "boolean",
            "description": "Whether payments you record are sent too, as well as invoices and credit notes."
          },
          "problems": {
            "type": "array",
            "description": "What still stops a push, in words: a mapping not chosen yet, or an account or tax rate archived in Xero since. Empty when ready. Fix these with Set Xero Mapping.",
            "items": {
              "type": "string"
            },
            "example": [
              "Choose the default sales account."
            ]
          },
          "chartError": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why your chart of accounts could not be read from Xero just now, when it could not. `problems` is then empty."
          },
          "counts": {
            "type": "object",
            "description": "How many end-user ledger entries are in each state.",
            "required": [
              "pushed",
              "waiting",
              "unmatched",
              "partial",
              "failed"
            ],
            "properties": {
              "pushed": {
                "type": "integer",
                "description": "In Xero."
              },
              "waiting": {
                "type": "integer",
                "description": "Not tried yet. The nightly push, or Send Now, sends them."
              },
              "unmatched": {
                "type": "integer",
                "description": "Waiting on a Xero contact for the end user. Link one with Link Xero Contact."
              },
              "partial": {
                "type": "integer",
                "description": "Sent in part: the next push finishes them."
              },
              "failed": {
                "type": "integer",
                "description": "Xero refused them. `reason` on each says why; the next push tries again."
              }
            }
          },
          "lastPushAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When an entry was last sent or tried, by any push (nightly, the portal's Send Now or this API)."
          },
          "lastError": {
            "type": [
              "object",
              "null"
            ],
            "description": "The newest reason Xero gave for refusing an entry still failed or sent in part.",
            "properties": {
              "message": {
                "type": "string",
                "example": "The document date cannot be before the period lock date."
              },
              "at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "XeroQueueEntry": {
        "type": "object",
        "description": "One end-user ledger entry that has not reached Xero: the end user, the document it is for, and why.",
        "required": [
          "entryId",
          "kind",
          "amountExGst",
          "amountGst",
          "amountIncGst",
          "currency",
          "state"
        ],
        "properties": {
          "entryId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The ledger entry's public id, as the end-user ledger names it.",
            "example": "5c2e8a14-9b7d-4f31-8a6e-0d4c2f9b1e57"
          },
          "endUser": {
            "type": [
              "string",
              "null"
            ],
            "description": "The end user's number.",
            "example": "SA123456"
          },
          "endUserName": {
            "type": [
              "string",
              "null"
            ],
            "example": "Acme Retail"
          },
          "kind": {
            "type": "string",
            "description": "What the entry is: `invoice_charge` (an invoice), `credit_note`, `payment`, `payment_reversal` (a dishonour or chargeback) or `adjustment`.",
            "example": "invoice_charge"
          },
          "direction": {
            "type": "string",
            "enum": [
              "debit",
              "credit"
            ],
            "description": "A debit adds to what the end user owes you; a credit takes from it."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "example": "Invoice R1042-7"
          },
          "invoiceNumber": {
            "type": [
              "string",
              "null"
            ],
            "description": "The end-user invoice the entry is for, when it is one.",
            "example": "R1042-7"
          },
          "creditNoteNumber": {
            "type": [
              "string",
              "null"
            ],
            "description": "The end-user credit note the entry is for, when it is one."
          },
          "amountExGst": {
            "type": "string",
            "description": "The entry's amount without GST, in dollars. Unsigned; `direction` carries the sign.",
            "example": "50.00"
          },
          "amountGst": {
            "type": "string",
            "example": "5.00"
          },
          "amountIncGst": {
            "type": "string",
            "example": "55.00"
          },
          "currency": {
            "type": "string",
            "example": "AUD"
          },
          "occurredAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "state": {
            "type": "string",
            "enum": [
              "waiting",
              "unmatched",
              "partial",
              "failed"
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Xero's reason, or ours, for the entry not being in Xero. `null` while waiting.",
            "example": "The document date cannot be before the period lock date."
          },
          "attempts": {
            "type": "integer",
            "description": "How many times a push has tried it."
          },
          "lastTriedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "XeroChoice": {
        "type": "object",
        "description": "One account or tax rate your Xero chart of accounts offers.",
        "required": [
          "code",
          "label"
        ],
        "properties": {
          "code": {
            "type": "string",
            "description": "The account code or tax type to send in Set Xero Mapping.",
            "example": "200"
          },
          "label": {
            "type": "string",
            "example": "200 - Sales"
          }
        }
      },
      "XeroMapping": {
        "type": "object",
        "description": "Which of your Xero organisation's accounts and tax rates your end-user documents use. Every value is an account code or tax type from your own chart of accounts (`choices`); nothing is assumed, so nothing is sent until the mapping is complete.",
        "required": [
          "products",
          "charges",
          "payments",
          "tax",
          "pushPayments",
          "choices",
          "problems"
        ],
        "properties": {
          "revenueDefault": {
            "type": [
              "string",
              "null"
            ],
            "description": "The sales account every invoice line goes to unless its product or charge has its own.",
            "example": "200"
          },
          "products": {
            "type": "object",
            "description": "A sales account for a product's lines, by product ID, in place of `revenueDefault`.",
            "additionalProperties": {
              "type": "string"
            },
            "example": {
              "12": "220"
            }
          },
          "charges": {
            "type": "object",
            "description": "A sales account for one of your own charges, by charge ID, in place of `revenueDefault`.",
            "additionalProperties": {
              "type": "string"
            }
          },
          "paymentDefault": {
            "type": [
              "string",
              "null"
            ],
            "description": "The account payments are received into, unless their gateway has its own. Needed only when `pushPayments` is on.",
            "example": "090"
          },
          "payments": {
            "type": "object",
            "description": "A clearing account per way an end user pays (`manual`, `stripe`, `square`, `gocardless`), in place of `paymentDefault`.",
            "additionalProperties": {
              "type": "string"
            },
            "example": {
              "stripe": "611"
            }
          },
          "tax": {
            "type": "object",
            "description": "The Xero tax rate for GST lines (`taxed`), GST-free lines (`free`) and lines with no GST (`none`).",
            "properties": {
              "taxed": {
                "type": [
                  "string",
                  "null"
                ],
                "example": "OUTPUT"
              },
              "free": {
                "type": [
                  "string",
                  "null"
                ],
                "example": "EXEMPTOUTPUT"
              },
              "none": {
                "type": [
                  "string",
                  "null"
                ],
                "example": "BASEXCLUDED"
              }
            }
          },
          "pushPayments": {
            "type": "boolean",
            "description": "Whether payments you record are sent to Xero too."
          },
          "choices": {
            "type": "object",
            "description": "What your chart of accounts offers for each kind of mapping today.",
            "properties": {
              "revenueAccounts": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/XeroChoice"
                }
              },
              "paymentAccounts": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/XeroChoice"
                }
              },
              "taxRates": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/XeroChoice"
                }
              },
              "gateways": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "example": [
                  "manual",
                  "stripe",
                  "square",
                  "gocardless"
                ]
              }
            }
          },
          "problems": {
            "type": "array",
            "description": "What still stops a push. Empty when ready.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "EndUserXeroContact": {
        "type": "object",
        "description": "The Xero contact an end user's documents go to.",
        "required": [
          "endUser"
        ],
        "properties": {
          "endUser": {
            "type": "string",
            "description": "The end user's number.",
            "example": "SA123456"
          },
          "contactId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The Xero contact's ID, or `null` when none is linked.",
            "example": "6d1a9f1e-0c2b-4a3e-9b8f-2a4c6e8d0f12"
          },
          "contactName": {
            "type": [
              "string",
              "null"
            ],
            "example": "Acme Retail Pty Ltd"
          }
        }
      },
      "TrunkCredential": {
        "type": "object",
        "description": "A trunk's SIP digest credential, with its password in plain text. Store the password securely: the answers that carry it are not cached.",
        "required": [
          "username",
          "password"
        ],
        "properties": {
          "username": {
            "type": "string",
            "description": "The SIP digest username, which also addresses the trunk on `/trunks/{username}`.",
            "example": "784512"
          },
          "password": {
            "type": "string",
            "description": "The SIP password.",
            "example": "Xk3pQ9vLm2Rt8YwB4nZc7HsD"
          }
        }
      },
      "TrunkSourceRestrictions": {
        "type": "object",
        "description": "Where a trunk's SIP credentials may be used from. A call that authenticates with the credentials from anywhere else is refused, so a stolen password is no use elsewhere. Both lists empty means no restriction. The trunk's IP list (`/trunks/{username}/ips`) is separate: it lets calls in without registering.",
        "required": [
          "cidrs",
          "countries"
        ],
        "properties": {
          "cidrs": {
            "type": "array",
            "description": "Public source addresses or CIDR ranges, IPv4 no wider than `/24` and IPv6 single hosts (`/128`). A bare address is stored as `/32` or `/128`.",
            "items": {
              "type": "string",
              "maxLength": 64
            },
            "example": [
              "203.0.113.10/32"
            ]
          },
          "countries": {
            "type": "array",
            "description": "ISO 3166-1 alpha-2 country codes, upper case. The United Kingdom is `GB`, not `UK`.",
            "items": {
              "type": "string",
              "maxLength": 8
            },
            "example": [
              "AU",
              "NZ"
            ]
          }
        }
      },
      "NumberBulkJob": {
        "type": "object",
        "description": "One bulk number change and what happened to each number.",
        "required": [
          "jobId",
          "action",
          "status",
          "createdAt",
          "done",
          "skipped",
          "failed",
          "results"
        ],
        "properties": {
          "jobId": {
            "type": "string",
            "format": "uuid"
          },
          "action": {
            "type": "string",
            "enum": [
              "release",
              "route",
              "emergencyAddress"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "running",
              "done"
            ],
            "description": "`done` once every number has its result. A release is then queued, and the number reads `releasing` until it is gone. `running` while the call is still working through the numbers; a job left `running` stopped part way (the call timed out), and `results` are the numbers it reached."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "done": {
            "type": "integer",
            "description": "How many numbers were changed (a release asked for)."
          },
          "skipped": {
            "type": "integer",
            "description": "How many were left alone, each with its reason."
          },
          "failed": {
            "type": "integer",
            "description": "How many could not be changed just now; try those again."
          },
          "results": {
            "type": "array",
            "description": "One per number, in the order sent.",
            "items": {
              "type": "object",
              "required": [
                "number",
                "status",
                "reason"
              ],
              "properties": {
                "number": {
                  "type": "string",
                  "example": "61299999999"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "done",
                    "skipped",
                    "failed"
                  ]
                },
                "reason": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Why it was skipped or failed; null when done.",
                  "example": "This Number Is Suspended By Check Networks; Contact Support To Lift It"
                }
              }
            }
          }
        }
      },
      "NumberOffer": {
        "type": "object",
        "description": "A number, or the start of a block, you can order now, with its price per number. The price is the monthly price at the tier your holding of this type reaches with these numbers, as your invoice will charge it.",
        "required": [
          "number",
          "lastNumber",
          "blockSize",
          "source",
          "offerId",
          "monthlyPriceExGst",
          "monthlyPriceGst",
          "monthlyPriceIncGst",
          "setupPriceExGst",
          "setupPriceGst",
          "setupPriceIncGst",
          "currency"
        ],
        "properties": {
          "number": {
            "type": "string",
            "description": "The number, or the first number of the block, as E.164 digits with no `+`.",
            "example": "61755512340"
          },
          "lastNumber": {
            "type": "string",
            "description": "The last number of the block; the same as `number` for a single number.",
            "example": "61755512349"
          },
          "blockSize": {
            "type": "integer",
            "enum": [
              1,
              10,
              100
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "stock",
              "supplier"
            ],
            "description": "`stock`: a number we hold. Hold a single one with `POST /numbers/holds` and order it with the `holdId`; order a block by its type, area and size, which takes this block. `supplier`: a number our supplier offers where we hold none; order it with `offerId`. Nothing is reserved with the supplier until you order."
          },
          "offerId": {
            "type": [
              "string",
              "null"
            ],
            "description": "For a `supplier` number, the reference to order it by; null for `stock`."
          },
          "monthlyPriceExGst": {
            "type": [
              "string",
              "null"
            ],
            "description": "The monthly price per number without GST, in dollars. Null when no price applies.",
            "example": "2.50"
          },
          "monthlyPriceGst": {
            "type": [
              "string",
              "null"
            ],
            "example": "0.25"
          },
          "monthlyPriceIncGst": {
            "type": [
              "string",
              "null"
            ],
            "example": "2.75"
          },
          "setupPriceExGst": {
            "type": [
              "string",
              "null"
            ],
            "description": "The one-off setup fee per number without GST, in dollars. Null when none applies.",
            "example": "0.00"
          },
          "setupPriceGst": {
            "type": [
              "string",
              "null"
            ],
            "example": "0.00"
          },
          "setupPriceIncGst": {
            "type": [
              "string",
              "null"
            ],
            "example": "0.00"
          },
          "currency": {
            "type": "string",
            "example": "AUD"
          }
        }
      },
      "NumberLookupResult": {
        "type": "object",
        "description": "What the number register says about one Australian number, as the portal's Number Lookup shows it.",
        "required": [
          "number",
          "e164",
          "assignedCarrier",
          "currentCarrier",
          "numberingArea",
          "portedActionIndicator",
          "alreadyPorting",
          "heldByUs",
          "portable",
          "reason",
          "source",
          "asAt"
        ],
        "properties": {
          "number": {
            "type": "string",
            "description": "The number as it is dialled in Australia.",
            "example": "0731306460"
          },
          "e164": {
            "type": "string",
            "description": "E.164 digits, with no leading `+`.",
            "example": "61731306460"
          },
          "assignedCarrier": {
            "type": [
              "string",
              "null"
            ],
            "description": "The carrier the number's block was assigned to."
          },
          "currentCarrier": {
            "type": [
              "string",
              "null"
            ],
            "description": "The carrier that serves the number now. It differs from `assignedCarrier` when the number has ported."
          },
          "numberingArea": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number's numbering area."
          },
          "portedActionIndicator": {
            "type": [
              "string",
              "null"
            ],
            "description": "The register's ported action indicator. A blank is a real state; null means the register has no entry."
          },
          "alreadyPorting": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether a port of the number is in progress. Null when the register could not say; `reason` says why (for a mobile, it is not an Australian fixed line)."
          },
          "heldByUs": {
            "type": "boolean",
            "description": "True when the number is already on our books."
          },
          "portable": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "A hint only, from `alreadyPorting` and `heldByUs`: false when we hold the number or a port is already in progress, true when neither, null when the register could not say. It is not a check that a port will be accepted."
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "The register's own explanation, when it gave one."
          },
          "source": {
            "type": "string",
            "enum": [
              "register",
              "netsip"
            ],
            "description": "Where the answer came from."
          },
          "asAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "How current the answer is, the register file's date or the time it was asked."
          }
        }
      },
      "PortState": {
        "type": "string",
        "description": "A number port's real state: the step it is at, not a summary. The same id\nis a port's `state` on `GET /ports` and its `step.id` on the port webhooks.\nEach state waits on one party (`waitingOn`):\n\n| State | Track | `waitingOn` |\n|---|---|---|\n| `awaiting_authority` | fixed line, 13/1300/1800, sent to the holder | `wholesaler`: the number's holder confirms the Porting Authority by the emailed link; resend it if they need a new one. Cancelled after 14 days without |\n| `requested` | every port-in | `us`: we check the request and send it to the losing carrier |\n| `submitted` | fixed line, 13/1300/1800 | `losingCarrier`: with the losing carrier for approval |\n| `confirmed` | fixed line, 13/1300/1800 | `us`: approved; we book the cutover |\n| `scheduled` | fixed line, 13/1300/1800 | `losingCarrier`: the cutover is booked; the number moves on the day |\n| `ppv_sent` | mobile | `wholesaler`: enter the verification code the number's holder was sent |\n| `ppv_validated` | mobile | `us`: we lodge it with the carrier |\n| `submitted_upstream` | mobile | `losingCarrier`: lodged; waiting for the number to move |\n| `port_out_requested` | port-out | `us`: our team reviews the gaining carrier's request |\n| `port_out_approved` | port-out | `gainingCarrier`: approved; waiting for the gaining carrier to take the number |\n| `activated` | port-in, finished | null: the number is live on our network |\n| `ported_away` | port-out, finished | null: the number has left |\n| `rejected` | finished | null: refused; `statusReason` says why |\n| `cancelled` | finished | null: withdrawn or cancelled; `statusReason` says why |\n",
        "enum": [
          "awaiting_authority",
          "requested",
          "submitted",
          "confirmed",
          "scheduled",
          "ppv_sent",
          "ppv_validated",
          "submitted_upstream",
          "activated",
          "cancelled",
          "rejected",
          "port_out_requested",
          "port_out_approved",
          "ported_away"
        ],
        "example": "ppv_sent"
      },
      "PortWaitingOn": {
        "type": [
          "string",
          "null"
        ],
        "description": "Who the port is waiting on now, so you can tell whether to act or wait: `wholesaler` (you: a verification code to enter), `us` (Check Networks works the next step), `losingCarrier` (the carrier the numbers are leaving, on a port-in) or `gainingCarrier` (the carrier taking the number, on a port-out). Null once the port has finished. See `PortState` for the party each state waits on.",
        "enum": [
          "us",
          "wholesaler",
          "losingCarrier",
          "gainingCarrier",
          null
        ],
        "example": "wholesaler"
      },
      "PortOrder": {
        "type": "object",
        "description": "A number port, in or out, as the portal's port page shows it: its state, who it is waiting on, its history step by step, the cutover and why it stopped. Named by `reference`. Times are ISO 8601 with an offset; dates are on your account's calendar.",
        "required": [
          "reference",
          "direction",
          "numbers",
          "state",
          "stateName",
          "group",
          "waitingOn",
          "history"
        ],
        "properties": {
          "reference": {
            "type": "string",
            "description": "The port's reference, as `GET /ports/{reference}` takes it.",
            "example": "LNP-7K2M9Q"
          },
          "direction": {
            "type": "string",
            "enum": [
              "in",
              "out"
            ],
            "description": "`in` brings the numbers onto your account; `out` is a number leaving you for another carrier, which our team works with the gaining carrier."
          },
          "portType": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "CatA",
              "CatC",
              "Mob",
              "Inbound",
              null
            ],
            "description": "The kind of port-in: `CatA` one fixed-line number, `CatC` a list or range of fixed-line numbers, `Mob` a mobile number, `Inbound` a 13, 1300 or 1800 number. Null on a port-out."
          },
          "numbers": {
            "type": "array",
            "description": "The numbers on the port in E.164 digits. A CAT C range keeps its wildcard tail: `#` is 10 numbers, `##` is 100.",
            "items": {
              "type": "string"
            },
            "example": [
              "61299990001"
            ]
          },
          "state": {
            "$ref": "#/components/schemas/PortState"
          },
          "stateName": {
            "type": "string",
            "description": "The state's name, as the portal shows it.",
            "example": "PPV Sent"
          },
          "group": {
            "type": "string",
            "enum": [
              "active",
              "completed",
              "rejected"
            ],
            "description": "The portal's tab for the port: `active` (in flight), `completed` (`activated` or `ported_away`) or `rejected` (`rejected` or `cancelled`)."
          },
          "waitingOn": {
            "$ref": "#/components/schemas/PortWaitingOn"
          },
          "nextStep": {
            "type": [
              "string",
              "null"
            ],
            "description": "The next step in plain words. Null once the port has finished.",
            "example": "Enter the verification code the number's holder was sent."
          },
          "attention": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the port needs a person to look at it, or null: a cutover date passed without the number moving, a verification code that lapsed, or a step that has taken longer than it should.",
            "example": "PPV code expired without validation"
          },
          "stateEnteredAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the port entered its current state; null once finished."
          },
          "requestedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "preferredCutoverOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The cutover date you asked for, if any. The carriers set the real one."
          },
          "scheduledFor": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "The booked cutover, once the carriers have set it; on a port-out, the agreed date."
          },
          "completedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the number went live on our network, or left it on a port-out."
          },
          "statusReason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the port was rejected, withdrawn or cancelled, in plain words. Null otherwise.",
            "example": "The account number does not match the losing carrier's records."
          },
          "portOutResponseCode": {
            "type": [
              "string",
              "null"
            ],
            "description": "On a port-out, the industry response code we gave the gaining carrier: `000` approved, otherwise the reason it was refused. Null on a port-in.",
            "example": "000"
          },
          "losingProvider": {
            "type": [
              "string",
              "null"
            ],
            "description": "The provider the numbers are leaving, on a port-in.",
            "example": "Telstra"
          },
          "carrierReference": {
            "type": [
              "string",
              "null"
            ],
            "description": "The losing carrier's reference for the port, once it has one."
          },
          "endUserName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The legal holder of the numbers, as given on the request."
          },
          "endUser": {
            "type": [
              "string",
              "null"
            ],
            "description": "The end user of the trunk the numbers land on, by its number; null for your own trunk.",
            "example": "100042"
          },
          "trunk": {
            "type": [
              "string",
              "null"
            ],
            "description": "The `sipUsername` of the trunk the numbers land on."
          },
          "emergencyAddressId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The emergency address the numbers are listed at once live."
          },
          "contact": {
            "type": [
              "object",
              "null"
            ],
            "description": "Who we email about a port-in. Null on a port-out.",
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "type": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "sp",
                  "cr",
                  null
                ],
                "description": "`sp` the service provider, `cr` the customer's representative."
              }
            }
          },
          "verificationCode": {
            "type": [
              "object",
              "null"
            ],
            "description": "A mobile port's verification code. Null on every other port. A code lasts 30 minutes; a fresh one can be sent with `POST /ports/{reference}/verification-code`. Five wrong codes per port, counted across every code sent, reject the port.",
            "properties": {
              "sentAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When the latest code was sent; null if none has gone yet."
              },
              "expiresAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When the latest code lapses, while the port waits for it."
              },
              "expired": {
                "type": "boolean",
                "description": "True when the code lapsed before it was entered."
              },
              "attemptsRemaining": {
                "type": "integer",
                "description": "Wrong codes the port can still take.",
                "example": 5
              }
            }
          },
          "history": {
            "type": "array",
            "description": "What has happened to the port, oldest first, as the portal's port page lists it.",
            "items": {
              "type": "object",
              "required": [
                "step",
                "label",
                "at"
              ],
              "properties": {
                "step": {
                  "type": "string",
                  "enum": [
                    "requested",
                    "authorityConfirmed",
                    "submitted",
                    "verificationCodeSent",
                    "verificationCodeConfirmed",
                    "lodged",
                    "confirmed",
                    "portOutRequested",
                    "portOutApproved",
                    "live",
                    "portedAway",
                    "rejected",
                    "withdrawn"
                  ]
                },
                "label": {
                  "type": "string",
                  "example": "Submitted to the losing carrier"
                },
                "at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "PortInRequest": {
        "type": "object",
        "description": "A port-in request, as the portal's port request form takes it.",
        "required": [
          "portType",
          "numbers",
          "trunk",
          "emergencyAddressId",
          "endUserName",
          "endUserAddress",
          "contactName",
          "contactEmail",
          "contactType",
          "losingProvider",
          "consents"
        ],
        "properties": {
          "portType": {
            "type": "string",
            "enum": [
              "CatA",
              "CatC",
              "Mob",
              "Inbound"
            ]
          },
          "numbers": {
            "type": "array",
            "minItems": 1,
            "description": "The numbers to port, in E.164 or national form. One, except on `CatC`.",
            "items": {
              "type": "string"
            },
            "example": [
              "0299990001"
            ]
          },
          "trunk": {
            "type": "string",
            "description": "The `sipUsername` of the trunk the numbers land on."
          },
          "emergencyAddressId": {
            "type": "string",
            "format": "uuid",
            "description": "The emergency address the numbers are listed at."
          },
          "endUserName": {
            "type": "string",
            "maxLength": 255,
            "description": "The legal holder of the numbers with the losing provider."
          },
          "endUserAbn": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20
          },
          "endUserAddress": {
            "type": "string",
            "maxLength": 500
          },
          "contactName": {
            "type": "string",
            "maxLength": 255,
            "description": "Who we email about the port."
          },
          "contactNumber": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20
          },
          "contactEmail": {
            "type": "string",
            "format": "email"
          },
          "contactType": {
            "type": "string",
            "enum": [
              "sp",
              "cr"
            ],
            "description": "`sp` the service provider, `cr` the customer's representative."
          },
          "losingProvider": {
            "type": "string",
            "maxLength": 255,
            "example": "Telstra"
          },
          "preferredCutoverOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "A cutover date you would like, after today on your account's time zone (or the one you sent in `CN-Time-Zone`). The carriers set the real one."
          },
          "accountType": {
            "type": "string",
            "enum": [
              "postpaid",
              "prepaid"
            ],
            "description": "Mobile only, and required there."
          },
          "accountNumber": {
            "type": "string",
            "maxLength": 64,
            "description": "Mobile postpaid only, and required there."
          },
          "dateOfBirth": {
            "type": "string",
            "format": "date",
            "description": "Mobile prepaid only, and required there."
          },
          "authorityHolder": {
            "type": "object",
            "required": [
              "name",
              "email"
            ],
            "description": "Send the port to the number's holder to give the Porting Authority, instead of giving it in `consents`. Any port but `Mob`. The port is saved in `awaiting_authority` and the holder emailed a link on your end-user portal.",
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 255,
                "example": "Sam Taylor"
              },
              "email": {
                "type": "string",
                "format": "email",
                "maxLength": 255,
                "example": "sam@example.com"
              }
            }
          },
          "consents": {
            "type": "object",
            "required": [
              "terms"
            ],
            "properties": {
              "portingAuthority": {
                "type": "boolean",
                "description": "Must be `true`, unless `authorityHolder` is sent."
              },
              "terms": {
                "type": "boolean",
                "description": "Must be `true`."
              },
              "authorisedAgent": {
                "type": "boolean",
                "description": "Recommended."
              }
            }
          }
        }
      },
      "CdrExport": {
        "type": "object",
        "description": "One scheduled call record export to our SFTP server.",
        "properties": {
          "cadence": {
            "type": "string",
            "enum": [
              "daily",
              "monthly"
            ]
          },
          "description": {
            "type": "string",
            "description": "When the export runs and what it covers."
          },
          "active": {
            "type": "boolean",
            "description": "Whether the export runs."
          }
        }
      },
      "VoiceRecording": {
        "type": "object",
        "description": "One call recording.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The recording's public id; fetch it with `GET /voice/recordings/{id}`.",
            "example": "5a7c1e93-2d4b-4f86-9e0a-b3c6d8f1a274"
          },
          "cgrid": {
            "type": [
              "string",
              "null"
            ],
            "description": "The call's id in `GET /voice/cdrs/{cgrid}`."
          },
          "trunk": {
            "type": [
              "string",
              "null"
            ],
            "description": "The sipUsername of the trunk the call was on."
          },
          "direction": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "inbound",
              "outbound",
              "internal",
              null
            ]
          },
          "trigger": {
            "type": [
              "string",
              "null"
            ],
            "description": "What started the recording, such as the trunk's always-on setting or an on-demand request."
          },
          "callerIdNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "callerIdName": {
            "type": [
              "string",
              "null"
            ]
          },
          "durationSeconds": {
            "type": "integer"
          },
          "recordedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "retentionExpiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the recording is deleted under the retention period."
          }
        }
      },
      "SmsMessage": {
        "type": "object",
        "description": "One SMS sent from or received on your account.",
        "required": [
          "id",
          "direction",
          "from",
          "to",
          "message",
          "status",
          "sentAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The message's id, as `POST /sms` returned it in `messageId`."
          },
          "direction": {
            "type": "string",
            "enum": [
              "inbound",
              "outbound"
            ]
          },
          "from": {
            "type": "string",
            "description": "The sender, a number in E.164 format or a sender ID."
          },
          "to": {
            "type": "string",
            "description": "The recipient number in E.164 format."
          },
          "message": {
            "type": "string",
            "description": "The message body. Blank once the text is no longer held (90 days, or 7 days after delivery)."
          },
          "status": {
            "type": "string",
            "enum": [
              "delivered",
              "failed",
              "pending"
            ],
            "description": "`delivered` and `failed` are final. `pending` means the message may still move: queued, awaiting a delivery receipt, or held for review; `statusReason` says which."
          },
          "statusReason": {
            "type": "string",
            "description": "Present only where the status alone is ambiguous.",
            "example": "Held for review before sending."
          },
          "sentAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SmsSender": {
        "type": "object",
        "description": "A sender your account has asked for or holds: a number you control, or a sender ID (3 to 11 letters and digits). Numbers you hold with us are approved automatically; anything else is checked by our team first.",
        "required": [
          "id",
          "sender",
          "status",
          "endUser",
          "requestedAt",
          "approvedAt",
          "revokedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The request's public id, for `DELETE /sms/senders/{id}`.",
            "example": "3e6a9d2f-7b14-4c58-9f03-b2d8e1a6c47f"
          },
          "sender": {
            "type": "string",
            "example": "HarbourCafe"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "approved",
              "rejected",
              "revoked",
              "withdrawn"
            ],
            "description": "`pending` until our team decides it; only an `approved` sender can be used with `POST /sms`. `revoked` is a sender that left your account; `withdrawn` is a request you took back."
          },
          "endUser": {
            "type": [
              "string",
              "null"
            ],
            "description": "The end user the sender belongs to, by its public number. Null when it is your own.",
            "example": null
          },
          "requestedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "approvedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "revokedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "FaxDocument": {
        "type": "object",
        "description": "One fax sent or received on your numbers, as Fax History in the portal shows it. Metadata only: never the document or a link to it.",
        "required": [
          "id",
          "direction",
          "number",
          "remoteNumber",
          "pages",
          "status",
          "failureReason",
          "endUser",
          "createdAt",
          "completedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The fax's id, as the `fax.*` webhook events carry it in `faxId`."
          },
          "direction": {
            "type": "string",
            "enum": [
              "inbound",
              "outbound"
            ]
          },
          "number": {
            "type": [
              "string",
              "null"
            ],
            "description": "Your number the fax was received on or sent from.",
            "example": "61299999999"
          },
          "remoteNumber": {
            "type": [
              "string",
              "null"
            ],
            "description": "The other party's number; null when it was withheld.",
            "example": "61288887777"
          },
          "pages": {
            "type": "integer",
            "description": "Pages received or sent. 0 until a sent fax has gone through."
          },
          "status": {
            "type": "string",
            "enum": [
              "received",
              "emailed",
              "delivered",
              "failed",
              "pending",
              "rendering",
              "dialing",
              "sending",
              "sent"
            ],
            "description": "Received: `received`, then `emailed` (sent on by email), `delivered` (kept for the portal) or `failed`. Sent: `pending` (queued), `rendering`, `dialing` and `sending`, then `sent` or `failed`. A busy line or no answer is retried, so a fax can go back to `pending` before it fails for good."
          },
          "failureReason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why it failed; null unless `status` is `failed`.",
            "example": "The destination fax number is busy."
          },
          "endUser": {
            "type": [
              "string",
              "null"
            ],
            "description": "The end user's account number when the fax is theirs; null when it is yours.",
            "example": "100245"
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the fax was received, or queued to send."
          },
          "completedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it finished arriving, or finished sending; null until then."
          }
        }
      },
      "FaxSettings": {
        "type": "object",
        "description": "Your fax domain and cover page, as Fax Settings in the portal.",
        "required": [
          "domain",
          "coverPage"
        ],
        "properties": {
          "domain": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255,
            "description": "Your own fax domain: end users email faxes to `<number>@` it, and received faxes and send results are emailed from it. Null for the platform's domain.",
            "example": "fax.example.com.au"
          },
          "coverPage": {
            "type": "object",
            "required": [
              "enabled",
              "company",
              "footer"
            ],
            "properties": {
              "enabled": {
                "type": "boolean",
                "description": "Whether a cover page goes ahead of each fax sent. It is a page sent, and billed as one."
              },
              "company": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 120,
                "description": "The company name on the cover page.",
                "example": "Harbour Medical"
              },
              "footer": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 200,
                "description": "The line at the foot of the cover page.",
                "example": "This fax is confidential."
              }
            }
          }
        }
      },
      "FaxDomainCheck": {
        "type": "object",
        "description": "A fax domain checked both ways. Nothing is stored.",
        "required": [
          "domain",
          "inbound",
          "outbound"
        ],
        "properties": {
          "domain": {
            "type": "string",
            "example": "fax.example.com.au"
          },
          "inbound": {
            "type": "object",
            "description": "Whether mail to `<number>@` the domain reaches us, from its public MX records. `ok`: delivered to us directly. `forwarding`: it points elsewhere, which works if that mail is forwarded to us; send a test fax by email to be sure. `fail`: no MX record. `error`: the lookup failed.",
            "required": [
              "status",
              "detail"
            ],
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "ok",
                  "forwarding",
                  "fail",
                  "error",
                  "unset"
                ]
              },
              "detail": {
                "type": "string"
              }
            }
          },
          "outbound": {
            "type": "object",
            "description": "Whether mail from the domain is accepted. It cannot be read from here, so it is always `unknown`: ask us to confirm it.",
            "required": [
              "status",
              "detail"
            ],
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "unknown",
                  "unset"
                ]
              },
              "detail": {
                "type": "string"
              }
            }
          }
        }
      },
      "AllowedCountries": {
        "type": "object",
        "description": "Your account's list of countries its trunks may call.",
        "required": [
          "allowedCountries",
          "availableCountries"
        ],
        "properties": {
          "allowedCountries": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "ISO 3166 alpha-2 codes, sorted. Every country until you set a list.",
            "example": [
              "GB",
              "US"
            ]
          },
          "availableCountries": {
            "type": "array",
            "description": "Every country a list can name, by name. Australia and New Zealand are not among them: calls to either are never international, and New Zealand's follow each trunk's `NZMobile` and `NZNational` permissions.",
            "items": {
              "type": "object",
              "required": [
                "code",
                "name"
              ],
              "properties": {
                "code": {
                  "type": "string",
                  "example": "GB"
                },
                "name": {
                  "type": "string",
                  "example": "United Kingdom"
                }
              }
            }
          }
        }
      },
      "ResidentialLine": {
        "type": "object",
        "required": [
          "name",
          "username",
          "plan",
          "status",
          "numbers",
          "awaitingNumber"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "A friendly name for the line.",
            "example": "Smith Home Line"
          },
          "username": {
            "type": "string",
            "description": "The line's SIP username, which its phone registers with. This is the line's identifier: every `/residential-lines/{username}` endpoint addresses it by this value, and call records and numbers name it in their `trunk` field with `trunkType: residentialLine`.",
            "example": "r800321-3fa9c1"
          },
          "sipDomain": {
            "type": [
              "string",
              "null"
            ],
            "description": "The SIP domain the line's phone registers to.",
            "example": "res.checknetworks.tel"
          },
          "plan": {
            "type": "string",
            "enum": [
              "payg",
              "ultimate"
            ],
            "description": "The line's plan. `payg` meters calls; `ultimate` includes Australian calls to landlines and mobiles in a higher monthly price."
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "suspended",
              "cancelled"
            ],
            "description": "The line's status. A suspended line makes and receives no calls, except 000 and an emergency callback within the hour."
          },
          "endUser": {
            "type": [
              "string",
              "null"
            ],
            "description": "The end user this line is for, by its public number; null for a line that is your own.",
            "example": "100042"
          },
          "numbers": {
            "type": "array",
            "description": "The line's live numbers, E.164 digits without the `+`.",
            "items": {
              "type": "string",
              "example": "61755512345"
            }
          },
          "numbersRoutedHere": {
            "type": "array",
            "description": "Of `numbers`, the ones whose route sends calls to this line. A number can be on the line, and billed there, while it is routed somewhere else; empty while `numbers` is not means no call reaches the line.",
            "items": {
              "type": "string",
              "example": "61755512345"
            }
          },
          "awaitingNumber": {
            "type": "boolean",
            "description": "True while the line has no live number. It bills from the day it is ordered but cannot make or receive calls until its number is ordered, as the portal's Residential Lines list shows with Awaiting Number."
          },
          "defaultCallerId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number the line presents on outbound calls. It is set to the line's own number when that number lands on the line; null until then."
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "ResidentialLineSettings": {
        "type": "object",
        "description": "A residential line's call settings: the same settings its end user can change from the phone with star codes (*72 and *73 forwarding, *78 and *79 Do Not Disturb).",
        "properties": {
          "forwarding": {
            "type": "object",
            "description": "Forward every call to another number.",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "destination": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^[0-9]{6,15}$",
                "description": "The number calls are forwarded to, 6 to 15 digits. Required to turn forwarding on; null while forwarding is off. Never 000, 112 or 106, in any form (`0061000`, `1831112`): that is a `422`, \"Calls can’t be diverted to an emergency number (000, 112 or 106).\"",
                "example": "0412345678"
              }
            }
          },
          "doNotDisturb": {
            "type": "boolean",
            "description": "Send every incoming call straight to voicemail."
          },
          "anonymousReject": {
            "type": "boolean",
            "description": "Refuse incoming calls that withhold their number."
          },
          "callWaiting": {
            "type": "boolean",
            "description": "Let a second call through while the line is on a call."
          },
          "callingPermissions": {
            "type": "array",
            "readOnly": true,
            "description": "The kinds of number the line may call. Shown for reference; set by us, not changeable here.",
            "items": {
              "type": "string",
              "example": "AUMobile"
            }
          }
        }
      },
      "ResidentialLineVoicemail": {
        "type": "object",
        "description": "A residential line's mailbox. The PIN is the end user's own, set in the end-user portal or by phone, and is never read or set here.",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether unanswered calls go to the mailbox."
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "maxLength": 255,
            "description": "Where each new message is emailed; null for none.",
            "example": "smith@example.com"
          },
          "attachAudio": {
            "type": "boolean",
            "description": "Attach the recording to the email. A line with no mailbox yet reads true, the value a new mailbox gets when it is turned on."
          },
          "deleteAfterEmail": {
            "type": "boolean",
            "description": "Delete the message once it is emailed. Only takes effect with an `email` set; without one it reads false."
          }
        }
      },
      "CallerIdAuthorisation": {
        "type": "object",
        "required": [
          "id",
          "number",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The request's public id.",
            "example": "2e8b4c17-9f3a-4d60-8b1e-7c5a2f9d0e63"
          },
          "number": {
            "type": "string",
            "description": "The number asked for, E.164 digits without the `+`.",
            "example": "61299990000"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why you want to present the number, as you sent it."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "approved",
              "rejected",
              "cancelled"
            ],
            "description": "`pending` until we decide it. `approved`: the number can be set as a trunk's default caller ID. `rejected`: it cannot; `decisionNote` says why. `cancelled`: you withdrew it."
          },
          "requestedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "decidedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it was approved, rejected or cancelled; null while pending."
          },
          "decisionNote": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why a rejected request was refused; null otherwise."
          },
          "evidence": {
            "type": "object",
            "description": "The proof sent with the request. The file itself is never returned. Both fields are null on a request made before 21 November 2026.",
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The file's name as it was sent.",
                "example": "phone-bill-october.pdf"
              },
              "sizeBytes": {
                "type": [
                  "integer",
                  "null"
                ],
                "example": 184320
              }
            }
          }
        }
      },
      "DataSqBatch": {
        "type": "object",
        "description": "A batch of premises qualified as one job (#4848): the API's form of the portal's Batch Qualification page, which lists the same batches.",
        "required": [
          "id",
          "href",
          "reference",
          "status",
          "counts",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The batch's id."
          },
          "href": {
            "type": "string",
            "description": "URL of this batch.",
            "example": "https://api.checknetworks.tools/v2/data/sq/batches/0b6f3c1e-5a4d-4d0e-9f7a-1c2b3d4e5f60"
          },
          "reference": {
            "type": [
              "string",
              "null"
            ],
            "description": "Your name for the batch, as you sent it. A batch uploaded in the portal carries its file name.",
            "example": "Tender 2026-11"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "processing",
              "completed"
            ],
            "description": "`completed` once every row has its result. Rows are qualified one by one on our side, usually within minutes; poll this batch to follow it."
          },
          "counts": {
            "type": "object",
            "required": [
              "total",
              "pending",
              "done",
              "serviceable",
              "notServiceable",
              "unresolved",
              "failed"
            ],
            "properties": {
              "total": {
                "type": "integer",
                "description": "Rows in the batch."
              },
              "pending": {
                "type": "integer",
                "description": "Rows not qualified yet."
              },
              "done": {
                "type": "integer",
                "description": "Rows with a result, whatever it is."
              },
              "serviceable": {
                "type": "integer"
              },
              "notServiceable": {
                "type": "integer"
              },
              "unresolved": {
                "type": "integer",
                "description": "Rows whose address did not resolve to one location."
              },
              "failed": {
                "type": "integer",
                "description": "Rows the carrier could not qualify after retries. Not a verdict on the premises: qualify it on its own with `GET /data/sq/{locId}`."
              }
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "DataSqBatchRow": {
        "type": "object",
        "description": "One row of a qualification batch and its result.",
        "required": [
          "rowNumber",
          "reference",
          "input",
          "inputType",
          "status",
          "resolvedAddress",
          "detail",
          "qualifiedAt",
          "qualification"
        ],
        "properties": {
          "rowNumber": {
            "type": "integer",
            "description": "The row's place in the list you sent, from 1. For a batch uploaded in the portal, its line in the file."
          },
          "reference": {
            "type": [
              "string",
              "null"
            ],
            "description": "Your reference for the row, as you sent it."
          },
          "input": {
            "type": "string",
            "description": "The location id or address you sent."
          },
          "inputType": {
            "type": "string",
            "enum": [
              "locId",
              "address"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "serviceable",
              "not_serviceable",
              "unresolved",
              "failed"
            ],
            "description": "`unresolved` is an address that did not resolve to one location; `failed` is a qualification the carrier could not answer after retries, not a verdict on the premises."
          },
          "resolvedAddress": {
            "type": [
              "string",
              "null"
            ],
            "description": "The address the row resolved to."
          },
          "detail": {
            "type": [
              "string",
              "null"
            ],
            "description": "The result in words, as the portal shows it, such as `FTTP · class 3 · port available`.",
            "example": "FTTP · class 3 · port available"
          },
          "qualifiedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "qualification": {
            "type": [
              "object",
              "null"
            ],
            "description": "Once the row resolved to a location, its qualification summary in the field names of `GET /data/sq/{locId}`. Follow `href` for the full qualification. Null until then, and for an unresolved row.",
            "required": [
              "id",
              "href",
              "network",
              "serviceable",
              "serviceClass",
              "primaryAccessTech"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "The location id (LOC… or OPC…).",
                "example": "LOC000000000001"
              },
              "href": {
                "type": "string",
                "description": "URL of this location's full qualification.",
                "example": "https://api.checknetworks.tools/v2/data/sq/LOC000000000001"
              },
              "network": {
                "type": "string",
                "enum": [
                  "nbn",
                  "opticomm"
                ]
              },
              "serviceable": {
                "type": "boolean"
              },
              "serviceClass": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "primaryAccessTech": {
                "type": [
                  "string",
                  "null"
                ],
                "example": "FTTP"
              }
            }
          }
        }
      },
      "ColocationSiteReference": {
        "type": [
          "object",
          "null"
        ],
        "description": "The site, by its code.",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The site's code, as `GET /colocation/sites` lists it.",
            "example": "SYD1"
          },
          "name": {
            "type": "string",
            "example": "Equinix SY1"
          }
        }
      },
      "ColocationSellUnit": {
        "type": "string",
        "description": "The tier: a full rack, a half rack, or 1, 2, 4 or 10 rack units. Full and half racks are priced by quote.",
        "enum": [
          "full",
          "half",
          "ru",
          "ru2",
          "ru4",
          "ru10"
        ],
        "example": "ru2"
      },
      "ColocationService": {
        "type": "object",
        "description": "One of your colocation services, rack space at one of our sites.",
        "required": [
          "id",
          "serviceNumber",
          "site",
          "position",
          "sellUnit",
          "powerAmps",
          "state",
          "activatedAt",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "serviceNumber": {
            "type": "string",
            "description": "The service's number, as the portal and your invoices show it."
          },
          "site": {
            "$ref": "#/components/schemas/ColocationSiteReference"
          },
          "position": {
            "type": "string",
            "description": "The rack units the service holds, bottom up, as the portal shows them.",
            "example": "U7–U8"
          },
          "sellUnit": {
            "$ref": "#/components/schemas/ColocationSellUnit"
          },
          "powerAmps": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The power included with the service, in amps.",
            "example": 2
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "active",
              "suspended",
              "decommissioned"
            ]
          },
          "activatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ColocationOrder": {
        "type": "object",
        "description": "A colocation order. We assign the rack and rack units, and the service then appears on `GET /colocation/services`.",
        "required": [
          "id",
          "status",
          "site",
          "sellUnit",
          "requestedPowerAmps",
          "notes",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "submitted",
              "fulfilled",
              "cancelled"
            ]
          },
          "site": {
            "$ref": "#/components/schemas/ColocationSiteReference"
          },
          "sellUnit": {
            "$ref": "#/components/schemas/ColocationSellUnit"
          },
          "requestedPowerAmps": {
            "type": [
              "integer",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "OccupancyDocument": {
        "type": "object",
        "description": "A proof of occupancy you uploaded: what was sent, and the order that used it. The file itself is kept privately with us and never served back.",
        "required": [
          "id",
          "name",
          "sizeBytes",
          "mimeType",
          "used",
          "orderId",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "What an order takes as `occupancyDocumentId`."
          },
          "name": {
            "type": "string",
            "description": "The file's name, as it was sent.",
            "example": "lease-unit-4.pdf"
          },
          "sizeBytes": {
            "type": "integer"
          },
          "mimeType": {
            "type": "string",
            "example": "application/pdf"
          },
          "used": {
            "type": "boolean",
            "description": "Whether an order has used it. Each document is used once."
          },
          "orderId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The order that used it, or null."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Bundle": {
        "type": "object",
        "description": "A bundle: data orders, numbers and a voice trunk ordered together, in sequence, as the portal's Bundles page.",
        "required": [
          "id",
          "href",
          "reference",
          "title",
          "status",
          "submitted",
          "submittedAt",
          "sendAt",
          "blockedReason",
          "endUser",
          "total",
          "draftRemoval",
          "items",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "href": {
            "type": "string",
            "format": "uri"
          },
          "reference": {
            "type": "string",
            "description": "The bundle's reference, as the portal shows it."
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "inProgress",
              "completed",
              "cancelled"
            ],
            "description": "`draft` until something in it has been sent, `inProgress` while its items run, then `completed` or `cancelled`."
          },
          "submitted": {
            "type": "boolean",
            "description": "Whether it has been submitted. A submitted bundle takes nothing more and is not rearranged; the items that wait are released as the items before them complete."
          },
          "submittedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "sendAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "The time the bundle's submit holds it for, its draft data orders, number orders and trunk alike, sent then; null when it holds nothing."
          },
          "blockedReason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the bundle could not move on at its last attempt, or null."
          },
          "endUser": {
            "type": [
              "string",
              "null"
            ],
            "description": "The end user the bundle is for, by its public number, or null."
          },
          "total": {
            "type": [
              "object",
              "null"
            ],
            "description": "The running total of the bundle's draft data orders at today's prices, as the portal's bundle page shows it: each draft's `price` added up. A draft with no plan yet, or one your prices do not cover, is counted in `unpricedDrafts` and left out of the sum. Number orders and the trunk are not in it. Null for a key without `billing:read`.",
            "required": [
              "currency",
              "monthlyExGst",
              "monthlyGst",
              "monthlyIncGst",
              "oneOffExGst",
              "oneOffGst",
              "oneOffIncGst",
              "pricedDrafts",
              "unpricedDrafts"
            ],
            "properties": {
              "currency": {
                "type": "string",
                "example": "AUD"
              },
              "monthlyExGst": {
                "type": "string",
                "example": "790.00"
              },
              "monthlyGst": {
                "type": "string",
                "example": "79.00"
              },
              "monthlyIncGst": {
                "type": "string",
                "example": "869.00"
              },
              "oneOffExGst": {
                "type": "string",
                "example": "990.00"
              },
              "oneOffGst": {
                "type": "string",
                "example": "99.00"
              },
              "oneOffIncGst": {
                "type": "string",
                "example": "1089.00"
              },
              "pricedDrafts": {
                "type": "integer",
                "minimum": 0,
                "description": "How many draft data orders are in the sum."
              },
              "unpricedDrafts": {
                "type": "integer",
                "minimum": 0,
                "description": "How many draft data orders have no price yet, and are left out of the sum."
              }
            }
          },
          "draftRemoval": {
            "type": [
              "object",
              "null"
            ],
            "description": "The first date one of the bundle's drafts is removed if it is not checked out, and whether Keep (`POST /bundles/{id}/keep`) can still keep any of them. Each item's `draftRemoval` has its own date. Null when none of its drafts is removed.",
            "required": [
              "removesAt",
              "drafts",
              "canKeep"
            ],
            "properties": {
              "removesAt": {
                "type": "string",
                "format": "date-time"
              },
              "drafts": {
                "type": "integer",
                "minimum": 1,
                "description": "How many of its drafts are removed if not checked out."
              },
              "canKeep": {
                "type": "boolean"
              }
            }
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BundleItem"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "VpnGroup": {
        "type": "object",
        "description": "A VPN access group. Its users may reach what it allows.",
        "required": [
          "id",
          "name",
          "accessMode",
          "destinations",
          "notes",
          "dedicatedEgressIp",
          "userCount",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The group's id."
          },
          "name": {
            "type": "string",
            "example": "Head office"
          },
          "accessMode": {
            "type": "string",
            "enum": [
              "split",
              "full"
            ],
            "description": "`split`: only `destinations` go through the tunnel. `full`: all the user's internet traffic does."
          },
          "destinations": {
            "type": "array",
            "description": "For a `split` group, the networks its users reach through the tunnel, as CIDRs; a bare address is a /32. Empty for a `full` group.",
            "items": {
              "type": "string",
              "example": "192.168.50.0/24"
            }
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "dedicatedEgressIp": {
            "type": [
              "string",
              "null"
            ],
            "description": "The group's own public address on the internet, when we have given it one (billed monthly). Ask support for one."
          },
          "userCount": {
            "type": "integer",
            "description": "The group's users, not counting removed ones."
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "VpnUser": {
        "type": "object",
        "description": "A VPN user, with its own certificate and profile, billed monthly.",
        "required": [
          "id",
          "displayName",
          "cn",
          "state",
          "group",
          "endUser",
          "endUserName",
          "vpnIp",
          "profileReady",
          "createdAt",
          "activatedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The user's id."
          },
          "displayName": {
            "type": [
              "string",
              "null"
            ],
            "example": "Jane Citizen"
          },
          "cn": {
            "type": "string",
            "description": "The certificate's name. It never changes, through a rename or a move.",
            "example": "551234-jane-citizen"
          },
          "state": {
            "type": "string",
            "enum": [
              "provisioning",
              "active",
              "suspended"
            ],
            "description": "`provisioning` until its profile is ready, then `active`. `suspended` while we hold it (for an unpaid account): its profile is not released."
          },
          "group": {
            "type": [
              "object",
              "null"
            ],
            "required": [
              "id",
              "name"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              }
            }
          },
          "endUser": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number of the end user the seat is for, when you resell VPN; null when none."
          },
          "endUserName": {
            "type": [
              "string",
              "null"
            ],
            "description": "That end user's name; null when none."
          },
          "vpnIp": {
            "type": [
              "string",
              "null"
            ],
            "description": "The user's address inside the tunnel, once issued."
          },
          "profileReady": {
            "type": "boolean",
            "description": "Whether GET /vpn/users/{id}/profile will give a link now."
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "activatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "UsageAlertMetric": {
        "type": "string",
        "description": "What a usage alert watches. `callSpendToday`: call charges today, without GST. `callSpendMonth`: call charges this month, without GST. `minutesMonth`: minutes of answered calls this month. `smsMonth`: messages sent this month. Days and months run on the Brisbane calendar our bill runs on. Only the call metrics can be limited to one trunk.",
        "enum": [
          "callSpendToday",
          "callSpendMonth",
          "minutesMonth",
          "smsMonth"
        ]
      },
      "UsageAlertRecipient": {
        "type": "object",
        "description": "One person a usage alert goes to, by email or by SMS. Each alert has its own list.",
        "required": [
          "id",
          "type",
          "email",
          "mobile"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The recipient's public id.",
            "example": "8d2f4a71-6c3e-4b95-a0d8-5e1b7c9f2a46"
          },
          "type": {
            "type": "string",
            "enum": [
              "email",
              "mobile"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "example": "noc@example.com"
          },
          "mobile": {
            "type": [
              "string",
              "null"
            ],
            "description": "An Australian mobile, as stored (E.164 digits without the `+`).",
            "example": "61491570006"
          }
        }
      },
      "UsageAlert": {
        "type": "object",
        "description": "A usage alert: when the metric reaches the threshold, we email and text the alert's own recipients once for that day or month, and send a `usageAlert.triggered` webhook event.\n",
        "required": [
          "id",
          "metric",
          "trunk",
          "threshold",
          "currency",
          "channels",
          "recipients",
          "enabled",
          "lastFiredAt",
          "lastFiredPeriod",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The alert's public id.",
            "example": "3b9e6f2c-8a41-4d7e-b5c2-91f0a6d4e8b3"
          },
          "metric": {
            "$ref": "#/components/schemas/UsageAlertMetric"
          },
          "trunk": {
            "type": [
              "string",
              "null"
            ],
            "description": "The SIP trunk the alert watches, by its `sipUsername`; `null` watches the whole account. Only the call metrics take a trunk.",
            "example": "acme-sip-01"
          },
          "threshold": {
            "type": "string",
            "description": "Dollars without GST for a spend metric (`\"50.00\"`), otherwise a whole number of minutes or messages (`\"1000\"`).",
            "example": "50.00"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "The threshold's currency for a spend metric; `null` otherwise.",
            "example": "AUD"
          },
          "channels": {
            "type": "array",
            "description": "How the alert's recipients are told. Empty sends only the webhook event.",
            "items": {
              "type": "string",
              "enum": [
                "email",
                "sms"
              ]
            }
          },
          "recipients": {
            "type": "array",
            "description": "Who this alert goes to, oldest first: up to 10 addresses and 10 mobiles. Only these people are told; there is no fallback to your billing contact or your credit alert recipients, so an alert with none sends only the webhook event.",
            "items": {
              "$ref": "#/components/schemas/UsageAlertRecipient"
            }
          },
          "enabled": {
            "type": "boolean"
          },
          "lastFiredAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the alert last went off; `null` if it never has."
          },
          "lastFiredPeriod": {
            "type": [
              "string",
              "null"
            ],
            "description": "The day (`YYYY-MM-DD`) or month (`YYYY-MM`) it last went off for."
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "UsageAlertRecipientInput": {
        "type": "object",
        "description": "One recipient: send `email` or `mobile`, not both. A mobile may be written in any usual form (`0491 570 006`, `+61491570006`); one that is not an Australian mobile answers `422`.",
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 191,
            "example": "noc@example.com"
          },
          "mobile": {
            "type": "string",
            "maxLength": 30,
            "example": "0491 570 006"
          }
        }
      },
      "AuditLogEntry": {
        "type": "object",
        "description": "One entry in your account's audit trail: something one of your portal\nusers, one of your API keys or our support staff did on your account. The\nsame entries your portal's Audit Log page shows. Entries are never changed\nor removed.\n",
        "required": [
          "id",
          "action",
          "actionLabel",
          "actor",
          "target",
          "ip",
          "changes",
          "context",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The entry's id. Opaque."
          },
          "action": {
            "type": "string",
            "description": "What was done, as a key. New keys are added as the platform grows.",
            "example": "user.login"
          },
          "actionLabel": {
            "type": "string",
            "description": "The action in words, as the portal shows it. The wording can change.",
            "example": "Signed In"
          },
          "actor": {
            "type": "object",
            "description": "Who did it.",
            "required": [
              "type",
              "id",
              "name",
              "email"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "user",
                  "apiKey",
                  "support",
                  "system"
                ],
                "description": "`user` is one of your portal users, `apiKey` one of your API keys, and `support` our support staff acting on your behalf (signed in as one of your users). The staff member is never named."
              },
              "id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "For a `user`, their id as `GET /account/users` names it; for an `apiKey`, the key's id (its `client_id`). `null` for `support`."
              },
              "name": {
                "type": "string",
                "description": "The user's name, the key's name as it is now, or `Support`.",
                "example": "Billing sync"
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "A user's email address; `null` for any other actor."
              }
            }
          },
          "target": {
            "type": [
              "object",
              "null"
            ],
            "description": "What it was done to, when the entry names one. `ref` is its public id where it has one (an end user's number, a trunk's or user's id, an invoice's id, a ticket's reference), else `null`.",
            "required": [
              "type",
              "ref"
            ],
            "properties": {
              "type": {
                "type": "string",
                "example": "endUser"
              },
              "ref": {
                "type": [
                  "string",
                  "null"
                ],
                "example": "100234"
              }
            }
          },
          "ip": {
            "type": [
              "string",
              "null"
            ],
            "description": "The address the action came from. `null` when our support staff did it, and when none was recorded."
          },
          "changes": {
            "type": "object",
            "description": "What changed, by field: each value has the `from` and `to` as text, `—` where a value was not set. Empty when the entry records no change.",
            "additionalProperties": {
              "type": "object",
              "required": [
                "from",
                "to"
              ],
              "properties": {
                "from": {
                  "type": "string"
                },
                "to": {
                  "type": "string"
                }
              }
            }
          },
          "context": {
            "type": "object",
            "description": "Further detail, by label, as text. Internal identifiers are never included. Empty when there is none.",
            "additionalProperties": {
              "type": "string"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When it happened, in UTC."
          }
        }
      },
      "ApiCall": {
        "type": "object",
        "description": "One call one of your API keys made: a summary, kept for 30 days. It never\nholds the request or response body, the query string or any header.\n",
        "required": [
          "id",
          "keyId",
          "keyName",
          "method",
          "route",
          "path",
          "status",
          "durationMs",
          "ip",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The call's `CN-Message-Id`. Quote it to Support to find the call.",
            "example": "01JD4Z8X7K3M2N5P6Q7R8S9T0V"
          },
          "keyId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The key that made it, its `client_id`."
          },
          "keyName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The key's name as it is now; `null` once the key is gone."
          },
          "method": {
            "type": "string",
            "example": "GET"
          },
          "route": {
            "type": [
              "string",
              "null"
            ],
            "description": "The endpoint, as a pattern (`/v2/tickets/{ticketRef}`), so calls to the same endpoint group together. `null` for a path no endpoint matched.",
            "example": "/v2/tickets/{ticketRef}"
          },
          "path": {
            "type": "string",
            "description": "The path called, without the query string.",
            "example": "/v2/tickets/TKT-10234"
          },
          "status": {
            "type": "integer",
            "description": "The HTTP status we answered.",
            "example": 200
          },
          "durationMs": {
            "type": "integer",
            "description": "How long we took to answer, in milliseconds."
          },
          "ip": {
            "type": [
              "string",
              "null"
            ],
            "description": "The address the call came from.",
            "example": "203.0.113.9"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the call was made, in UTC."
          }
        }
      },
      "apiVersion": {
        "type": "string",
        "description": "The API version the event's `data` follows: `2`, as the `/v2` paths. Fields are only ever added to an event within a version, so ignore ones you do not know.",
        "example": "2"
      },
      "livemode": {
        "type": "boolean",
        "description": "`false` when the event comes from the sandbox, so you can send both to one endpoint and tell them apart."
      },
      "test": {
        "type": "boolean",
        "description": "`true` for a delivery you asked for with `POST /webhooks/{webhookId}/test`: a ping, or a sample event whose `data` describes nothing real. Do not act on it."
      },
      "accountId": {
        "type": [
          "string",
          "null"
        ],
        "description": "The account the event belongs to, as `clientNumber` on `GET /account`.",
        "example": "840100"
      },
      "resourceUrl": {
        "type": [
          "string",
          "null"
        ],
        "format": "uri",
        "description": "Where to read the current state of what the event is about. Events can arrive late or out of order, so re-read it rather than trusting the event alone. Null when there is no single resource to read, and on a test.",
        "example": "https://api.checknetworks.tools/v2/data/services/AVC000123456789"
      },
      "WebhookFeedEvent": {
        "description": "One event from the feed (`GET /events`): the body a delivery of it\ncarries, with the same `eventId`, so a handler that de-duplicates on\n`eventId` treats a feed event and a delivery of it as one. `sequence` is\n`null`: each endpoint numbers its own deliveries. Kept for 30 days, and\nonly when one of your endpoints subscribed to it.\n",
        "type": "object",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "apiVersion",
          "livemode",
          "test",
          "accountId",
          "resourceUrl",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "The event's id, as every delivery of it carries."
          },
          "eventType": {
            "type": "string",
            "description": "The event type, as `GET /webhooks/event-types` lists them.",
            "example": "ticket.replied"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the event happened, in UTC."
          },
          "sequence": {
            "type": [
              "null"
            ],
            "description": "Always `null` in the feed; a delivery carries its endpoint's sequence."
          },
          "apiVersion": {
            "$ref": "#/components/schemas/apiVersion"
          },
          "livemode": {
            "$ref": "#/components/schemas/livemode"
          },
          "test": {
            "$ref": "#/components/schemas/test"
          },
          "accountId": {
            "$ref": "#/components/schemas/accountId"
          },
          "resourceUrl": {
            "$ref": "#/components/schemas/resourceUrl"
          },
          "data": {
            "description": "The event's `data`, as the event's own schema under `webhooks` describes it."
          }
        }
      },
      "StepDelegation": {
        "type": "object",
        "description": "One step of a port or a data order handed to a named person by a one-use emailed link. The link and the email code are never returned: only the person they were sent to can use them.",
        "required": [
          "delegationId",
          "action",
          "portReference",
          "orderId",
          "name",
          "email",
          "status",
          "createdBy",
          "sentAt",
          "expiresAt",
          "resendCount",
          "codePassedAt",
          "usedAt",
          "cancelledAt",
          "createdAt"
        ],
        "properties": {
          "delegationId": {
            "type": "string",
            "format": "uuid",
            "example": "9a7b6c5d-4e3f-4a2b-9c1d-0e8f7a6b5c4d"
          },
          "action": {
            "type": "string",
            "enum": [
              "confirmPort",
              "pickAppointment",
              "confirmAuthority"
            ],
            "description": "The one step the link allows. `confirmPort`: the mobile number's holder enters the verification code texted to it, on a mobile port-in waiting for it (`ppv_sent`). `pickAppointment`: someone at the site picks the install time, on a data order with no appointment yet. `confirmAuthority`: the fixed-line number's holder confirms the Porting Authority with their name and position, on a port waiting for it (`awaiting_authority`)."
          },
          "portReference": {
            "type": [
              "string",
              "null"
            ],
            "description": "The port, for `confirmPort` and `confirmAuthority`; null otherwise.",
            "example": "LNP-7K2M9Q"
          },
          "orderId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The data order, for `pickAppointment`; null otherwise.",
            "example": null
          },
          "name": {
            "type": "string",
            "description": "The person's name, as you gave it.",
            "example": "Sam Taylor"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Where the link and the code went.",
            "example": "sam@example.com"
          },
          "status": {
            "type": "string",
            "enum": [
              "sent",
              "used",
              "cancelled",
              "expired"
            ],
            "description": "`sent`: the link works. `used`: the person did the step; the link works no more. `cancelled`: you cancelled it. `expired`: 7 days passed unused; resend it for a new link."
          },
          "createdBy": {
            "type": "object",
            "required": [
              "type",
              "name"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "user",
                  "apiKey"
                ],
                "description": "A portal user or an API key handed it over."
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The user's or the key's name.",
                "example": "Order Sync"
              }
            }
          },
          "sentAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the current link was sent (the last resend)."
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the current link stops working, 7 days after it was sent."
          },
          "resendCount": {
            "type": "integer",
            "description": "How many times the link was sent again."
          },
          "codePassedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the person last passed the email code on the current link."
          },
          "usedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "cancelledAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApiKey": {
        "type": "object",
        "description": "The calling API key: its own details, never a secret and never another key. A key belongs to your account, not to the user who made it.\n",
        "required": [
          "clientId",
          "name",
          "scopes",
          "ipAllowlist",
          "expiresAt",
          "previousSecretExpiresAt",
          "lastUsedAt",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "clientId": {
            "type": "string",
            "description": "The key's client id, the one you send to `POST /oauth/token`.",
            "example": "9d4c2f1e-7b7a-4c55-9a77-0f3c1d2e4b6a"
          },
          "name": {
            "type": "string",
            "example": "Provisioning"
          },
          "scopes": {
            "type": "array",
            "description": "The scopes the key may ask for.",
            "items": {
              "type": "string"
            },
            "example": [
              "account:read",
              "data:read"
            ]
          },
          "ipAllowlist": {
            "type": "array",
            "description": "The addresses and CIDR blocks the key may be used from. Empty is anywhere.",
            "items": {
              "type": "string"
            },
            "example": [
              "203.0.113.0/24"
            ]
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the key stops working, in UTC; `null` for a key with no end date. An Owner or Admin sets it in the portal. The account's Owners are emailed 14 days and 1 day before."
          },
          "previousSecretExpiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "While a rotation's overlap runs, when the old secret and its tokens stop working, in UTC; otherwise `null`."
          },
          "lastUsedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "NotificationPreferences": {
        "type": "object",
        "description": "A staff user's notice choices, as on their Notifications page: for each notice they can receive, the channels it can use and the one they chose. Read only: each user sets their own in the portal.\n",
        "required": [
          "userId",
          "preferences"
        ],
        "properties": {
          "userId": {
            "type": "string"
          },
          "preferences": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "type",
                "label",
                "group",
                "channels",
                "channel"
              ],
              "properties": {
                "type": {
                  "type": "string",
                  "example": "invoice_issued"
                },
                "label": {
                  "type": "string",
                  "example": "Invoice issued"
                },
                "group": {
                  "type": "string",
                  "example": "Billing"
                },
                "channels": {
                  "type": "array",
                  "description": "The channels this notice can use.",
                  "items": {
                    "type": "string"
                  }
                },
                "channel": {
                  "type": "string",
                  "description": "The channel chosen, or `none` for a notice turned off."
                }
              }
            }
          }
        }
      },
      "AccountInvite": {
        "type": "object",
        "description": "An open invitation to a staff login on your account. Accepting it makes the login. Partner invitations are under `/partners/invites`.\n",
        "required": [
          "id",
          "email",
          "role",
          "status",
          "expiresAt",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The invitation's id.",
            "example": "5b0c8e64-3f0f-4a36-a3b4-6a1f5d0c9e21"
          },
          "email": {
            "type": "string",
            "format": "email",
            "example": "ivy@example.com"
          },
          "role": {
            "type": "string",
            "enum": [
              "owner",
              "admin",
              "billing",
              "readonly"
            ],
            "description": "The role the login gets on accepting."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "expired"
            ],
            "description": "`expired` once its link no longer works; resend it for a fresh link."
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "AccountSecurity": {
        "type": "object",
        "description": "Your account's security settings, as on Company Settings > Security. Read only: an Owner or Admin changes them in the portal.\n",
        "required": [
          "requireTwoFactor",
          "signInIpAllowlist"
        ],
        "properties": {
          "requireTwoFactor": {
            "type": "boolean",
            "description": "Whether every staff login must use two-factor to sign in."
          },
          "signInIpAllowlist": {
            "type": "array",
            "description": "The addresses staff may sign in to the portal from. Empty is anywhere. This is the portal's list; each API key has its own.",
            "items": {
              "type": "object",
              "required": [
                "cidr",
                "label",
                "createdAt",
                "createdBy"
              ],
              "properties": {
                "cidr": {
                  "type": "string",
                  "example": "203.0.113.0/24"
                },
                "label": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "example": "Office"
                },
                "createdAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "createdBy": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The name of the user who added it."
                }
              }
            }
          }
        }
      },
      "BookedChangeSide": {
        "type": "object",
        "description": "One side of a booked change. A disconnect moves `status` (from the service's status now to `Cancelled`); a plan change moves `plan` and `channels`.",
        "required": [
          "status",
          "plan",
          "channels"
        ],
        "properties": {
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "The data service's status, as `GET /data/services` names it; null on a plan change.",
            "example": "Live"
          },
          "plan": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "payg",
              "ultimate",
              null
            ],
            "description": "The trunk's plan; null on a disconnect."
          },
          "channels": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The channels billed on the trunk, 0 on `payg`; null on a disconnect."
          }
        }
      },
      "BookedChange": {
        "type": "object",
        "description": "A change booked on your account for a later date: a data service disconnect booked for a later day, or a trunk plan change waiting for the start of the next billing cycle. `from` and `to` say what changes, each with all three fields, null where the kind does not change it.",
        "required": [
          "id",
          "kind",
          "serviceType",
          "serviceId",
          "trunkId",
          "from",
          "to",
          "effectiveOn",
          "bookedBy",
          "bookedAt",
          "held"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The booked change's id, for `DELETE /account/booked-changes/{id}`."
          },
          "kind": {
            "type": "string",
            "enum": [
              "disconnect",
              "planChange"
            ],
            "description": "`disconnect`: a data service disconnect booked for a later day. `planChange`: a trunk plan or channel change booked for the next billing cycle."
          },
          "serviceType": {
            "type": "string",
            "enum": [
              "data",
              "voice"
            ]
          },
          "serviceId": {
            "type": "string",
            "description": "The data service's `id`, as `GET /data/services/{ref}` takes it; or the trunk's `sipUsername`, else its `id`.",
            "example": "PRI000123456789"
          },
          "trunkId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The trunk's `id` for a plan change; null for a data service."
          },
          "from": {
            "$ref": "#/components/schemas/BookedChangeSide"
          },
          "to": {
            "$ref": "#/components/schemas/BookedChangeSide"
          },
          "effectiveOn": {
            "type": "string",
            "format": "date",
            "description": "The day it takes effect: a disconnect goes to the carrier at the start of that day, Sydney time; a plan change applies on that day, the 1st of a month."
          },
          "bookedBy": {
            "type": "object",
            "required": [
              "type",
              "name"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "user",
                  "apiKey",
                  "checkNetworks",
                  "system"
                ],
                "description": "`user`: one of your portal users. `apiKey`: one of your API keys. `checkNetworks`: our staff, at your request. `system`: booked by the platform itself."
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The user's or the key's name; null for Check Networks and the platform."
              }
            }
          },
          "bookedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "held": {
            "type": "boolean",
            "description": "True when we are holding a booked disconnect for a person to decide, because the carrier could not take it: it does not go on `effectiveOn` until we send, move or cancel it, and a `bookedChange.*` event tells you which. `effectiveOn` stays the day it was booked for. Always false for a plan change."
          }
        }
      },
      "ApiExport": {
        "type": "object",
        "description": "A background export (`POST /exports`): its state, and once it is `ready` the file's size, its row count and a signed link to download it. The webhook events carry the same fields without the link.\n",
        "required": [
          "id",
          "type",
          "format",
          "state",
          "from",
          "to",
          "filters",
          "rowCount",
          "sizeBytes",
          "failureReason",
          "createdAt",
          "finishedAt",
          "expiresAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The export's id."
          },
          "type": {
            "type": "string",
            "enum": [
              "cdrs",
              "sms",
              "invoiceLines",
              "dataUsage"
            ],
            "description": "What it holds."
          },
          "format": {
            "type": "string",
            "enum": [
              "csv",
              "ndjson"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "ready",
              "failed"
            ],
            "description": "`queued` until a worker picks it up, `running` while the file is written, then `ready` or `failed`.\n"
          },
          "from": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "to": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "filters": {
            "type": "object",
            "description": "The list filters it was started with.",
            "additionalProperties": {
              "type": "string"
            }
          },
          "rowCount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The rows in the file, once it is ready."
          },
          "sizeBytes": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The file's size in bytes, once it is ready."
          },
          "failureReason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why it failed, in words to act on. Null unless `failed`."
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "finishedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the file is removed, 7 days after it was ready."
          },
          "downloadUrl": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "While it is ready and kept, a signed link to the file, good for one hour and needing no token. Each read gives a new one; an expired link answers `403`. Only on the API's reads, not in webhook events.\n"
          },
          "downloadUrlExpiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When `downloadUrl` stops working."
          }
        }
      },
      "PartnerProductRef": {
        "type": "object",
        "description": "A product on your retail price book.",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "example": 1204
          },
          "name": {
            "type": "string",
            "example": "NBN 100/20"
          }
        }
      },
      "Partner": {
        "type": "object",
        "description": "A partner: a login that sees only the end users, products and permissions you give it.\n",
        "required": [
          "id",
          "name",
          "email",
          "isActive",
          "lastSignInAt",
          "endUsers",
          "products",
          "permissions",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The partner's id, as in the commission routes.",
            "example": "1f6b9a2c-0d3e-4c7a-8b1e-2a9d5c6e7f80"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "isActive": {
            "type": "boolean"
          },
          "lastSignInAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "endUsers": {
            "type": "array",
            "description": "The end users the partner may reach, by end-user number.",
            "items": {
              "type": "string"
            },
            "example": [
              "204511"
            ]
          },
          "products": {
            "type": "array",
            "description": "The products the partner may sell.",
            "items": {
              "$ref": "#/components/schemas/PartnerProductRef"
            }
          },
          "permissions": {
            "type": "array",
            "description": "What else the partner may do for its end users.",
            "items": {
              "type": "string",
              "enum": [
                "view_invoices",
                "manage_pricing",
                "manage_credit",
                "decide_hardship",
                "edit_safety",
                "manage_representatives",
                "manage_logins",
                "listen_recordings",
                "view_commission_estimate"
              ]
            }
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "PartnerInvite": {
        "type": "object",
        "description": "An open invitation to a partner login.",
        "required": [
          "id",
          "email",
          "endUsers",
          "products",
          "expiresAt",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "7e2d1c9b-4a5f-4b6c-9d8e-1f0a2b3c4d5e"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "endUsers": {
            "type": "array",
            "description": "The end users the partner will reach, by end-user number.",
            "items": {
              "type": "string"
            }
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PartnerProductRef"
            }
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "WebhookTicketEvent": {
        "type": "object",
        "description": "The delivery envelope for `ticket.*` events. `data` carries the ticket's header (its reference, subject, status, priority, category, times and your own reference) plus the fields of the event. For the whole ticket, as you may act on it now, read `resourceUrl` (`GET /tickets/{ticketRef}`).",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "ticket.created",
              "ticket.replied",
              "ticket.statusChanged",
              "ticket.csatSubmitted",
              "ticket.informationRequired"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "apiVersion": {
            "$ref": "#/components/schemas/apiVersion"
          },
          "livemode": {
            "$ref": "#/components/schemas/livemode"
          },
          "test": {
            "$ref": "#/components/schemas/test"
          },
          "accountId": {
            "$ref": "#/components/schemas/accountId"
          },
          "resourceUrl": {
            "$ref": "#/components/schemas/resourceUrl"
          },
          "data": {
            "type": "object",
            "description": "Exactly what every ticket event sends, and the event's own fields. What depends on who reads the ticket (`canResolve`, `actions` and the like) is on the ticket read only.",
            "required": [
              "reference",
              "subject",
              "status",
              "priority",
              "category",
              "createdAt",
              "lastActivityAt",
              "externalRef",
              "metadata"
            ],
            "properties": {
              "reference": {
                "type": "string",
                "description": "The public ticket reference, as `GET /tickets/{ticketRef}` takes it.",
                "example": "INC-7K3F9Q"
              },
              "subject": {
                "type": "string",
                "example": "Service down at Head Office"
              },
              "status": {
                "type": "string",
                "enum": [
                  "open",
                  "pending",
                  "resolved",
                  "closed"
                ],
                "description": "The ticket's status after the event."
              },
              "priority": {
                "type": "string",
                "enum": [
                  "low",
                  "normal",
                  "high",
                  "urgent"
                ]
              },
              "category": {
                "$ref": "#/components/schemas/TicketCategory"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "lastActivityAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "The ticket's last message or change."
              },
              "externalRef": {
                "$ref": "#/components/schemas/ExternalRef"
              },
              "metadata": {
                "$ref": "#/components/schemas/Metadata"
              },
              "messageId": {
                "type": "string",
                "format": "uuid",
                "description": "`ticket.replied` only — the new message's `id`, as `GET /tickets/{ticketRef}` lists it."
              },
              "author": {
                "type": "string",
                "enum": [
                  "support",
                  "customer",
                  "api"
                ],
                "description": "`ticket.replied` only — who wrote the reply."
              },
              "from": {
                "type": "string",
                "enum": [
                  "open",
                  "pending",
                  "resolved",
                  "closed"
                ],
                "description": "`ticket.statusChanged` and `ticket.informationRequired` — the previous status."
              },
              "to": {
                "type": "string",
                "enum": [
                  "open",
                  "pending",
                  "resolved",
                  "closed"
                ],
                "description": "`ticket.statusChanged` only — the new status."
              },
              "rating": {
                "type": "integer",
                "minimum": 1,
                "maximum": 5,
                "description": "`ticket.csatSubmitted` only."
              }
            }
          }
        }
      },
      "WebhookVoiceCallEvent": {
        "type": "object",
        "description": "The delivery envelope for `voice.call.completed`.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "voice.call.completed"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "apiVersion": {
            "$ref": "#/components/schemas/apiVersion"
          },
          "livemode": {
            "$ref": "#/components/schemas/livemode"
          },
          "test": {
            "$ref": "#/components/schemas/test"
          },
          "accountId": {
            "$ref": "#/components/schemas/accountId"
          },
          "resourceUrl": {
            "$ref": "#/components/schemas/resourceUrl"
          },
          "data": {
            "type": "object",
            "properties": {
              "cgrid": {
                "type": "string",
                "description": "The call record's id, as `cgrid` on `GET /voice/cdrs`."
              },
              "serviceType": {
                "type": "string",
                "enum": [
                  "voice"
                ]
              },
              "serviceId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The trunk's sipUsername, as `GET /trunks` and the trunk events name it. Null for a line with no SIP credential."
              },
              "tenantHandle": {
                "type": "string",
                "deprecated": true,
                "description": "Deprecated; use `serviceId`. The trunk or line's internal handle. Removed in the next release."
              },
              "direction": {
                "type": "string",
                "enum": [
                  "outbound",
                  "inbound"
                ],
                "description": "`outbound` — a call your PBX placed to a carrier. `inbound` — a call a carrier delivered to your PBX."
              },
              "dialledE164": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "cliE164": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The presented caller id."
              },
              "startAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "endAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "durationSeconds": {
                "type": "integer"
              },
              "disposition": {
                "type": "string"
              },
              "costExGst": {
                "type": "string",
                "description": "The rated charge without GST, as a dollar string. The same figure as `costExGst` on the CDR endpoints.",
                "example": "0.25"
              },
              "costGst": {
                "type": "string",
                "description": "The GST on the charge.",
                "example": "0.03"
              },
              "costIncGst": {
                "type": "string",
                "description": "The charge with GST. `costExGst` plus `costGst`.",
                "example": "0.28"
              },
              "currency": {
                "type": "string",
                "example": "AUD"
              },
              "totalCents": {
                "type": "integer",
                "deprecated": true,
                "description": "Deprecated: use `costExGst`. The rated charge in cents without GST, sent for one more release and then removed."
              }
            }
          }
        }
      },
      "WebhookVoicemailEvent": {
        "type": "object",
        "description": "The delivery envelope for `voice.voicemail.received`.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "voice.voicemail.received"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "apiVersion": {
            "$ref": "#/components/schemas/apiVersion"
          },
          "livemode": {
            "$ref": "#/components/schemas/livemode"
          },
          "test": {
            "$ref": "#/components/schemas/test"
          },
          "accountId": {
            "$ref": "#/components/schemas/accountId"
          },
          "resourceUrl": {
            "$ref": "#/components/schemas/resourceUrl"
          },
          "data": {
            "type": "object",
            "properties": {
              "serviceType": {
                "type": "string",
                "enum": [
                  "voice"
                ]
              },
              "serviceId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The trunk's sipUsername, as `GET /trunks` and the trunk events name it. Null for a line with no SIP credential."
              },
              "tenantHandle": {
                "type": "string",
                "deprecated": true,
                "description": "Deprecated; use `serviceId`. The voice tenancy's internal handle. Removed in the next release."
              },
              "mailbox": {
                "type": "string",
                "description": "The mailbox number."
              },
              "callerIdNumber": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "callerIdName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "durationSeconds": {
                "type": "integer"
              },
              "receivedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            }
          }
        }
      },
      "WebhookVoiceRecordingEvent": {
        "type": "object",
        "description": "The delivery envelope for `voice.recording.ready`.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "voice.recording.ready"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "data": {
            "type": "object",
            "required": [
              "recordingId",
              "serviceId",
              "durationSeconds",
              "recordedAt"
            ],
            "properties": {
              "recordingId": {
                "type": "string",
                "format": "uuid",
                "description": "The recording's public id, for `GET /voice/recordings/{id}`."
              },
              "cgrid": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The call the recording belongs to, as `GET /voice/cdrs/{cgrid}` names it."
              },
              "serviceId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The trunk the call was on, by its SIP username: the `sipUsername` `GET /trunks` returns and the `serviceId` the trunk events carry."
              },
              "direction": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "outbound",
                  "inbound",
                  "internal",
                  null
                ]
              },
              "durationSeconds": {
                "type": "integer"
              },
              "recordedAt": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "WebhookTrunkEvent": {
        "type": "object",
        "description": "The delivery for `trunk.down` and `trunk.up`.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "trunk.down",
              "trunk.up"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "apiVersion": {
            "$ref": "#/components/schemas/apiVersion"
          },
          "livemode": {
            "$ref": "#/components/schemas/livemode"
          },
          "test": {
            "$ref": "#/components/schemas/test"
          },
          "accountId": {
            "$ref": "#/components/schemas/accountId"
          },
          "resourceUrl": {
            "$ref": "#/components/schemas/resourceUrl"
          },
          "data": {
            "type": "object",
            "required": [
              "serviceType",
              "serviceId",
              "trunkId",
              "lastSeenAt"
            ],
            "properties": {
              "serviceType": {
                "type": "string",
                "enum": [
                  "voice"
                ]
              },
              "serviceId": {
                "type": "string",
                "description": "The trunk's `sipUsername`, or its `id` when it has no SIP credential.",
                "example": "trunk123456"
              },
              "trunkId": {
                "type": "string",
                "format": "uuid",
                "description": "The trunk's `id`, which every trunk has."
              },
              "externalRef": {
                "$ref": "#/components/schemas/ExternalRef"
              },
              "metadata": {
                "$ref": "#/components/schemas/Metadata"
              },
              "lastSeenAt": {
                "type": "string",
                "format": "date-time",
                "description": "When the trunk was last registered or sending OPTIONS. On `trunk.down` that is when it went quiet."
              }
            }
          }
        }
      },
      "WebhookCallerIdEvent": {
        "description": "A caller ID authorisation request approved or rejected.",
        "type": "object",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "callerId.statusChanged"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "data": {
            "type": "object",
            "required": [
              "id",
              "callerId",
              "status"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "The request's public id, as `GET /caller-id-authorisations/{id}` takes it.",
                "example": "2e8b4c17-9f3a-4d60-8b1e-7c5a2f9d0e63"
              },
              "callerId": {
                "type": "string",
                "description": "The number asked for, E.164 digits without the `+`.",
                "example": "61299990000"
              },
              "status": {
                "type": "string",
                "enum": [
                  "approved",
                  "rejected"
                ],
                "description": "`approved`: the number can now be set as a trunk's default caller ID. `rejected`: it cannot; `reason` says why."
              },
              "reason": {
                "type": "string",
                "description": "`rejected` only — why the request was refused."
              },
              "decidedAt": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "WebhookVoiceHoldEvent": {
        "type": "object",
        "description": "The delivery for `voice.hold.placed` and `voice.hold.released`. A hold never stops a 000 call.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "voice.hold.placed",
              "voice.hold.released"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "data": {
            "type": "object",
            "required": [
              "holdType",
              "serviceType",
              "serviceId",
              "unit",
              "threshold",
              "measured",
              "windowSeconds",
              "trippedAt",
              "releasesAt",
              "releasedAt",
              "releaseReason"
            ],
            "properties": {
              "holdType": {
                "type": "string",
                "enum": [
                  "spendVelocity",
                  "callingPattern",
                  "internationalCap",
                  "dailySpendCap"
                ],
                "description": "`spendVelocity` and `callingPattern` pause the account's new outbound calls until we release the hold. `internationalCap` refuses one trunk's international calls until we release it. `dailySpendCap` refuses one trunk's outbound calls, all but 000 and 1800, until midnight Brisbane time or until you release it or raise the cap."
              },
              "serviceType": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "voice",
                  null
                ],
                "description": "`voice` for a trunk's hold; null for an account hold."
              },
              "serviceId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The trunk's `sipUsername`; null for an account hold.",
                "example": "trunk123456"
              },
              "unit": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "minutes",
                  "audExGst",
                  null
                ],
                "description": "What `threshold` and `measured` count: international minutes, or dollars ex GST. Null, with both figures null, for an account hold."
              },
              "threshold": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The cap the hold tripped at, as a string in `unit`.",
                "example": "50.00"
              },
              "measured": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "What the trunk had used when the hold tripped, in `unit`.",
                "example": "50.12"
              },
              "windowSeconds": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "The rolling window the figure was measured over; null for a daily cap, measured since midnight Brisbane time."
              },
              "trippedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "releasesAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When a `dailySpendCap` hold lifts by itself; null for the others, which we release."
              },
              "releasedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When the hold lifted, on `voice.hold.released`."
              },
              "releaseReason": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "released",
                  "cap_raised",
                  "midnight",
                  null
                ],
                "description": "On `voice.hold.released`: `released` by us or by you, `cap_raised` when you raised the daily cap above today's spend, `midnight` when a daily cap hold lifted by itself."
              }
            }
          }
        }
      },
      "WebhookNumberEvent": {
        "type": "object",
        "description": "The delivery for `number.assigned`, `number.unassigned`, `number.released`, `number.suspended` and `number.reactivated`.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "number.assigned",
              "number.unassigned",
              "number.released",
              "number.suspended",
              "number.reactivated"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "data": {
            "type": "object",
            "required": [
              "serviceType",
              "number",
              "serviceId"
            ],
            "properties": {
              "serviceType": {
                "type": "string",
                "enum": [
                  "voice"
                ]
              },
              "number": {
                "type": "string",
                "description": "The number, E.164 without `+`, as `GET /numbers/{number}` takes it.",
                "example": "61299999999"
              },
              "serviceId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The trunk's `sipUsername`: the trunk it was assigned to on `number.assigned`, the one it was on for the others. Null when the number was on no trunk.",
                "example": "trunk123456"
              },
              "externalRef": {
                "$ref": "#/components/schemas/ExternalRef"
              },
              "metadata": {
                "$ref": "#/components/schemas/Metadata"
              }
            }
          }
        }
      },
      "WebhookIpndRecordRejectedEvent": {
        "type": "object",
        "description": "The delivery for `ipnd.recordRejected`.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "ipnd.recordRejected"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "data": {
            "type": "object",
            "required": [
              "number",
              "emergencyAddressId",
              "status",
              "errors"
            ],
            "properties": {
              "number": {
                "type": "string",
                "description": "The number, E.164 without `+`.",
                "example": "61299999999"
              },
              "emergencyAddressId": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "The emergency address the refused record was built from."
              },
              "status": {
                "type": "string",
                "enum": [
                  "rejected",
                  "fileRejected"
                ],
                "description": "`rejected`: the IPND refused this number's record. `fileRejected`: it refused the whole file the record was in, so the record is not at fault and Check Networks sends it again. As on the number's `ipnd`."
              },
              "errors": {
                "type": "array",
                "description": "The IPND's codes, each explained, as on the number's `ipnd.errors`.",
                "items": {
                  "type": "object",
                  "required": [
                    "code",
                    "meaning",
                    "fixInAddress"
                  ],
                  "properties": {
                    "code": {
                      "type": "string",
                      "example": "MH 12"
                    },
                    "meaning": {
                      "type": "string"
                    },
                    "fixInAddress": {
                      "type": "boolean",
                      "description": "True when fixing the emergency address clears it."
                    }
                  }
                }
              }
            }
          }
        }
      },
      "WebhookTrunkPlanChangeEvent": {
        "type": "object",
        "description": "The delivery for `trunk.planChangeScheduled`, `trunk.planChangeCancelled` and `trunk.planChanged`.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "trunk.planChangeScheduled",
              "trunk.planChangeCancelled",
              "trunk.planChanged"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "data": {
            "type": "object",
            "required": [
              "serviceType",
              "serviceId",
              "trunkId",
              "previousType",
              "previousChannels",
              "type",
              "channels",
              "effectiveOn"
            ],
            "properties": {
              "serviceType": {
                "type": "string",
                "enum": [
                  "voice"
                ]
              },
              "serviceId": {
                "type": "string",
                "description": "The trunk's `sipUsername`, or its `id` when it has no SIP credential.",
                "example": "784512"
              },
              "trunkId": {
                "type": "string",
                "format": "uuid",
                "description": "The trunk's `id`."
              },
              "previousType": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "payg",
                  "ultimate",
                  null
                ],
                "description": "The plan the trunk was on when the change was booked."
              },
              "previousChannels": {
                "type": "integer",
                "description": "The channels billed before the change; 0 on `payg`."
              },
              "type": {
                "type": "string",
                "enum": [
                  "payg",
                  "ultimate"
                ],
                "description": "The plan the change moves the trunk to."
              },
              "channels": {
                "type": "integer",
                "description": "The channels billed after the change; 0 on `payg`."
              },
              "effectiveOn": {
                "type": "string",
                "format": "date",
                "description": "When the change takes effect: the start of the next billing cycle for a booked change, today for an upgrade that applied at once."
              }
            }
          }
        }
      },
      "WebhookBookedChangeEvent": {
        "type": "object",
        "description": "The delivery for `bookedChange.applied` and `bookedChange.cancelled`: a change booked on your account for a later date took effect on its date, or will no longer happen. `data` is the entry `GET /account/booked-changes` listed; `resourceUrl` is the data service or trunk it changes.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "bookedChange.applied",
              "bookedChange.cancelled"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "apiVersion": {
            "$ref": "#/components/schemas/apiVersion"
          },
          "livemode": {
            "$ref": "#/components/schemas/livemode"
          },
          "test": {
            "$ref": "#/components/schemas/test"
          },
          "accountId": {
            "$ref": "#/components/schemas/accountId"
          },
          "resourceUrl": {
            "$ref": "#/components/schemas/resourceUrl"
          },
          "data": {
            "$ref": "#/components/schemas/BookedChange"
          }
        }
      },
      "WebhookBookedChangeFailedEvent": {
        "type": "object",
        "description": "The delivery for `bookedChange.failed`: a change booked on your account for a later date reached its date but could not be made. `data` is the entry `GET /account/booked-changes` listed, plus the `reason`; `resourceUrl` is the data service or trunk it was to change.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "bookedChange.failed"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "apiVersion": {
            "$ref": "#/components/schemas/apiVersion"
          },
          "livemode": {
            "$ref": "#/components/schemas/livemode"
          },
          "test": {
            "$ref": "#/components/schemas/test"
          },
          "accountId": {
            "$ref": "#/components/schemas/accountId"
          },
          "resourceUrl": {
            "$ref": "#/components/schemas/resourceUrl"
          },
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BookedChange"
              },
              {
                "type": "object",
                "required": [
                  "reason"
                ],
                "properties": {
                  "reason": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "Why the change was not made. For a disconnect, the carrier's reason for refusing it, as the order shows it. For a plan change, a plain reason; contact us with the change's `id` for the detail.",
                    "example": "The plan change could not be applied to the trunk. Contact us with the change's id."
                  }
                }
              }
            ]
          }
        }
      },
      "WebhookBookedChangeRescheduledEvent": {
        "type": "object",
        "description": "The delivery for `bookedChange.rescheduled`: a data disconnect booked on your account for a later day was moved to another day by Check Networks. It is the same booking, with the same `id`. `data` is the entry `GET /account/booked-changes` now lists, with its new `effectiveOn`, plus the day it was moved from; `resourceUrl` is the data service it changes.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "bookedChange.rescheduled"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "apiVersion": {
            "$ref": "#/components/schemas/apiVersion"
          },
          "livemode": {
            "$ref": "#/components/schemas/livemode"
          },
          "test": {
            "$ref": "#/components/schemas/test"
          },
          "accountId": {
            "$ref": "#/components/schemas/accountId"
          },
          "resourceUrl": {
            "$ref": "#/components/schemas/resourceUrl"
          },
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BookedChange"
              },
              {
                "type": "object",
                "required": [
                  "previousEffectiveOn"
                ],
                "properties": {
                  "previousEffectiveOn": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date",
                    "description": "The day the change was due on before it was moved, Sydney time; null when it had no day (it was held for Check Networks to check after its day came).",
                    "example": "2026-02-03"
                  }
                }
              }
            ]
          }
        }
      },
      "WebhookExportEvent": {
        "type": "object",
        "description": "The delivery for `export.ready` and `export.failed`: a background export (`POST /exports`) has its file, or could not be written. `data` is the export as `GET /exports/{exportId}` shows it, without the download link; `resourceUrl` is that read, which hands out a fresh link.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "export.ready",
              "export.failed"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "apiVersion": {
            "$ref": "#/components/schemas/apiVersion"
          },
          "livemode": {
            "$ref": "#/components/schemas/livemode"
          },
          "test": {
            "$ref": "#/components/schemas/test"
          },
          "accountId": {
            "$ref": "#/components/schemas/accountId"
          },
          "resourceUrl": {
            "$ref": "#/components/schemas/resourceUrl"
          },
          "data": {
            "$ref": "#/components/schemas/ApiExport"
          }
        }
      },
      "WebhookInvoiceEvent": {
        "type": "object",
        "description": "The delivery envelope for the `invoice.*` events. The event type — not a field — carries which one it is; `occurredAt` is when it happened.\n\n`invoice.issued` when an invoice is finalised, `invoice.paid` when it is settled in full, `invoice.voided` when it is cancelled and its charges unwound. A voided invoice is no longer owed — clear it from your receivables rather than carrying it as an open debt. Voiding is idempotent, so the event is emitted once however many times a void is attempted.\n\nPlatform (wholesale) invoices only: your own retail billing is your ledger and never emits here.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "invoice.issued",
              "invoice.paid",
              "invoice.voided"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "apiVersion": {
            "$ref": "#/components/schemas/apiVersion"
          },
          "livemode": {
            "$ref": "#/components/schemas/livemode"
          },
          "test": {
            "$ref": "#/components/schemas/test"
          },
          "accountId": {
            "$ref": "#/components/schemas/accountId"
          },
          "resourceUrl": {
            "$ref": "#/components/schemas/resourceUrl"
          },
          "data": {
            "type": "object",
            "properties": {
              "invoiceId": {
                "type": "string",
                "description": "The invoice's `id`, as `GET /account/invoices` gives it."
              },
              "invoiceNumber": {
                "type": "string",
                "example": "INV-000123"
              },
              "totalExGst": {
                "type": "string",
                "description": "The invoice's own charges without GST, as a dollar string. The same figure as `totalExGst` on `GET /account/invoices`.",
                "example": "100.00"
              },
              "totalGst": {
                "type": "string",
                "description": "The GST on those charges, as the invoice states it.",
                "example": "10.00"
              },
              "totalIncGst": {
                "type": "string",
                "description": "The charges with GST. `totalExGst` plus `totalGst`.",
                "example": "110.00"
              },
              "totalCents": {
                "type": "integer",
                "deprecated": true,
                "description": "Deprecated: use `totalIncGst`. The invoice total in cents (inc. GST), sent for one more release and then removed."
              },
              "currency": {
                "type": "string",
                "example": "AUD"
              },
              "issuedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "dueDate": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date"
              },
              "voidedAt": {
                "type": "string",
                "format": "date-time",
                "description": "When the invoice was cancelled. Present on `invoice.voided` only."
              }
            }
          }
        }
      },
      "WebhookPaymentEvent": {
        "type": "object",
        "description": "The delivery envelope for `payment.succeeded`, `payment.failed` and `payment.reversed`. Every one carries the same keys, whether the money came from a charge against an invoice (`source: charge`) or a credit top-up (`source: topup`, with `paymentId`, `invoiceId` and `invoiceNumber` null). `failureCode` / `failureMessage` are set on `payment.failed` and `payment.reversed` only.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "payment.succeeded",
              "payment.failed",
              "payment.reversed"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "apiVersion": {
            "$ref": "#/components/schemas/apiVersion"
          },
          "livemode": {
            "$ref": "#/components/schemas/livemode"
          },
          "test": {
            "$ref": "#/components/schemas/test"
          },
          "accountId": {
            "$ref": "#/components/schemas/accountId"
          },
          "resourceUrl": {
            "$ref": "#/components/schemas/resourceUrl"
          },
          "data": {
            "type": "object",
            "required": [
              "paymentId",
              "invoiceId",
              "invoiceNumber",
              "amount",
              "currency",
              "gateway",
              "source",
              "failureCode",
              "failureMessage"
            ],
            "properties": {
              "paymentId": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "The payment's `id`, as `GET /account/payments` lists it. Null until the money is in, so on `payment.failed`, and on a top-up."
              },
              "invoiceId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The `id` of the invoice this payment was applied to, as `GET /account/invoices` gives it. Null for a payment not made against an invoice, so on a top-up."
              },
              "invoiceNumber": {
                "type": [
                  "string",
                  "null"
                ],
                "example": "INV-000123"
              },
              "amount": {
                "type": "string",
                "description": "The amount charged, GST-inclusive, as a dollar string. A payment has no GST split of its own: the GST is on the invoices it pays.",
                "example": "110.00"
              },
              "amountCents": {
                "type": "integer",
                "deprecated": true,
                "description": "Deprecated: use `amount`. The charged amount in cents, sent for one more release and then removed."
              },
              "currency": {
                "type": "string",
                "example": "AUD"
              },
              "gateway": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The payment gateway that processed the charge.",
                "example": "ezidebit"
              },
              "source": {
                "type": "string",
                "enum": [
                  "charge",
                  "topup"
                ],
                "description": "`charge`: a stored method charged against an invoice. `topup`: credit bought for the account, with no invoice behind it."
              },
              "failureCode": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "`payment.failed` and `payment.reversed` only: the gateway's decline, error or dishonour code."
              },
              "failureMessage": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "`payment.failed` and `payment.reversed` only: a human-readable reason."
              }
            }
          }
        }
      },
      "WebhookCreditNoteEvent": {
        "type": "object",
        "description": "The delivery envelope for `creditNote.issued`: a credit note we issued against one of your invoices, whether by our staff or as the outcome of a dispute. The credit is on your account balance from that moment. Credit notes you issue to your own end users never send this; they send `endUser.creditNote.issued`.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "creditNote.issued"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "data": {
            "type": "object",
            "required": [
              "creditNoteId",
              "creditNoteNumber",
              "invoiceId",
              "invoiceNumber",
              "totalExGst",
              "totalGst",
              "totalIncGst",
              "currency",
              "issuedAt"
            ],
            "properties": {
              "creditNoteId": {
                "type": "string",
                "description": "The credit note's `id` (a ULID), matching `GET /account/credit-notes`.",
                "example": "01jd3z8b2c4d6f8g0h2j4k6m8n"
              },
              "creditNoteNumber": {
                "type": "string",
                "example": "CN-000045"
              },
              "invoiceId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The `id` (a ULID) of the invoice the credit note corrects, matching `GET /account/invoices`."
              },
              "invoiceNumber": {
                "type": [
                  "string",
                  "null"
                ],
                "example": "INV-000123"
              },
              "totalExGst": {
                "type": "string",
                "description": "The credit without GST, as a dollar string.",
                "example": "20.00"
              },
              "totalGst": {
                "type": "string",
                "description": "The GST credited.",
                "example": "2.00"
              },
              "totalIncGst": {
                "type": "string",
                "description": "The credit with GST. `totalExGst` plus `totalGst`.",
                "example": "22.00"
              },
              "currency": {
                "type": "string",
                "example": "AUD"
              },
              "reason": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Why it was issued, as the credit note states it."
              },
              "issuedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            }
          }
        }
      },
      "WebhookDisputeEvent": {
        "type": "object",
        "description": "The delivery envelope for `dispute.raised` and `dispute.decided`: a dispute on one of our invoices to you, raised by you (in the portal or by API) or by our staff for you. While it is open, the disputed amount is not collected or chased. Disputes your end users raise on your bills to them never send these; they send `endUser.dispute.raised` and `endUser.dispute.decided`.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "dispute.raised",
              "dispute.decided"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "data": {
            "type": "object",
            "required": [
              "disputeId",
              "invoiceId",
              "invoiceNumber",
              "invoiceLineId",
              "amountDisputed",
              "currency"
            ],
            "properties": {
              "disputeId": {
                "type": "string",
                "format": "uuid",
                "description": "The dispute's `id`, matching `GET /account/invoice-disputes`."
              },
              "invoiceId": {
                "type": "string",
                "description": "The disputed invoice's `id` (a ULID), matching the /account/invoices endpoints.",
                "example": "01jd3z6r9k2m4n8p0q5s7t1v3w"
              },
              "invoiceNumber": {
                "type": [
                  "string",
                  "null"
                ],
                "example": "INV-000123"
              },
              "invoiceLineId": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "The line disputed, when the dispute names one, by its public id as the invoice's `lineItems[].id`."
              },
              "amountDisputed": {
                "type": "string",
                "description": "The amount disputed, GST-inclusive as it appears on the invoice, as a dollar string. It has no GST split of its own until it is credited.",
                "example": "55.00"
              },
              "currency": {
                "type": "string",
                "example": "AUD"
              },
              "reason": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "`dispute.raised` only: the reason given."
              },
              "raisedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "`dispute.raised` only."
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "resolved_credited",
                  "resolved_no_change",
                  "rejected"
                ],
                "description": "`dispute.decided` only. `resolved_credited`: a credit note was issued (and `creditNote.issued` sent). `resolved_no_change`: closed with nothing owed either way, such as a withdrawn or duplicate dispute. `rejected`: the charge stands and is collected as normal."
              },
              "amountCreditedExGst": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "`dispute.decided` only: the credit without GST, or null when nothing was credited.",
                "example": "50.00"
              },
              "amountCreditedGst": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "`dispute.decided` only: the GST credited.",
                "example": "5.00"
              },
              "amountCreditedIncGst": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "`dispute.decided` only: the credit with GST.",
                "example": "55.00"
              },
              "creditNoteId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "`dispute.decided` only: the `id` (a ULID) of the credit note issued, when credited."
              },
              "creditNoteNumber": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "`dispute.decided` only."
              },
              "decidedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "`dispute.decided` only."
              }
            }
          }
        }
      },
      "WebhookInvoiceOverdueEvent": {
        "type": "object",
        "description": "The delivery envelope for `invoice.overdue`: one of your invoices past its due date, at the payment reminder we have just sent. One event per overdue invoice the reminder covers, at each of the two reminders (`reminder`, then `warning`), once each per overdue spell. Sent whether or not you receive the overdue emails.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "invoice.overdue"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "data": {
            "type": "object",
            "required": [
              "invoiceId",
              "invoiceNumber",
              "amountDue",
              "currency",
              "dueDate",
              "daysOverdue",
              "reminderStage"
            ],
            "properties": {
              "invoiceId": {
                "type": "string",
                "description": "The invoice's `id` (a ULID), matching the /account/invoices endpoints.",
                "example": "01jd3z6r9k2m4n8p0q5s7t1v3w"
              },
              "invoiceNumber": {
                "type": "string",
                "example": "INV-000123"
              },
              "amountDue": {
                "type": "string",
                "description": "What the reminder asks you to pay on this invoice, GST-inclusive, as a dollar string: the amount due less anything held by an open dispute.",
                "example": "110.00"
              },
              "currency": {
                "type": "string",
                "example": "AUD"
              },
              "dueDate": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date"
              },
              "daysOverdue": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Days past the due date, on the Brisbane calendar.",
                "example": 7
              },
              "reminderStage": {
                "type": "string",
                "enum": [
                  "reminder",
                  "warning"
                ],
                "description": "`reminder`: the first overdue notice. `warning`: the later notice that services may be suspended."
              }
            }
          }
        }
      },
      "WebhookPaymentMethodEvent": {
        "type": "object",
        "description": "The delivery envelope for `paymentMethod.expiring`: a card you pay us with expires soon, so add a new one before it does. Sent once for each expiry date, alongside the email. Your end users' cards never send this.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "paymentMethod.expiring"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "data": {
            "type": "object",
            "required": [
              "paymentMethodId",
              "label",
              "brand",
              "lastFour",
              "expiryMonth",
              "isDefault"
            ],
            "properties": {
              "paymentMethodId": {
                "type": "string",
                "format": "uuid",
                "description": "The card's public id, as `GET /account/payment-methods` returns it."
              },
              "label": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The card as the portal shows it.",
                "example": "Visa ···4242"
              },
              "brand": {
                "type": [
                  "string",
                  "null"
                ],
                "example": "Visa"
              },
              "lastFour": {
                "type": [
                  "string",
                  "null"
                ],
                "example": "4242"
              },
              "expiryMonth": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The last month the card can be charged, as `YYYY-MM`.",
                "example": "2026-12"
              },
              "isDefault": {
                "type": "boolean",
                "description": "Whether it is the card we charge by default."
              }
            }
          }
        }
      },
      "WebhookPriceRiseEvent": {
        "type": "object",
        "description": "The delivery envelope for `priceRise.noticed`: notice that the price of a product you hold goes up, sent with the email once per notice. `changes` lists each rise, with the date it takes effect and the services it reaches, so you can reprice your own end users or pass the notice on.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "priceRise.noticed"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "data": {
            "type": "object",
            "required": [
              "currency",
              "changes"
            ],
            "properties": {
              "currency": {
                "type": "string",
                "example": "AUD"
              },
              "changes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "description": "One rise. A recurring price carries `oldPrice*` and `newPrice*`; a metered price carries `oldUnitPrice*` and `newUnitPrice*`. The side a product is not priced on is null. Unit prices go to 5 decimal places.",
                  "required": [
                    "productId",
                    "productName",
                    "effectiveFrom",
                    "services"
                  ],
                  "properties": {
                    "productId": {
                      "type": "string",
                      "format": "uuid",
                      "description": "The product's public id, as the retail price book returns it."
                    },
                    "productSku": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "productName": {
                      "type": "string"
                    },
                    "effectiveFrom": {
                      "type": "string",
                      "format": "date"
                    },
                    "oldPriceExGst": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "example": "50.00"
                    },
                    "oldPriceGst": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "example": "5.00"
                    },
                    "oldPriceIncGst": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "example": "55.00"
                    },
                    "newPriceExGst": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "example": "55.00"
                    },
                    "newPriceGst": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "example": "5.50"
                    },
                    "newPriceIncGst": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "example": "60.50"
                    },
                    "oldUnitPriceExGst": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "oldUnitPriceGst": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "oldUnitPriceIncGst": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "newUnitPriceExGst": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "newUnitPriceGst": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "newUnitPriceIncGst": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "services": {
                      "type": "array",
                      "description": "The services the rise reaches.",
                      "items": {
                        "type": "object",
                        "required": [
                          "subscriptionId",
                          "serviceType",
                          "serviceId"
                        ],
                        "properties": {
                          "subscriptionId": {
                            "type": "string",
                            "format": "uuid",
                            "description": "The product subscription that is billed, by its public id."
                          },
                          "serviceType": {
                            "type": "string",
                            "enum": [
                              "data",
                              "voice",
                              "other"
                            ]
                          },
                          "serviceId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "A data service's id or a trunk's `sipUsername`, as the service events name them; null for a subscription not tied to one service."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "WebhookCreditEvent": {
        "type": "object",
        "description": "The delivery envelope for `credit.thresholdReached`, `credit.callsBlocked` and `credit.callsRestored`. Credit is checked every minute: credit used is what you owe us plus usage not yet invoiced, and available credit is your credit limit less that. All three figures are without GST, as credit control works them out.\n\nA block stops new outbound calls on your trunks. It never stops a call to 000.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "credit.thresholdReached",
              "credit.callsBlocked",
              "credit.callsRestored"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "data": {
            "type": "object",
            "required": [
              "creditUsed",
              "creditLimit",
              "availableCredit",
              "currency"
            ],
            "properties": {
              "threshold": {
                "type": "integer",
                "description": "`credit.thresholdReached` only: the percentage of your credit limit now used, one of the warning levels you set, or 100 when calls are about to be blocked.",
                "example": 90
              },
              "creditUsed": {
                "type": "string",
                "description": "What you owe plus unbilled usage, without GST, as a dollar string.",
                "example": "4500.00"
              },
              "creditLimit": {
                "type": "string",
                "description": "Your credit limit, without GST.",
                "example": "5000.00"
              },
              "availableCredit": {
                "type": "string",
                "description": "`creditLimit` less `creditUsed`, without GST. Zero or less blocks new calls; it goes below zero when you are over.",
                "example": "500.00"
              },
              "currency": {
                "type": "string",
                "example": "AUD"
              }
            }
          }
        }
      },
      "WebhookUsageThresholdEvent": {
        "type": "object",
        "description": "The delivery envelope for `usage.thresholdReached`: one of your end users' data services has used 50, 85 or 100% of its monthly allowance. Sent once for each of those levels in a month, whether or not the end user could be told (one with no contact details still sends it), while usage notices are on for your account.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "usage.thresholdReached"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "data": {
            "type": "object",
            "required": [
              "serviceId",
              "endUser",
              "percent",
              "usedBytes",
              "allowanceBytes",
              "billingMonth"
            ],
            "properties": {
              "serviceId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The data service's id, as the service events name it."
              },
              "endUser": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The end user's number."
              },
              "percent": {
                "type": "integer",
                "enum": [
                  50,
                  85,
                  100
                ],
                "description": "The level crossed."
              },
              "usedBytes": {
                "type": "integer",
                "description": "Data used this month when it was crossed."
              },
              "allowanceBytes": {
                "type": "integer"
              },
              "billingMonth": {
                "type": "string",
                "description": "The allowance month, `YYYY-MM`, on your account's calendar.",
                "example": "2026-11"
              }
            }
          }
        }
      },
      "WebhookUsageAlertEvent": {
        "type": "object",
        "description": "The delivery envelope for `usageAlert.triggered`: one of the usage alerts you set passed its threshold. Sent once per period (the day for `callSpendToday`, the month otherwise, on the Brisbane calendar our bill runs on), with the email and SMS the alert chose. An alert is a warning only: nothing is blocked.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "usageAlert.triggered"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "data": {
            "type": "object",
            "required": [
              "alertId",
              "metric",
              "trunk",
              "threshold",
              "value",
              "period"
            ],
            "properties": {
              "alertId": {
                "type": "string",
                "format": "uuid",
                "description": "The alert's id, as `GET /account/usage-alerts` lists it."
              },
              "metric": {
                "$ref": "#/components/schemas/UsageAlertMetric"
              },
              "trunk": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The trunk's `sipUsername` when the alert is on one trunk; null for the whole account."
              },
              "threshold": {
                "type": "string",
                "description": "The alert's figure: dollars without GST for a spend metric (\"50.00\"), otherwise a whole number of minutes or messages (\"500\").",
                "example": "50.00"
              },
              "value": {
                "type": "string",
                "description": "The period's usage when the alert fired, in the same unit as `threshold`.",
                "example": "52.40"
              },
              "currency": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "`AUD` for a spend metric, null otherwise."
              },
              "period": {
                "type": "string",
                "description": "The day (`YYYY-MM-DD`) or month (`YYYY-MM`) it fired for.",
                "example": "2026-11-21"
              }
            }
          }
        }
      },
      "WebhookRealmEvent": {
        "description": "The outcome of a PPPoE realm request.",
        "type": "object",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "data.realm.approved",
              "data.realm.rejected"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "apiVersion": {
            "$ref": "#/components/schemas/apiVersion"
          },
          "livemode": {
            "$ref": "#/components/schemas/livemode"
          },
          "test": {
            "$ref": "#/components/schemas/test"
          },
          "accountId": {
            "$ref": "#/components/schemas/accountId"
          },
          "resourceUrl": {
            "$ref": "#/components/schemas/resourceUrl"
          },
          "data": {
            "type": "object",
            "properties": {
              "realm": {
                "type": "string",
                "example": "example.net.au"
              },
              "status": {
                "type": "string",
                "enum": [
                  "Approved",
                  "Rejected"
                ]
              },
              "reason": {
                "type": "string",
                "description": "`data.realm.rejected` only — why the realm was not granted."
              },
              "decidedAt": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "WebhookRadiusSessionEvent": {
        "description": "An Opticomm RADIUS user's session, retrieved from Opticomm.",
        "type": "object",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "data.radius.sessionRetrieved"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "apiVersion": {
            "$ref": "#/components/schemas/apiVersion"
          },
          "livemode": {
            "$ref": "#/components/schemas/livemode"
          },
          "test": {
            "$ref": "#/components/schemas/test"
          },
          "accountId": {
            "$ref": "#/components/schemas/accountId"
          },
          "resourceUrl": {
            "$ref": "#/components/schemas/resourceUrl"
          },
          "data": {
            "type": "object",
            "required": [
              "id",
              "source",
              "online",
              "retrievedAt",
              "session"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "The RADIUS user reference.",
                "example": "USR123456789011"
              },
              "username": {
                "type": [
                  "string",
                  "null"
                ],
                "example": "smith-family@example.net.au"
              },
              "source": {
                "type": "string",
                "enum": [
                  "opticomm"
                ]
              },
              "online": {
                "type": "boolean",
                "description": "Whether Opticomm reported a session up."
              },
              "retrievedAt": {
                "type": "string",
                "format": "date-time",
                "description": "When Opticomm reported it."
              },
              "session": {
                "description": "The current session, as *Retrieve the Current Session* gives it; null when nothing is connected.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/DataRadiusSession"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          }
        }
      },
      "PortStep": {
        "type": "object",
        "description": "A port state as the port webhooks name it.",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/PortState"
          },
          "name": {
            "type": "string",
            "description": "The state's name, as the portal shows it.",
            "example": "PPV Sent"
          }
        }
      },
      "WebhookOrderEvent": {
        "type": "object",
        "description": "The delivery envelope for `order.statusChanged`. `data.from` / `data.to` carry the transition, in the same status words `/data/orders` publishes — an order moving between internal steps that share one published status does not emit, so you get one event per status change rather than one per internal step. A number port (`orderType: numberPort`) is the exception: it emits on every step and on a moved cutover, with the step in `step`.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "order.statusChanged"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "apiVersion": {
            "$ref": "#/components/schemas/apiVersion"
          },
          "livemode": {
            "$ref": "#/components/schemas/livemode"
          },
          "test": {
            "$ref": "#/components/schemas/test"
          },
          "accountId": {
            "$ref": "#/components/schemas/accountId"
          },
          "resourceUrl": {
            "$ref": "#/components/schemas/resourceUrl"
          },
          "data": {
            "type": "object",
            "properties": {
              "orderId": {
                "type": "string",
                "description": "The order's id, matching `/data/orders` and `/data/orders/{orderId}`.",
                "example": "OPO000123456"
              },
              "from": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "InProgress",
                  "Completed",
                  "Failed"
                ],
                "description": "The previous published status, or null when the order had not been published before (a draft order is not visible on `/data/orders`, so its first event has no `from`)."
              },
              "to": {
                "type": "string",
                "enum": [
                  "InProgress",
                  "Completed",
                  "Failed"
                ]
              },
              "statusReason": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Why the order failed. Present only when `to` is `Failed`. On a `numberPort`, why it was rejected, withdrawn or cancelled."
              },
              "portReference": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "On a `numberPort`, the port's own reference, as `GET /ports/{reference}` takes it. Absent on other order types.",
                "example": "LNP-7K2M9Q"
              },
              "step": {
                "description": "On a `numberPort`, the step the port is now at: its real state, as the port read's `state`. Absent on other order types.",
                "$ref": "#/components/schemas/PortStep"
              },
              "previousStep": {
                "description": "On a `numberPort`, the step before this event. The same as `step` when the event is a moved cutover (`scheduledFor` changed).",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/PortStep"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "waitingOn": {
                "$ref": "#/components/schemas/PortWaitingOn"
              },
              "scheduledFor": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "On a `numberPort`, the booked cutover (on a port-out, the agreed date), once there is one."
              },
              "portOutResponseCode": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "On a port `out`, the industry response code we gave the gaining carrier: `000` approved, otherwise why it was refused.",
                "example": "000"
              },
              "orderType": {
                "type": "string",
                "enum": [
                  "data",
                  "numberPort"
                ],
                "default": "data",
                "description": "What kind of order this is. `data` is a carrier connect/disconnect order on `/data/orders`. `numberPort` is a number moving between carriers — see `numbers`, and note that a port OUT reaching `Completed` means the numbers have left you."
              },
              "direction": {
                "type": "string",
                "enum": [
                  "in",
                  "out"
                ],
                "description": "Which way a `numberPort` is moving the numbers. `in` brings them onto your account; `out` takes them off it. Present on `numberPort` only.\n\n**Read this together with `to`.** On an `out` port, `Completed` means the numbers have LEFT you — the opposite of what `Completed` means on every other order. Branch on `direction`, not on the fact that something finished."
              },
              "network": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The carrier delivering the order. Null on a `numberPort`: a port has a losing carrier and a gaining one, and naming either as \"the network\" would be wrong half the time. See `losingCarrier` and `gainingCarrier`.",
                "example": "opticomm"
              },
              "losingCarrier": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Who the numbers are moving FROM, on a `numberPort`. On a port `in` this is the customer's previous provider; on a port `out` it is us. Null when we hold no name for them.",
                "example": "Telstra"
              },
              "gainingCarrier": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Who the numbers are moving TO, on a `numberPort`. On a port `in` this is us. On a port `out` it is **null**: we buy wholesale rather than porting as a carrier, so the receiving carrier reaches us by email and is not recorded — null means we do not know it, not that there isn't one.",
                "example": "Check Networks"
              },
              "orderReference": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Your own reference, as supplied when the order was placed."
              },
              "salesReference": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The same value as `orderReference`, under the name your own reference has on trunks, numbers and services (`externalRef`)."
              },
              "serviceId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The service the order produced, once one exists. Null until the carrier has allocated it — expect it to be populated by the time the order reaches `Completed`. Always null on a `numberPort`, which moves an existing number rather than producing a service."
              },
              "numbers": {
                "type": "array",
                "description": "The numbers on a `numberPort`, in E.164. Absent on other order types.",
                "items": {
                  "type": "string"
                },
                "example": [
                  "61755512345"
                ]
              }
            }
          }
        }
      },
      "WebhookOrderDelayedEvent": {
        "type": "object",
        "description": "The delivery envelope for `order.delayed`: an order held for a later submit time. Sent when the hold starts, when its time changes, and when we hold it for you at its time because it could not be sent (`heldForAction`). Nothing has been sent to the carrier. Once it is sent, `order.statusChanged` follows as for any order; a cancelled held order is announced there under its PND. A booked disconnection never sends this event, and nor does an order you sent that the carrier asked us to try again: that order is in progress, and we resend it ourselves.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "order.delayed"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "apiVersion": {
            "$ref": "#/components/schemas/apiVersion"
          },
          "livemode": {
            "$ref": "#/components/schemas/livemode"
          },
          "test": {
            "$ref": "#/components/schemas/test"
          },
          "accountId": {
            "$ref": "#/components/schemas/accountId"
          },
          "resourceUrl": {
            "$ref": "#/components/schemas/resourceUrl"
          },
          "data": {
            "type": "object",
            "properties": {
              "delayedOrderId": {
                "type": "string",
                "description": "The held order's PND, as /data/orders/delayed and /nbn/orders/delayed name it.",
                "example": "PND000000012345"
              },
              "orderType": {
                "type": "string",
                "enum": [
                  "data"
                ]
              },
              "network": {
                "type": "string",
                "enum": [
                  "nbn",
                  "opticomm"
                ]
              },
              "orderReference": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Your own reference, as supplied when the order was placed."
              },
              "submitDateTime": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When the order will be sent; null while it is held for you."
              },
              "heldForAction": {
                "type": "boolean",
                "description": "True when the order was not sent at its time and needs you: fix the cause and submit it now, give it a new time, or cancel it."
              },
              "heldReason": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Why the order was not sent, while heldForAction is true."
              }
            }
          }
        }
      },
      "WebhookOrderAwaitingEvent": {
        "type": "object",
        "description": "The delivery envelope for `order.appointmentRequired` and `order.ntdFull`: an order you placed with POST /data/orders is waiting for something only you can give. Nothing has been sent to the carrier. Answer it with PATCH /data/orders/{orderId}; an order still waiting after 7 days is cancelled, with `order.statusChanged`.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "order.appointmentRequired",
              "order.ntdFull"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "apiVersion": {
            "$ref": "#/components/schemas/apiVersion"
          },
          "livemode": {
            "$ref": "#/components/schemas/livemode"
          },
          "test": {
            "$ref": "#/components/schemas/test"
          },
          "accountId": {
            "$ref": "#/components/schemas/accountId"
          },
          "resourceUrl": {
            "$ref": "#/components/schemas/resourceUrl"
          },
          "data": {
            "type": "object",
            "properties": {
              "orderId": {
                "type": "string",
                "description": "The order's id until the carrier has it: a Check Networks PND. It keeps finding the order on /data/orders/{orderId} afterwards.",
                "example": "PND000000012345"
              },
              "orderType": {
                "type": "string",
                "enum": [
                  "data"
                ]
              },
              "network": {
                "type": "string",
                "enum": [
                  "nbn",
                  "opticomm"
                ]
              },
              "locationId": {
                "type": "string",
                "description": "The premises the order is for (LOC",
                "example": "LOC000079427928"
              },
              "orderReference": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Your own reference, as supplied when the order was placed."
              },
              "statusReason": {
                "type": "string",
                "description": "What the order needs from you."
              },
              "demandType": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The appointment type a technician visit for this order needs, as the order's timeslots read uses it.",
                "example": "Standard Install"
              },
              "expiresAt": {
                "type": "string",
                "format": "date-time",
                "description": "When the order is cancelled if it is still waiting."
              }
            }
          }
        }
      },
      "WebhookPortActionRequiredEvent": {
        "type": "object",
        "description": "The delivery envelope for `port.actionRequired`: a number port has arrived at a step only you can move. Today that is a mobile port-in waiting for the verification code its number's holder was sent. The same step also arrives as `order.statusChanged`.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "port.actionRequired"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "data": {
            "type": "object",
            "properties": {
              "portReference": {
                "type": "string",
                "description": "The port's reference, as `GET /ports/{reference}` takes it.",
                "example": "LNP-7K2M9Q"
              },
              "orderId": {
                "type": "string",
                "description": "The id `order.statusChanged` names the same port by."
              },
              "direction": {
                "type": "string",
                "enum": [
                  "in",
                  "out"
                ]
              },
              "step": {
                "$ref": "#/components/schemas/PortStep"
              },
              "waitingOn": {
                "type": "string",
                "enum": [
                  "wholesaler"
                ]
              },
              "action": {
                "type": "string",
                "enum": [
                  "enterVerificationCode",
                  "openPort"
                ],
                "description": "What is needed. `enterVerificationCode`: confirm the code with `POST /ports/{reference}/confirm`. `openPort`: read the port for what it needs."
              },
              "actionDescription": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The same, in plain words.",
                "example": "Enter the verification code the number's holder was sent."
              },
              "expiresAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When the verification code lapses (30 minutes after it was sent). A fresh one can be sent with `POST /ports/{reference}/verification-code`."
              },
              "numbers": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "WebhookServiceEvent": {
        "type": "object",
        "description": "The delivery envelope for the `service.*` lifecycle events. The event type — not a field — carries which thing happened; `data.status` is where the service ended up. `data.serviceType` tells you which surface the service belongs to, and therefore how to read `data.serviceId`.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "service.provisioned",
              "service.suspended",
              "service.resumed",
              "service.disconnected"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "apiVersion": {
            "$ref": "#/components/schemas/apiVersion"
          },
          "livemode": {
            "$ref": "#/components/schemas/livemode"
          },
          "test": {
            "$ref": "#/components/schemas/test"
          },
          "accountId": {
            "$ref": "#/components/schemas/accountId"
          },
          "resourceUrl": {
            "$ref": "#/components/schemas/resourceUrl"
          },
          "data": {
            "type": "object",
            "properties": {
              "serviceType": {
                "type": "string",
                "enum": [
                  "data",
                  "voice",
                  "transit",
                  "colocation"
                ],
                "description": "`data` for a data service (NBN, Opticomm), `voice` for a SIP trunk, `transit` for an IP transit circuit, `colocation` for a rack or part-rack with its power."
              },
              "serviceId": {
                "type": "string",
                "description": "How to address the service. For `data`, the service id used by the data endpoints. For `voice`, the trunk's `sipUsername`, or its `id` when it has no SIP credential — never a numeric id. For `transit` and `colocation`, the service's uuid, which is what the portal shows.",
                "example": "AVC000123456789"
              },
              "trunkId": {
                "type": "string",
                "format": "uuid",
                "description": "On a `voice` event only: the trunk's `id`, which every trunk has. Absent for other service types."
              },
              "externalRef": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/ExternalRef"
                  }
                ],
                "description": "On a `data` or `voice` event only, your own reference on the service or trunk."
              },
              "metadata": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Metadata"
                  }
                ],
                "description": "On a `data` or `voice` event only, your own metadata on the service or trunk."
              },
              "status": {
                "type": "string",
                "enum": [
                  "Active",
                  "Live",
                  "Suspended",
                  "Cancelled",
                  "InProgress"
                ],
                "description": "Where the service ended up. `data` and `transit` services report `Live`; `voice` trunks and `colocation` services report `Active`; all four use `Suspended` and `Cancelled`."
              },
              "previousStatus": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Where it was before, or null when the service had no prior state (a newly provisioned service)."
              },
              "reason": {
                "type": "string",
                "enum": [
                  "nonPayment",
                  "fraud",
                  "scam",
                  "customerRequest",
                  "carrier",
                  "staff"
                ],
                "description": "Why it changed. `nonPayment` for a suspension or restore under the payment rules; `fraud` or `scam` for a suspension our staff recorded as fraud or a scam, on you or one of your end users, and for its lift; `customerRequest` for a change you asked for (a disconnect you ordered, a trunk you paused, an agreed hardship pause); `carrier` for one the carrier made, such as a cease we did not order; `staff` for an operator hold or other staff action. A fraud cap on a trunk holds its international calls without changing the service, so it sends no `service.*` event. More values may be added: treat one you do not know as `staff`.",
                "example": "nonPayment"
              },
              "source": {
                "type": "string",
                "enum": [
                  "staff",
                  "wholesaler",
                  "carrier",
                  "system"
                ],
                "description": "Who made the change: our `staff`, you (the `wholesaler`, in the portal or this API), the `carrier`, or the platform itself (`system`, such as the payment reminder ladder).",
                "example": "system"
              },
              "effectiveAt": {
                "type": "string",
                "format": "date-time",
                "description": "When the change took effect."
              }
            }
          }
        }
      },
      "WebhookServiceCeaseScheduledEvent": {
        "description": "The carrier will cease one of your data services on a future date, and you did not ask for it.",
        "type": "object",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "service.ceaseScheduled"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "apiVersion": {
            "$ref": "#/components/schemas/apiVersion"
          },
          "livemode": {
            "$ref": "#/components/schemas/livemode"
          },
          "test": {
            "$ref": "#/components/schemas/test"
          },
          "accountId": {
            "$ref": "#/components/schemas/accountId"
          },
          "resourceUrl": {
            "$ref": "#/components/schemas/resourceUrl"
          },
          "data": {
            "type": "object",
            "required": [
              "serviceType",
              "serviceId",
              "ceaseAt",
              "carrierReference"
            ],
            "properties": {
              "serviceType": {
                "type": "string",
                "enum": [
                  "data"
                ]
              },
              "serviceId": {
                "type": "string",
                "description": "The service id used by the data endpoints.",
                "example": "AVC000123456789"
              },
              "ceaseAt": {
                "type": "string",
                "format": "date-time",
                "description": "When the carrier will cease the service. It stays live, and billed, until then."
              },
              "carrierReference": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The carrier's own reference on its notice (an order id, or Opticomm's product instance id), or null when it gave none.",
                "example": "ORD000000123456"
              }
            }
          }
        }
      },
      "WebhookDiagnosticCompletedEvent": {
        "description": "A line test on one of your data services finished.",
        "type": "object",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "diagnostic.completed"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "apiVersion": {
            "$ref": "#/components/schemas/apiVersion"
          },
          "livemode": {
            "$ref": "#/components/schemas/livemode"
          },
          "test": {
            "$ref": "#/components/schemas/test"
          },
          "accountId": {
            "$ref": "#/components/schemas/accountId"
          },
          "resourceUrl": {
            "$ref": "#/components/schemas/resourceUrl"
          },
          "data": {
            "type": "object",
            "required": [
              "testId",
              "serviceType",
              "serviceId",
              "network",
              "testType",
              "status",
              "result",
              "reason",
              "completedAt"
            ],
            "properties": {
              "testId": {
                "type": "string",
                "description": "The test's reference, as the diagnostics reads take it (`GET /nbn/diagnostics/{testRef}` or `GET /opticomm/diagnostics/{testRef}`).",
                "example": "WRI000000123456"
              },
              "serviceType": {
                "type": "string",
                "enum": [
                  "data"
                ]
              },
              "serviceId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The service id used by the data endpoints.",
                "example": "AVC000123456789"
              },
              "network": {
                "type": "string",
                "enum": [
                  "nbn",
                  "opticomm"
                ],
                "description": "Which network's diagnostics endpoints read the test."
              },
              "testType": {
                "type": "string",
                "description": "The test, by the name the diagnostics reads give it.",
                "example": "NTD Status"
              },
              "status": {
                "type": "string",
                "enum": [
                  "Completed",
                  "Cancelled",
                  "Rejected"
                ],
                "description": "How the test ended."
              },
              "result": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "Passed",
                  "Failed",
                  null
                ],
                "description": "Whether the test passed, or null when there is no pass or fail: a cancelled or rejected test, an inconclusive one, or a result the carrier has not yet given us. Read the test for its measurements."
              },
              "reason": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The carrier's note on the outcome, when it gave one.",
                "example": "Success"
              },
              "completedAt": {
                "type": "string",
                "format": "date-time",
                "description": "When the test finished."
              }
            }
          }
        }
      },
      "WebhookServiceHealthReportReadyEvent": {
        "description": "A service health report on one of your data services is ready.",
        "type": "object",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "serviceHealth.reportReady"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "apiVersion": {
            "$ref": "#/components/schemas/apiVersion"
          },
          "livemode": {
            "$ref": "#/components/schemas/livemode"
          },
          "test": {
            "$ref": "#/components/schemas/test"
          },
          "accountId": {
            "$ref": "#/components/schemas/accountId"
          },
          "resourceUrl": {
            "$ref": "#/components/schemas/resourceUrl"
          },
          "data": {
            "type": "object",
            "required": [
              "reportId",
              "serviceType",
              "serviceId",
              "network",
              "overall",
              "readyAt"
            ],
            "properties": {
              "reportId": {
                "type": "string",
                "description": "The report's reference (HRI #), as the health reads take it (`GET /nbn/service_health/report/{hrId}` or `GET /opticomm/service_health/{hrId}`).",
                "example": "HRI000000123456"
              },
              "serviceType": {
                "type": "string",
                "enum": [
                  "data"
                ]
              },
              "serviceId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The service id used by the data endpoints.",
                "example": "AVC000123456789"
              },
              "network": {
                "type": "string",
                "enum": [
                  "nbn",
                  "opticomm"
                ],
                "description": "Which network's health endpoints read the report."
              },
              "overall": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The report's overall condition as the carrier gives it, such as `Green`, `Amber` or `Red`; null when it gave none.",
                "example": "Green"
              },
              "readyAt": {
                "type": "string",
                "format": "date-time",
                "description": "When the report was stored and became readable."
              }
            }
          }
        }
      },
      "WebhookOntUpgradeCompletedEvent": {
        "description": "An ONT upgrade on one of your Opticomm data services ended.",
        "type": "object",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "ontUpgrade.completed"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "apiVersion": {
            "$ref": "#/components/schemas/apiVersion"
          },
          "livemode": {
            "$ref": "#/components/schemas/livemode"
          },
          "test": {
            "$ref": "#/components/schemas/test"
          },
          "accountId": {
            "$ref": "#/components/schemas/accountId"
          },
          "resourceUrl": {
            "$ref": "#/components/schemas/resourceUrl"
          },
          "data": {
            "type": "object",
            "required": [
              "serviceType",
              "serviceId",
              "succeeded",
              "targetSku",
              "targetSpeed",
              "speedChangeSubmitted",
              "completedAt"
            ],
            "properties": {
              "serviceType": {
                "type": "string",
                "enum": [
                  "data"
                ]
              },
              "serviceId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The service id used by the data endpoints.",
                "example": "OAC000000123456"
              },
              "succeeded": {
                "type": "boolean",
                "description": "Whether the ONT was upgraded. False when the carrier closed the upgrade without doing it; the service is unchanged."
              },
              "targetSku": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The speed asked for with the upgrade, by its SKU, or null when none was recorded.",
                "example": "Opt-WSL3-500-50"
              },
              "targetSpeed": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The same speed, by its name.",
                "example": "Opticomm Home 500/50"
              },
              "speedChangeSubmitted": {
                "type": "boolean",
                "description": "Whether the change to the target speed was submitted after the upgrade. Always false when `succeeded` is false. When the upgrade succeeded but this is false, the change could not be sent yet (most often the site does not offer the speed yet): our staff are told and follow it up, and the service stays on its current speed."
              },
              "completedAt": {
                "type": "string",
                "format": "date-time",
                "description": "When we recorded the outcome."
              }
            }
          }
        }
      },
      "WebhookAppointmentEvent": {
        "type": "object",
        "description": "The delivery envelope for the `appointment.*` events. The event type — not a field — carries which one it is.\n\nCarrier-neutral: an NBN and an Opticomm appointment arrive in the same shape, with `data.network` naming whose technician it is, so you handle appointments once rather than per carrier.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "appointment.booked",
              "appointment.rescheduled",
              "appointment.cancelled"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "apiVersion": {
            "$ref": "#/components/schemas/apiVersion"
          },
          "livemode": {
            "$ref": "#/components/schemas/livemode"
          },
          "test": {
            "$ref": "#/components/schemas/test"
          },
          "accountId": {
            "$ref": "#/components/schemas/accountId"
          },
          "resourceUrl": {
            "$ref": "#/components/schemas/resourceUrl"
          },
          "data": {
            "type": "object",
            "properties": {
              "appointmentId": {
                "type": "string",
                "description": "The carrier's appointment reference, matching the appointment endpoints.",
                "example": "APT000012345678"
              },
              "network": {
                "type": "string",
                "enum": [
                  "nbn",
                  "opticomm"
                ]
              },
              "status": {
                "type": "string",
                "description": "The appointment's status in the words the appointment endpoints publish, never the carrier's raw string.",
                "enum": [
                  "Reserved",
                  "Booked",
                  "InProgress",
                  "Completed",
                  "Incomplete",
                  "Cancelled",
                  "Expired"
                ]
              },
              "previousStatus": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "What it was immediately before this change."
              },
              "slotStart": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The appointment window, relayed as the carrier's own ISO-8601 string with its offset intact — the time your end user was told, not a normalised UTC rendering of it."
              },
              "slotEnd": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "previousSlotStart": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The window this appointment used to hold. Present on `appointment.rescheduled` only, so you can find the booking in your own calendar rather than guessing which one moved."
              },
              "previousSlotEnd": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "orderId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The order the appointment belongs to, in the same reference `/data/orders` publishes. Null for an appointment not yet attached to an order."
              },
              "locationId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The carrier's location identifier for the premises."
              }
            }
          }
        }
      },
      "WebhookOutageData": {
        "type": "object",
        "description": "An unplanned outage in an `outage.*` event: the outage as `GET /outages` publishes it, with `planned` false and `yourAffectedServiceCount` and `yourAffectedServiceTypes` added.",
        "properties": {
          "planned": {
            "type": "boolean",
            "const": false
          },
          "reference": {
            "type": "string",
            "description": "The register reference for this outage."
          },
          "title": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "resolved"
            ]
          },
          "startedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "resolvedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "estimatedRestorationAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "timezone": {
            "type": "string",
            "description": "The zone the timestamps above are rendered in."
          },
          "affectedSuburbs": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "affectedStates": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "affectedPostcodes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "affectedServiceTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "premisesAffected": {
            "type": [
              "integer",
              "null"
            ]
          },
          "responsibleParty": {
            "type": [
              "string",
              "null"
            ]
          },
          "cause": {
            "type": [
              "string",
              "null"
            ],
            "description": "`withheld` where the cause is not disclosable — said explicitly rather than sent as null, so it is not mistaken for missing data."
          },
          "causeNatural": {
            "type": "boolean"
          },
          "additionalInfo": {
            "type": [
              "string",
              "null"
            ]
          },
          "firstPublishedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "lastRectifiedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "yourAffectedServiceCount": {
            "type": "integer",
            "description": "How many of YOUR services fall in the outage's scope — including services attributed to your own retail end-customers, which are yours to relay to. Lets you tell \"one site\" from \"everything you have in that area\" without cross-referencing your inventory."
          },
          "yourAffectedServiceTypes": {
            "type": "array",
            "description": "Which service families of yours are affected.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "WebhookMaintenanceData": {
        "type": "object",
        "description": "Planned maintenance in an `outage.*` event, as the public status page shows it.",
        "required": [
          "planned",
          "reference",
          "title",
          "status",
          "windowStart",
          "windowEnd"
        ],
        "properties": {
          "planned": {
            "type": "boolean",
            "const": true
          },
          "reference": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "scheduled",
              "in_progress",
              "completed",
              "cancelled"
            ]
          },
          "windowStart": {
            "type": "string",
            "format": "date-time"
          },
          "windowEnd": {
            "type": "string",
            "format": "date-time"
          },
          "impact": {
            "type": [
              "string",
              "null"
            ],
            "description": "What customers will notice during the window."
          },
          "area": {
            "type": "string"
          },
          "services": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "description": "The maintenance on the public status page."
          }
        }
      },
      "WebhookOutageEvent": {
        "type": "object",
        "description": "The delivery envelope for the `outage.*` events. The event type — not a field — carries which one it is.\n\n`data` is the same outage body `GET /outages` returns, plus two fields telling you how much of it is yours. You only receive an outage that affects services on your account, matched the same way the read endpoint matches them, so a push and a poll can never disagree about whether you are affected.\n\nOnly reviewed, published register entries are ever sent — an auto-detected outage awaiting staff review is not.\n\nPlanned maintenance is sent on the same three events with `data.planned` true and the maintenance body instead: `outage.opened` when we first send you its notice, `outage.updated` when the window or what we tell customers changes or the work starts, and `outage.closed` when it is completed or cancelled. You receive maintenance whose notice we sent to your account.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "description": "`outage.opened` when an entry reaches the register while still running, `outage.updated` when something a customer would be told changes (the estimated restoration time, the affected area, the cause, the notes), `outage.closed` when services are restored. Notification bookkeeping does not emit — you will not get an `outage.updated` every time we send an email about it.",
            "enum": [
              "outage.opened",
              "outage.updated",
              "outage.closed"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "apiVersion": {
            "$ref": "#/components/schemas/apiVersion"
          },
          "livemode": {
            "$ref": "#/components/schemas/livemode"
          },
          "test": {
            "$ref": "#/components/schemas/test"
          },
          "accountId": {
            "$ref": "#/components/schemas/accountId"
          },
          "resourceUrl": {
            "$ref": "#/components/schemas/resourceUrl"
          },
          "data": {
            "description": "An outage when `planned` is false, planned maintenance when it is true.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/WebhookOutageData"
              },
              {
                "$ref": "#/components/schemas/WebhookMaintenanceData"
              }
            ]
          }
        }
      },
      "WebhookDegradationData": {
        "type": "object",
        "description": "A potential service degradation, as the public status page shows it, plus how many of your data services are at its POIs.",
        "required": [
          "reference",
          "title",
          "status",
          "area",
          "openedAt",
          "url",
          "yourAffectedServiceCount"
        ],
        "properties": {
          "reference": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "resolved"
            ]
          },
          "area": {
            "type": "string",
            "description": "The affected points of interconnect, e.g. `Sandbox (0SND)`."
          },
          "impact": {
            "type": [
              "string",
              "null"
            ],
            "description": "What customers may notice until the capacity is added."
          },
          "openedAt": {
            "type": "string",
            "format": "date-time"
          },
          "expectedResolutionAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When we expect the extra capacity to be in place; null until we have a date."
          },
          "resolvedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "url": {
            "type": "string",
            "description": "The degradation on the public status page."
          },
          "yourAffectedServiceCount": {
            "type": "integer",
            "description": "Your live data services at the affected POIs."
          }
        }
      },
      "WebhookDegradationEvent": {
        "type": "object",
        "description": "The delivery envelope for the `degradation.*` events. The event type — not a field — carries which one it is.\n\nA potential service degradation is not an outage: our interconnect at a POI is busy and the extra capacity is delayed, so data services there may be slower at peak times, but they are not down. You receive one when you have a live data service at one of its POIs.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "description": "`degradation.opened` when we first tell you of it, `degradation.updated` when the expected date or what we tell customers changes, and `degradation.closed` when the capacity has been added.",
            "enum": [
              "degradation.opened",
              "degradation.updated",
              "degradation.closed"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "apiVersion": {
            "$ref": "#/components/schemas/apiVersion"
          },
          "livemode": {
            "$ref": "#/components/schemas/livemode"
          },
          "test": {
            "$ref": "#/components/schemas/test"
          },
          "accountId": {
            "$ref": "#/components/schemas/accountId"
          },
          "resourceUrl": {
            "$ref": "#/components/schemas/resourceUrl"
          },
          "data": {
            "$ref": "#/components/schemas/WebhookDegradationData"
          }
        }
      },
      "WebhookQuoteEvent": {
        "type": "object",
        "description": "The delivery envelope for the `quote.*` events. The event type, not a field, carries which one it is.\n\nEach account linked to the quote is sent its own event, carrying its own `externalId` (the reference it gave when it requested the quote), never another account's.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "quote.completed",
              "quote.actionRequired",
              "quote.closed"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "apiVersion": {
            "$ref": "#/components/schemas/apiVersion"
          },
          "livemode": {
            "$ref": "#/components/schemas/livemode"
          },
          "test": {
            "$ref": "#/components/schemas/test"
          },
          "accountId": {
            "$ref": "#/components/schemas/accountId"
          },
          "resourceUrl": {
            "$ref": "#/components/schemas/resourceUrl"
          },
          "data": {
            "type": "object",
            "required": [
              "quote"
            ],
            "properties": {
              "quote": {
                "$ref": "#/components/schemas/Quote"
              }
            }
          }
        }
      },
      "WebhookTransitBlackholeEvent": {
        "type": "object",
        "description": "The delivery for `transit.blackhole.placed`, `transit.blackhole.released` and `transit.blackhole.expired`.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "transit.blackhole.placed",
              "transit.blackhole.released",
              "transit.blackhole.expired"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "apiVersion": {
            "$ref": "#/components/schemas/apiVersion"
          },
          "livemode": {
            "$ref": "#/components/schemas/livemode"
          },
          "test": {
            "$ref": "#/components/schemas/test"
          },
          "accountId": {
            "$ref": "#/components/schemas/accountId"
          },
          "resourceUrl": {
            "$ref": "#/components/schemas/resourceUrl"
          },
          "data": {
            "$ref": "#/components/schemas/TransitBlackhole"
          }
        }
      },
      "WebhookEndUserSpendEvent": {
        "type": "object",
        "description": "The delivery for `endUser.spendThreshold`.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "endUser.spendThreshold"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EndUserSpend"
              },
              {
                "type": "object",
                "required": [
                  "tier"
                ],
                "properties": {
                  "tier": {
                    "type": "integer",
                    "enum": [
                      50,
                      85,
                      100
                    ],
                    "description": "The tier this event is for. Each is sent once a month."
                  },
                  "endUserName": {
                    "type": "string",
                    "example": "Jane Citizen"
                  }
                }
              }
            ]
          }
        }
      },
      "WebhookEndUserCreditNoteEvent": {
        "type": "object",
        "description": "The delivery envelope for `endUser.creditNote.issued`: a credit note you issued on one of your bills to an end user, by hand, as a service credit or as the outcome of the end user's dispute. It is on the end user's account from that moment. Credit notes we issue to you send `creditNote.issued` instead. Only for an account that bills its end users.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "endUser.creditNote.issued"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "data": {
            "type": "object",
            "required": [
              "creditNoteId",
              "creditNoteNumber",
              "endUser",
              "invoiceId",
              "invoiceNumber",
              "totalExGst",
              "totalGst",
              "totalIncGst",
              "currency",
              "issuedAt"
            ],
            "properties": {
              "creditNoteId": {
                "type": "string",
                "description": "The credit note's `id` (a ULID), matching `GET /end-users/credit-notes/{id}`.",
                "example": "01jd3z8b2c4d6f8g0h2j4k6m8n"
              },
              "creditNoteNumber": {
                "type": "string",
                "example": "CN-000045"
              },
              "endUser": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The end user the credit note is for, by its number.",
                "example": "100245"
              },
              "invoiceId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The `id` (a ULID) of the bill the credit note corrects, matching `GET /end-users/invoices/{id}`.",
                "example": "01jd3z6r9k2m4n8p0q5s7t1v3w"
              },
              "invoiceNumber": {
                "type": [
                  "string",
                  "null"
                ],
                "example": "INV-000123"
              },
              "totalExGst": {
                "type": "string",
                "description": "The credit without GST, as a dollar string.",
                "example": "20.00"
              },
              "totalGst": {
                "type": "string",
                "description": "The GST credited.",
                "example": "2.00"
              },
              "totalIncGst": {
                "type": "string",
                "description": "The credit with GST. `totalExGst` plus `totalGst`.",
                "example": "22.00"
              },
              "currency": {
                "type": "string",
                "example": "AUD"
              },
              "reason": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Why it was issued, as the credit note states it."
              },
              "issuedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            }
          }
        }
      },
      "WebhookEndUserDisputeEvent": {
        "type": "object",
        "description": "The delivery envelope for `endUser.dispute.raised` and `endUser.dispute.decided`: a dispute an end user raised on one of your bills to them, from their portal, and your decision on it (in the portal or by API). While it is open, the disputed amount is not chased. Disputes on our invoices to you send `dispute.raised` and `dispute.decided` instead. Only for an account that bills its end users.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "endUser.dispute.raised",
              "endUser.dispute.decided"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "data": {
            "type": "object",
            "required": [
              "disputeId",
              "endUser",
              "invoiceId",
              "invoiceNumber",
              "invoiceLineId",
              "amountDisputed",
              "currency"
            ],
            "properties": {
              "disputeId": {
                "type": "string",
                "format": "uuid",
                "description": "The dispute's `id`, matching `GET /end-users/disputes/{id}`.",
                "example": "3f6c2a9e-8b1d-4c7a-9e2f-5d4b3a2c1e0f"
              },
              "endUser": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The end user who raised it, by its number.",
                "example": "100245"
              },
              "invoiceId": {
                "type": "string",
                "description": "The disputed bill's `id` (a ULID), matching `GET /end-users/invoices/{id}`.",
                "example": "01jd3z6r9k2m4n8p0q5s7t1v3w"
              },
              "invoiceNumber": {
                "type": [
                  "string",
                  "null"
                ],
                "example": "INV-000123"
              },
              "invoiceLineId": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "The line disputed, when the dispute names one, by its public id."
              },
              "amountDisputed": {
                "type": "string",
                "description": "The amount disputed, GST-inclusive as it appears on the bill, as a dollar string. It has no GST split of its own until it is credited.",
                "example": "55.00"
              },
              "currency": {
                "type": "string",
                "example": "AUD"
              },
              "reason": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "`endUser.dispute.raised` only: the reason the end user gave."
              },
              "raisedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "`endUser.dispute.raised` only."
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "resolved_credited",
                  "resolved_no_change",
                  "rejected"
                ],
                "description": "`endUser.dispute.decided` only. `resolved_credited`: a credit note was issued to the end user (and `endUser.creditNote.issued` sent). `resolved_no_change`: closed with nothing owed either way. `rejected`: the charge stands and is chased as normal."
              },
              "amountCreditedExGst": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "`endUser.dispute.decided` only: the credit without GST, or null when nothing was credited.",
                "example": "50.00"
              },
              "amountCreditedGst": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "`endUser.dispute.decided` only: the GST credited.",
                "example": "5.00"
              },
              "amountCreditedIncGst": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "`endUser.dispute.decided` only: the credit with GST.",
                "example": "55.00"
              },
              "creditNoteId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "`endUser.dispute.decided` only: the credit note issued, when credited."
              },
              "creditNoteNumber": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "`endUser.dispute.decided` only."
              },
              "decidedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "`endUser.dispute.decided` only."
              }
            }
          }
        }
      },
      "WebhookSmsEvent": {
        "type": "object",
        "description": "The delivery for `sms.received`, `sms.delivered` and `sms.failed`.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "sms.received",
              "sms.delivered",
              "sms.failed"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "data": {
            "type": "object",
            "required": [
              "messageId",
              "direction",
              "from",
              "to",
              "status",
              "statusReason",
              "sentAt",
              "at"
            ],
            "properties": {
              "messageId": {
                "type": "string",
                "format": "uuid",
                "description": "The message's id: `messageId` from `POST /sms`, and the id `GET /sms/messages/{messageId}` reads."
              },
              "direction": {
                "type": "string",
                "enum": [
                  "inbound",
                  "outbound"
                ]
              },
              "from": {
                "type": "string",
                "description": "The sender, a number in E.164 format or a sender ID."
              },
              "to": {
                "type": "string",
                "description": "The recipient number in E.164 format."
              },
              "status": {
                "type": "string",
                "enum": [
                  "delivered",
                  "failed",
                  "pending"
                ],
                "description": "As `GET /sms/messages/{messageId}` reports it."
              },
              "statusReason": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Present where the status alone is ambiguous, else null."
              },
              "sentAt": {
                "type": "string",
                "format": "date-time",
                "description": "When the message was sent or received."
              },
              "at": {
                "type": "string",
                "format": "date-time",
                "description": "When it arrived, or when the delivery receipt settled it."
              },
              "message": {
                "type": "string",
                "description": "The text. In `sms.received` only."
              },
              "failureReason": {
                "type": "string",
                "description": "Why it was not delivered. In `sms.failed` only.",
                "example": "Handset unreachable."
              }
            }
          }
        }
      },
      "WebhookFaxEvent": {
        "type": "object",
        "description": "The delivery for `fax.received`, `fax.sent` and `fax.failed`. Metadata only: never the document or a link to it.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — one emit shares one id across all your endpoints, so use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "fax.received",
              "fax.sent",
              "fax.failed"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "data": {
            "type": "object",
            "required": [
              "faxId",
              "direction",
              "number",
              "remoteNumber",
              "pages",
              "faxPlanId",
              "status",
              "failureReason",
              "at"
            ],
            "properties": {
              "faxId": {
                "type": "string",
                "format": "uuid",
                "description": "The fax's id, as `GET /fax/documents/{id}` reads it."
              },
              "direction": {
                "type": "string",
                "enum": [
                  "inbound",
                  "outbound"
                ]
              },
              "number": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Your number the fax was received on or sent from.",
                "example": "61299999999"
              },
              "remoteNumber": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The other party's number, when known.",
                "example": "61288887777"
              },
              "pages": {
                "type": "integer"
              },
              "faxPlanId": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "The fax plan a sent fax went out under, or the plan the receiving number is on. Null when there is none."
              },
              "status": {
                "type": "string",
                "description": "`sent` or `failed` for a sent fax. For one received: `delivered` (kept for the portal), `emailed`, or `failed` (it could not be passed on; `failureReason` says why).",
                "example": "sent"
              },
              "failureReason": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Why it failed; null otherwise."
              },
              "at": {
                "type": "string",
                "format": "date-time",
                "description": "When the fax was received or sent."
              }
            }
          }
        }
      },
      "WebhookAccountEvent": {
        "type": "object",
        "description": "The delivery envelope for `account.suspended` and `account.reinstated`: your own account. While it is suspended, writes through this API answer `403`; webhooks keep coming.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "account.suspended",
              "account.reinstated"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "apiVersion": {
            "$ref": "#/components/schemas/apiVersion"
          },
          "livemode": {
            "$ref": "#/components/schemas/livemode"
          },
          "test": {
            "$ref": "#/components/schemas/test"
          },
          "accountId": {
            "$ref": "#/components/schemas/accountId"
          },
          "resourceUrl": {
            "$ref": "#/components/schemas/resourceUrl"
          },
          "data": {
            "type": "object",
            "required": [
              "accountId",
              "status"
            ],
            "properties": {
              "accountId": {
                "type": "string",
                "description": "Your account, as `clientNumber` on `GET /account`.",
                "example": "840100"
              },
              "status": {
                "type": "string",
                "enum": [
                  "Suspended",
                  "Active"
                ],
                "description": "Where the account ended up."
              },
              "reason": {
                "type": "string",
                "description": "On `account.suspended`, the reason we gave you by email.",
                "example": "Overdue invoices"
              },
              "suspendedAt": {
                "type": "string",
                "format": "date-time",
                "description": "On `account.suspended`, when it was suspended."
              },
              "reinstatedAt": {
                "type": "string",
                "format": "date-time",
                "description": "On `account.reinstated`, when it was reinstated."
              }
            }
          }
        }
      },
      "WebhookEndUserEvent": {
        "type": "object",
        "description": "The delivery envelope for the `endUser.*` events. Light by design: it names the end user and what changed, not the new values, so read the end user to sync it (`data.full` is always `false`). For an end user under a safety flag, the reference and the names of changed contact fields are withheld, as the portal withholds them, and `data.detailsWithheld` is `true`.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "endUser.created",
              "endUser.updated",
              "endUser.suspended",
              "endUser.reactivated"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "apiVersion": {
            "$ref": "#/components/schemas/apiVersion"
          },
          "livemode": {
            "$ref": "#/components/schemas/livemode"
          },
          "test": {
            "$ref": "#/components/schemas/test"
          },
          "accountId": {
            "$ref": "#/components/schemas/accountId"
          },
          "resourceUrl": {
            "$ref": "#/components/schemas/resourceUrl"
          },
          "data": {
            "type": "object",
            "required": [
              "endUserId",
              "changedAt",
              "full",
              "detailsWithheld"
            ],
            "properties": {
              "endUserId": {
                "type": "string",
                "description": "The end user's number.",
                "example": "500001"
              },
              "reference": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Your own reference for the end user, or null when it has none or it is withheld.",
                "example": "CRM-1042"
              },
              "changedFields": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "On `endUser.updated`, the names of the fields that changed, such as `name` or `billingEmail`. The values are not sent.",
                "example": [
                  "name",
                  "billingEmail"
                ]
              },
              "changedAt": {
                "type": "string",
                "format": "date-time"
              },
              "full": {
                "type": "boolean",
                "description": "Always `false`. The event is a pointer; read the end user for its details."
              },
              "detailsWithheld": {
                "type": "boolean",
                "description": "`true` when the end user is under a safety flag and contact details are withheld."
              }
            }
          }
        }
      },
      "WebhookEndpointDisabledEvent": {
        "type": "object",
        "description": "The delivery envelope for `webhook.endpointDisabled`: another of your endpoints was turned off after 20 dead deliveries in a row. Sent to your other endpoints that take it, never to the one turned off.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "webhook.endpointDisabled"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "apiVersion": {
            "$ref": "#/components/schemas/apiVersion"
          },
          "livemode": {
            "$ref": "#/components/schemas/livemode"
          },
          "test": {
            "$ref": "#/components/schemas/test"
          },
          "accountId": {
            "$ref": "#/components/schemas/accountId"
          },
          "resourceUrl": {
            "$ref": "#/components/schemas/resourceUrl"
          },
          "data": {
            "type": "object",
            "required": [
              "webhookId",
              "url",
              "consecutiveFailures",
              "disabledAt"
            ],
            "properties": {
              "webhookId": {
                "type": "string",
                "format": "uuid",
                "description": "The endpoint turned off: its public id, as `GET /webhooks` names it and `GET /webhooks/{webhookId}` takes it.",
                "example": "3f2c8a1e-6b4d-4c9a-8e7f-1a2b3c4d5e6f"
              },
              "url": {
                "type": "string",
                "format": "uri",
                "example": "https://example.com/hooks/checknetworks"
              },
              "lastError": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Why its last delivery failed.",
                "example": "Endpoint answered HTTP 503."
              },
              "consecutiveFailures": {
                "type": "integer",
                "example": 20
              },
              "disabledAt": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "WebhookDelegationEvent": {
        "type": "object",
        "description": "The delivery envelope for `delegation.used`: a person you handed one step to by a one-use link (`POST /ports/{reference}/delegations`, `POST /data/orders/{orderId}/delegations`) passed the email code and did the step. Sent once per link. Read the port or the order for its new state.",
        "required": [
          "eventId",
          "eventType",
          "occurredAt",
          "sequence",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per emitted event — use it to deduplicate."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "delegation.used"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "$ref": "#/components/schemas/sequence"
          },
          "apiVersion": {
            "$ref": "#/components/schemas/apiVersion"
          },
          "livemode": {
            "$ref": "#/components/schemas/livemode"
          },
          "test": {
            "$ref": "#/components/schemas/test"
          },
          "accountId": {
            "$ref": "#/components/schemas/accountId"
          },
          "resourceUrl": {
            "$ref": "#/components/schemas/resourceUrl"
          },
          "data": {
            "type": "object",
            "required": [
              "delegationId",
              "action",
              "portReference",
              "orderId",
              "usedAt"
            ],
            "properties": {
              "delegationId": {
                "type": "string",
                "format": "uuid",
                "description": "The delegation's id, as the delegation calls give it."
              },
              "action": {
                "type": "string",
                "enum": [
                  "confirmPort",
                  "pickAppointment",
                  "confirmAuthority"
                ],
                "description": "The step that was done."
              },
              "portReference": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The port's reference, for `confirmPort` and `confirmAuthority`; null otherwise.",
                "example": "LNP-7K2M9Q"
              },
              "orderId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The data order's id, for `pickAppointment`; null otherwise.",
                "example": "ORD000000000123"
              },
              "usedAt": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      }
    },
    "responses": {
      "MethodNotAllowed": {
        "x-summary": "Method Not Allowed",
        "description": "The path exists, but doesn't accept this HTTP method.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "status": 405,
                "code": "method_not_allowed",
                "reason": "Method Not Allowed"
              }
            }
          }
        }
      },
      "TooManyRequests": {
        "x-summary": "Too Many Requests",
        "description": "Over a rate limit (see Rate Limits): the call's own, its API Client's or its account's. Wait for `Retry-After` seconds.",
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait before retrying. On every `429`.",
            "schema": {
              "type": "integer"
            }
          },
          "X-RateLimit-Limit": {
            "description": "The calls the limit that refused this one allows in its minute.",
            "schema": {
              "type": "integer"
            }
          },
          "X-RateLimit-Remaining": {
            "description": "The calls left under that limit; `0` here.",
            "schema": {
              "type": "integer"
            }
          },
          "X-RateLimit-Reset": {
            "description": "When that limit starts again, as a Unix time.",
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "status": 429,
                "code": "rate_limited",
                "reason": "Too many requests."
              }
            }
          }
        }
      },
      "InternalServerError": {
        "x-summary": "Internal Server Error",
        "description": "Something failed on our side. If it persists, contact Support with the `CN-Message-Id`.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "status": 500,
                "code": "server_error",
                "reason": "Internal server error."
              }
            }
          }
        }
      },
      "ServiceUnavailable": {
        "x-summary": "Service Unavailable",
        "description": "We, or the carrier's system, are briefly unavailable. Retry shortly.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "status": 503,
                "code": "service_unavailable",
                "reason": "Service unavailable."
              }
            }
          }
        }
      },
      "Unauthorized": {
        "x-summary": "Unauthorized",
        "description": "The access token is missing, expired or invalid.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "status": 401,
                "code": "unauthenticated",
                "reason": "Unauthorized."
              }
            }
          }
        }
      },
      "Forbidden": {
        "x-summary": "Forbidden",
        "description": "Your token doesn't carry the scope this endpoint needs.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "status": 403,
                "code": "forbidden",
                "reason": "Forbidden."
              }
            }
          }
        }
      },
      "UnprocessableEntity": {
        "x-summary": "Unprocessable Entity",
        "description": "The request failed validation. `fields` names each input that was wrong.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "status": 422,
                "code": "validation_failed",
                "reason": "The location id field is required.",
                "fields": [
                  {
                    "field": "locationId",
                    "reason": "The location id field is required."
                  }
                ]
              }
            }
          }
        }
      },
      "BadRequest": {
        "x-summary": "Bad Request",
        "description": "The request was malformed or had invalid parameters, or the carrier refused it. For a carrier refusal, `code` says which and `carrierCode` holds the carrier's own code.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "invalid": {
                "summary": "Our own check refused the request",
                "value": {
                  "error": {
                    "status": 400,
                    "code": "bad_request",
                    "reason": "Invalid request."
                  }
                }
              },
              "carrier": {
                "summary": "The carrier refused the request",
                "value": {
                  "error": {
                    "status": 400,
                    "code": "carrier_bad_request",
                    "reason": "The provided AVC does not exist",
                    "carrierCode": "RJ002003"
                  }
                }
              }
            }
          }
        }
      },
      "NotFound": {
        "x-summary": "Not Found",
        "description": "Nothing by that identifier exists on your account.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "status": 404,
                "code": "not_found",
                "reason": "Resource not found."
              }
            }
          }
        }
      },
      "Conflict": {
        "x-summary": "Conflict",
        "description": "The resource isn't in a state that allows this right now.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "status": 409,
                "code": "conflict",
                "reason": "Satisfaction has already been submitted for this ticket."
              }
            }
          }
        }
      },
      "BadGateway": {
        "x-summary": "Bad Gateway",
        "description": "We couldn't reach the carrier, and the request was not processed. Retry shortly.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "status": 502,
                "code": "carrier_unavailable",
                "reason": "Carrier Integration Is Temporarily Unavailable"
              }
            }
          }
        }
      },
      "DataRadiusRetrieving": {
        "description": "Retrieving. The service is on Opticomm's RADIUS, and Opticomm gives its sessions only as a diagnostic result that arrives a minute or two after we ask. A session check is on its way.\n\nAsk again after `Retry-After` seconds; reading never asks Opticomm again. Or subscribe to `data.radius.sessionRetrieved`, which carries the answer when it arrives. If Opticomm never answers, a new `POST /data/radius/{ref}/session-check` after five minutes asks again.",
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait before asking again.",
            "schema": {
              "type": "integer",
              "example": 60
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "result"
              ],
              "properties": {
                "result": {
                  "type": "object",
                  "required": [
                    "id",
                    "source",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "USR123456789011"
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "opticomm"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "Retrieving"
                      ]
                    },
                    "testId": {
                      "type": "string",
                      "description": "On `POST /data/radius/{ref}/session-check` only: the Session History test's reference. Absent when the test was started elsewhere and is not yet known here.",
                      "example": "OTR000000004692"
                    },
                    "message": {
                      "type": "string",
                      "example": "We are retrieving this session from Opticomm. Check again in a minute or two, or subscribe to the data.radius.sessionRetrieved webhook to be told when it arrives."
                    }
                  }
                }
              }
            }
          }
        }
      },
      "NotImplemented": {
        "x-summary": "Not Implemented",
        "description": "This endpoint is Coming Soon and not yet available.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "status": 501,
                "code": "not_implemented",
                "reason": "Not implemented."
              }
            }
          }
        }
      },
      "NotInSandbox": {
        "x-summary": "Not Available In The Sandbox",
        "description": "Answered only by the API sandbox (`api.checknetworks.dev`): this call acts on our live network, which the sandbox never reaches. Production never answers it.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "status": 501,
                "code": "not_implemented",
                "reason": "Not available in the sandbox."
              }
            }
          }
        }
      },
      "TicketResult": {
        "x-summary": "OK",
        "description": "The ticket as it now stands.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "result"
              ],
              "properties": {
                "result": {
                  "$ref": "#/components/schemas/Ticket"
                }
              }
            }
          }
        }
      },
      "EndUserSafetyRecordResult": {
        "description": "The safety record.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "result": {
                  "$ref": "#/components/schemas/EndUserSafetyRecord"
                }
              }
            }
          }
        }
      },
      "EndUserResult": {
        "x-summary": "OK",
        "description": "The end user, as it now stands.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "result": {
                  "$ref": "#/components/schemas/EndUser"
                }
              }
            }
          }
        }
      },
      "PortResult": {
        "description": "The port, as `GET /ports/{reference}` reads it.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "result"
              ],
              "properties": {
                "result": {
                  "$ref": "#/components/schemas/PortOrder"
                }
              }
            }
          }
        }
      },
      "StepDelegationResult": {
        "x-summary": "Success",
        "description": "The delegation.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "result"
              ],
              "properties": {
                "result": {
                  "$ref": "#/components/schemas/StepDelegation"
                }
              }
            }
          }
        }
      }
    },
    "parameters": {
      "Page": {
        "name": "page",
        "in": "query",
        "required": false,
        "description": "The page to return, from `1`. A value that is not a whole number of at least 1 is refused with `422 - validation_failed` naming `page`, never changed.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "default": 1
        }
      },
      "PerPage": {
        "name": "perPage",
        "in": "query",
        "required": false,
        "description": "Rows per page: a whole number from `1` to `200`, `50` when left out. A value outside that range, or not a whole number, is refused with `422 - validation_failed` naming `perPage`, never reduced or rounded.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 200,
          "default": 50
        }
      },
      "Cursor": {
        "name": "cursor",
        "in": "query",
        "required": false,
        "description": "The `nextCursor` of the previous page. Walks the list newest first from where that page ended, so a row added meanwhile is neither repeated nor skipped. A cursor page carries `perPage`, `nextCursor` and `results` only; `page` is ignored. A cursor this list did not issue, or one sent with `sort`, is refused with `422 - validation_failed`.",
        "schema": {
          "type": "string"
        }
      },
      "Q": {
        "name": "q",
        "in": "query",
        "required": false,
        "description": "Search: rows whose searchable fields contain this text, ignoring case. Each list's description names the fields it searches. At most 100 characters; a longer value is refused with `422 - validation_failed`.",
        "schema": {
          "type": "string",
          "maxLength": 100
        }
      },
      "UpdatedSince": {
        "name": "updatedSince",
        "in": "query",
        "required": false,
        "description": "Only rows changed at or after this time: an ISO 8601 date or date-time, such as `2026-11-01` or `2026-11-01T09:00:00Z`. A date alone means the start of that day (UTC). A value that is not ISO 8601 is refused with `422 - validation_failed`.",
        "schema": {
          "type": "string"
        },
        "example": "2026-11-01T09:00:00Z"
      },
      "CreatedFrom": {
        "name": "createdFrom",
        "in": "query",
        "required": false,
        "description": "Only rows created at or after this time: an ISO 8601 date or date-time. A date alone means the start of that day (UTC). A value that is not ISO 8601 is refused with `422 - validation_failed`.",
        "schema": {
          "type": "string"
        },
        "example": "2026-11-01"
      },
      "CreatedTo": {
        "name": "createdTo",
        "in": "query",
        "required": false,
        "description": "Only rows created at or before this time: an ISO 8601 date or date-time. A date alone includes the whole of that day (UTC). A value that is not ISO 8601 is refused with `422 - validation_failed`.",
        "schema": {
          "type": "string"
        },
        "example": "2026-11-30"
      },
      "IdempotencyKeyRequired": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": true,
        "description": "**Required.** A unique value for this operation, such as a UUID, so that retrying it never does the work twice. Without it the request answers `400`. Sending the same key and the same request again returns the stored response with `Idempotent-Replayed: true`. See Idempotency, above.",
        "schema": {
          "type": "string",
          "maxLength": 255
        },
        "example": "1f8e6b1a-9c4d-4a2e-8b3a-2f6d0c9e7a51"
      },
      "IdempotencyKeyOptional": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": false,
        "description": "Optional. A unique value for this operation, such as a UUID, so that retrying it never does the work twice. Sending the same key and the same request again returns the stored response with `Idempotent-Replayed: true`. See Idempotency, above.",
        "schema": {
          "type": "string",
          "maxLength": 255
        },
        "example": "1f8e6b1a-9c4d-4a2e-8b3a-2f6d0c9e7a51"
      },
      "Tag": {
        "name": "tag",
        "in": "query",
        "required": false,
        "description": "Only rows carrying this tag, matched whole, ignoring case. Repeat it (`tag=Site%2012&tag=Brisbane`, or `tag[]=`) and a row must carry every one. A tag may hold a comma, so values are never split. A blank tag, or one over 255 characters, is `422`.",
        "style": "form",
        "explode": true,
        "schema": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 255
          }
        },
        "example": [
          "Site 12"
        ]
      },
      "ExternalRef": {
        "name": "externalRef",
        "in": "query",
        "required": false,
        "description": "Only the object holding this `externalRef`, matched exactly (case counts). Up to 64 letters, digits, `_`, `.` or `-`; another value is refused with `422 - validation_failed`. A reference no object holds gives an empty list.",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 64,
          "pattern": "^[A-Za-z0-9_.\\-]+$"
        }
      },
      "NbnProductType": {
        "name": "productType",
        "in": "query",
        "required": false,
        "description": "(Optional) Only the products of this traffic class, as each product's own `productType` shows it: `EE` for Enterprise Ethernet, `TC4` for every other product. Any other value is `400`: `TC1` and `TC2`, which no product reports, and a product family, which is filtered with `techType`.",
        "schema": {
          "type": "string",
          "enum": [
            "TC4",
            "EE"
          ]
        }
      },
      "NbnTechType": {
        "name": "techType",
        "in": "query",
        "required": false,
        "description": "(Optional) Only the products of this product family, as each product's `technology` shows it: `NFAS` (fibre), `NCAS` (copper), `NWAS` (fixed wireless), `NHAS` (HFC), `NSAS` (satellite) or `EEAS` (Enterprise Ethernet). Any other value is `400`.",
        "schema": {
          "type": "string",
          "enum": [
            "NFAS",
            "NCAS",
            "NWAS",
            "NHAS",
            "NSAS",
            "EEAS"
          ]
        }
      },
      "SmsFrom": {
        "name": "from",
        "in": "query",
        "required": false,
        "description": "(Optional) Only messages sent on or after this time (ISO 8601). A date alone means the start of that day. An invalid value returns `422`.",
        "schema": {
          "type": "string"
        },
        "example": "2026-10-01"
      },
      "SmsTo": {
        "name": "to",
        "in": "query",
        "required": false,
        "description": "(Optional) Only messages sent on or before this time (ISO 8601). A date alone means the end of that day, so the day is included. An invalid value returns `422`.",
        "schema": {
          "type": "string"
        },
        "example": "2026-10-31"
      },
      "SmsSearch": {
        "name": "q",
        "in": "query",
        "required": false,
        "description": "(Optional) Only messages whose sender, recipient or text contains this, as the portal's search does.",
        "schema": {
          "type": "string"
        },
        "example": "appointment"
      },
      "SmsStatus": {
        "name": "status",
        "in": "query",
        "required": false,
        "description": "(Optional) Only messages with this `status`. Any other value returns `422`.",
        "schema": {
          "type": "string",
          "enum": [
            "pending",
            "delivered",
            "failed"
          ]
        }
      },
      "SmsExportFormat": {
        "name": "format",
        "in": "query",
        "required": false,
        "description": "Bulk export format. Omit for paged JSON; `csv` or `ndjson` streams every message the other filters match as one download, newest first, and `page`/`perPage` are ignored. Each row has `id`, `sentAt`, `direction`, `from`, `to`, `message`, `parts`, `status` and `statusReason`. An unrecognised value returns `422`.",
        "schema": {
          "type": "string",
          "enum": [
            "csv",
            "ndjson"
          ]
        }
      },
      "IdempotencyKeyDerived": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": false,
        "description": "Recommended. A unique value for this send, such as a UUID, so that retrying it never sends twice. Sending the same key and the same request again returns the stored response with `Idempotent-Replayed: true`. Without it, a key is made from the request and the current minute: the same message from the same sender to the same number from the same API key within that minute is sent once, and the repeat returns the first send's response. See Idempotency, above.",
        "schema": {
          "type": "string",
          "maxLength": 255
        },
        "example": "1f8e6b1a-9c4d-4a2e-8b3a-2f6d0c9e7a51"
      },
      "EndUserPath": {
        "name": "endUser",
        "in": "path",
        "required": true,
        "description": "The end user's number. An end user of another account answers 404, as an unknown number does.",
        "schema": {
          "type": "string"
        },
        "example": "820412"
      },
      "SafetyRecordPath": {
        "name": "recordId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "The safety record's `id`."
      },
      "PortReferencePath": {
        "name": "reference",
        "in": "path",
        "required": true,
        "description": "The port's reference. Another account's port answers 404, as an unknown reference does.",
        "schema": {
          "type": "string"
        },
        "example": "LNP-7K2M9Q"
      },
      "UsageMonth": {
        "name": "month",
        "in": "query",
        "required": false,
        "description": "The month, as `YYYY-MM`: this month (the default) or one of the eleven before it, on your bill's calendar (your account's time zone). Any other month returns `400`.\n",
        "schema": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}$",
          "example": "2026-11"
        }
      },
      "DelegationIdPath": {
        "name": "delegationId",
        "in": "path",
        "required": true,
        "description": "The delegation's id, from its create or list. One on another object answers 404.",
        "schema": {
          "type": "string",
          "format": "uuid"
        },
        "example": "9a7b6c5d-4e3f-4a2b-9c1d-0e8f7a6b5c4d"
      },
      "DataOrderIdPath": {
        "name": "orderId",
        "in": "path",
        "required": true,
        "description": "The order's id, as GET /data/orders gives it (the carrier's, or the PND while it waits for you). Another account's order answers 404.",
        "schema": {
          "type": "string"
        },
        "example": "ORD000000000123"
      }
    },
    "headers": {
      "ApiVersion": {
        "description": "The API version that answered. `2` on every response, from `/v2` and the unprefixed paths alike (see Versioning).",
        "schema": {
          "type": "string",
          "enum": [
            "2"
          ]
        }
      }
    }
  },
  "x-tagGroups": [
    {
      "name": "Wholesale Account",
      "tags": [
        "API",
        "Authentication",
        "Account",
        "Partners",
        "Users",
        "Support Tickets",
        "Network Outages",
        "Watch",
        "Search"
      ]
    },
    {
      "name": "Webhooks",
      "tags": [
        "Webhooks",
        "Webhook Delivery",
        "Webhook Events Account",
        "Webhook Events Tickets",
        "Webhook Events Orders",
        "Webhook Events Services",
        "Webhook Events RADIUS",
        "Webhook Events Outages",
        "Webhook Events Voice",
        "Webhook Events Quotes",
        "Webhook Events Transit",
        "Webhook Events End Users",
        "Webhook Events Usage",
        "Webhook Events SMS",
        "Webhook Events Fax",
        "Webhook Events Delegated Steps"
      ]
    },
    {
      "name": "Data",
      "tags": [
        "Address Search",
        "Data Service Qualification",
        "Data Orders",
        "Data Services",
        "Data Layer 2",
        "Data Provisioning",
        "Data RADIUS",
        "Data Utilisation",
        "Data Bundles",
        "Colocation",
        "VPN"
      ]
    },
    {
      "name": "NBN",
      "tags": [
        "Address",
        "Appointments",
        "Diagnostics",
        "Orders",
        "Orders Delayed",
        "Outage",
        "Planning",
        "Product Inventory",
        "Product Qualification",
        "Provisioning",
        "Quotes",
        "Sales",
        "Service Health",
        "Service Qualification"
      ]
    },
    {
      "name": "Opticomm",
      "tags": [
        "Opticomm Address",
        "Opticomm Service Qualification",
        "Opticomm Orders",
        "Opticomm Product Inventory",
        "Opticomm Provisioning",
        "Opticomm Appointments",
        "Opticomm Diagnostics",
        "Opticomm Service Health",
        "Opticomm Network Outage"
      ]
    },
    {
      "name": "Voice & SMS",
      "tags": [
        "Numbers",
        "Emergency Addresses",
        "SIP Trunks",
        "Fax Plans",
        "Fax",
        "Voice",
        "SMS",
        "Residential Lines",
        "Caller ID Authorisations",
        "Number Ports",
        "Call Recordings"
      ]
    },
    {
      "name": "IP Transit (Not Available Yet)",
      "tags": [
        "IP Transit Blackholes"
      ]
    },
    {
      "name": "End-User Pricing and Settings",
      "tags": [
        "End-User Price Book",
        "End-User Call Plans",
        "End-User Service Billing",
        "End-User Charges",
        "End-User Usage",
        "End-User Spend",
        "End-User Billing Settings"
      ]
    },
    {
      "name": "End-User Invoices and Cases",
      "tags": [
        "End User Billing",
        "End User Cases"
      ]
    },
    {
      "name": "Integrations",
      "tags": [
        "Xero"
      ]
    },
    {
      "name": "End Users",
      "tags": [
        "End Users"
      ]
    },
    {
      "name": "Delegated Steps",
      "tags": [
        "Delegated Steps"
      ]
    }
  ]
}