{
  "openapi": "3.1.1",
  "info": {
    "title": "ImportAlert.API | v1",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.importalert.co.zw/"
    }
  ],
  "paths": {
    "/api/Account/Login": {
      "post": {
        "tags": [
          "Account"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestLoginAccount"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestLoginAccount"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RequestLoginAccount"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfResponseLoginAccount"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfResponseLoginAccount"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfResponseLoginAccount"
                }
              }
            }
          }
        }
      }
    },
    "/api/Account/SignInVerifyCode": {
      "post": {
        "tags": [
          "Account"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestTwoFactorVerify"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestTwoFactorVerify"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RequestTwoFactorVerify"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfResponseLoginAccount"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfResponseLoginAccount"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfResponseLoginAccount"
                }
              }
            }
          }
        }
      }
    },
    "/api/Account/SignInSendCode": {
      "post": {
        "tags": [
          "Account"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestTwoFactorSendCode"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestTwoFactorSendCode"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RequestTwoFactorSendCode"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              }
            }
          }
        }
      }
    },
    "/api/Account/SignInStartTwoFactorSetup": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Authenticator setup during a sign-in that requires it (a job title's rule).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestTwoFactorTicket"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestTwoFactorTicket"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RequestTwoFactorTicket"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfAuthenticatorSetup"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfAuthenticatorSetup"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfAuthenticatorSetup"
                }
              }
            }
          }
        }
      }
    },
    "/api/Account/SignInSendSetupCode": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "A setup code instead of an authenticator app, during a sign-in that requires setup.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestTwoFactorSendCode"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestTwoFactorSendCode"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RequestTwoFactorSendCode"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              }
            }
          }
        }
      }
    },
    "/api/Account/SignInEnableTwoFactor": {
      "post": {
        "tags": [
          "Account"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestTwoFactorEnable"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestTwoFactorEnable"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RequestTwoFactorEnable"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfTwoFactorEnabled"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfTwoFactorEnabled"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfTwoFactorEnabled"
                }
              }
            }
          }
        }
      }
    },
    "/api/Account/GetCurrentUser": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "What the signed-in caller may do, right now.",
        "description": "The Portal polls this so a change to a job title reaches a signed-in user in seconds.\r\nWithout it, the only way to refresh their menus would be to sign out and back in, which\r\nis exactly the problem putting permissions in the token caused.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfResponseLoginAccount"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfResponseLoginAccount"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfResponseLoginAccount"
                }
              }
            }
          }
        }
      }
    },
    "/api/Account/GetMyDetails": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "The caller's own account, for the My account page. Any signed-in user: these are their own\r\ndetails, and a new account with no access profile yet must still be able to see them.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfApplicationUserViewModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfApplicationUserViewModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfApplicationUserViewModel"
                }
              }
            }
          }
        }
      }
    },
    "/api/Account/UpdateMyDetails": {
      "put": {
        "tags": [
          "Account"
        ],
        "summary": "Names, description and phone number of the caller's own account.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestUpdateAccount"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestUpdateAccount"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RequestUpdateAccount"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              }
            }
          }
        }
      }
    },
    "/api/Account/GetMyAccess": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "What the caller may do and why: their access profiles, any direct overrides, and the\r\npermissions in force. Read-only, for the Access tab of My account — \"why can't I see the\r\nUsers page?\" answered without a call to the help desk.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfUserAccessDetail"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfUserAccessDetail"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfUserAccessDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/Account/Logout": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Records a sign-out and ends this session. The Portal calls it on the way out.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              }
            }
          }
        }
      }
    },
    "/api/Account/ChangePassword": {
      "post": {
        "tags": [
          "Account"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestChangePassword"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestChangePassword"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RequestChangePassword"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              }
            }
          }
        }
      }
    },
    "/api/Account/ForgotPassword": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "\"Forgot password?\" Always the same answer, whether or not the address has an account.",
        "description": "Anonymous and rate-limited per IP address (AuthRateLimiter). The identical response is the\r\npoint: a form that says \"no such account\" is a directory of who has one.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestForgotPassword"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestForgotPassword"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RequestForgotPassword"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              }
            }
          }
        }
      }
    },
    "/api/Account/SetPassword": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Sets a password from an emailed link — an invitation, a reset, or an expired password.",
        "description": "Anonymous: the token in the link is the credential. It is single-use (setting the password\r\nrotates the security stamp it is bound to) and expires after `AccountService.LinkLifetime`.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestSetPassword"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestSetPassword"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RequestSetPassword"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              }
            }
          }
        }
      }
    },
    "/api/Account/GetMyTwoFactorStatus": {
      "get": {
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfTwoFactorStatus"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfTwoFactorStatus"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfTwoFactorStatus"
                }
              }
            }
          }
        }
      }
    },
    "/api/Account/StartMyTwoFactorSetup": {
      "post": {
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfAuthenticatorSetup"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfAuthenticatorSetup"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfAuthenticatorSetup"
                }
              }
            }
          }
        }
      }
    },
    "/api/Account/SendMyTwoFactorSetupCode": {
      "post": {
        "tags": [
          "Account"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestTwoFactorSendCode"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestTwoFactorSendCode"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RequestTwoFactorSendCode"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              }
            }
          }
        }
      }
    },
    "/api/Account/EnableMyTwoFactor": {
      "post": {
        "tags": [
          "Account"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestTwoFactorEnable"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestTwoFactorEnable"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RequestTwoFactorEnable"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfTwoFactorEnabled"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfTwoFactorEnabled"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfTwoFactorEnabled"
                }
              }
            }
          }
        }
      }
    },
    "/api/Account/DisableMyTwoFactor": {
      "post": {
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              }
            }
          }
        }
      }
    },
    "/api/Account/RegenerateMyRecoveryCodes": {
      "post": {
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfListOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfListOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfListOfstring"
                }
              }
            }
          }
        }
      }
    },
    "/api/Account/GetMySessions": {
      "get": {
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfUserSessionView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfUserSessionView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfUserSessionView"
                }
              }
            }
          }
        }
      }
    },
    "/api/Account/RevokeMySession/{sessionId}": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Signs one of your own devices out. Its token is refused within seconds.",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              }
            }
          }
        }
      }
    },
    "/api/Account/RevokeAllMySessions": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Signs out everywhere, this device included — the thing to do after a lost laptop.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              }
            }
          }
        }
      }
    },
    "/api/Audit/SearchAuditTrail": {
      "post": {
        "tags": [
          "Audit"
        ],
        "summary": "The audit page's query: filter by date, user, category, action or entity.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AuditSearchRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AuditSearchRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AuditSearchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfAuditSearchResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfAuditSearchResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfAuditSearchResult"
                }
              }
            }
          }
        }
      }
    },
    "/api/Audit/ExportAuditTrail": {
      "post": {
        "tags": [
          "Audit"
        ],
        "summary": "The same search, as a file. Its own permission: a trail in a spreadsheet leaves the system.",
        "parameters": [
          {
            "name": "format",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ExportFormat"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AuditSearchRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AuditSearchRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AuditSearchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Audit/GetEntityHistory/{entityName}/{entityId}": {
      "get": {
        "tags": [
          "Audit"
        ],
        "summary": "Everything that ever happened to one row.",
        "description": "Backs the history tab on a user or a job title — the answer to \"who changed this, and when\".",
        "parameters": [
          {
            "name": "entityName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfAuditLogViewModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfAuditLogViewModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfAuditLogViewModel"
                }
              }
            }
          }
        }
      }
    },
    "/api/Comms/GetAllChannels": {
      "get": {
        "tags": [
          "Comms"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfChannelConfigViewModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfChannelConfigViewModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfChannelConfigViewModel"
                }
              }
            }
          }
        }
      }
    },
    "/api/Comms/GetAllProviders": {
      "get": {
        "tags": [
          "Comms"
        ],
        "summary": "The providers this build carries, and the settings form each one wants.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfProviderDescriptor"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfProviderDescriptor"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfProviderDescriptor"
                }
              }
            }
          }
        }
      }
    },
    "/api/Comms/SaveChannel": {
      "post": {
        "tags": [
          "Comms"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelConfigEdit"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelConfigEdit"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelConfigEdit"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfGuid"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfGuid"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfGuid"
                }
              }
            }
          }
        }
      }
    },
    "/api/Comms/SendTestMessage": {
      "post": {
        "tags": [
          "Comms"
        ],
        "summary": "Sends one message now, outside the queue, to prove a configuration works.",
        "description": "Its own permission rather than riding on ManageConfig: sending a message costs money on\r\ntwo of the channels, and \"can look at the settings\" should not imply \"can send\".",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendTestRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SendTestRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SendTestRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              }
            }
          }
        }
      }
    },
    "/api/Comms/GetAllTemplates": {
      "get": {
        "tags": [
          "Comms"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfMessageTemplateViewModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfMessageTemplateViewModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfMessageTemplateViewModel"
                }
              }
            }
          }
        }
      }
    },
    "/api/Comms/GetTemplateById/{id}": {
      "get": {
        "tags": [
          "Comms"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfMessageTemplateDetail"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfMessageTemplateDetail"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfMessageTemplateDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/Comms/GetNotificationCatalogue": {
      "get": {
        "tags": [
          "Comms"
        ],
        "summary": "The notification types this build defines — what the template grid's rows are.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfNotificationGroup"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfNotificationGroup"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfNotificationGroup"
                }
              }
            }
          }
        }
      }
    },
    "/api/Comms/SaveTemplate": {
      "post": {
        "tags": [
          "Comms"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageTemplateEdit"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageTemplateEdit"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/MessageTemplateEdit"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfGuid"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfGuid"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfGuid"
                }
              }
            }
          }
        }
      }
    },
    "/api/Comms/ResetTemplate/{id}": {
      "post": {
        "tags": [
          "Comms"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              }
            }
          }
        }
      }
    },
    "/api/Comms/PreviewTemplate": {
      "post": {
        "tags": [
          "Comms"
        ],
        "summary": "Renders a template against sample values, for the editor's preview.",
        "description": "Rendered server-side with the same renderer that sends, so what the preview shows is what\r\na recipient gets — including the HTML encoding that only applies to email.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplatePreviewRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplatePreviewRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TemplatePreviewRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfTemplatePreview"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfTemplatePreview"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfTemplatePreview"
                }
              }
            }
          }
        }
      }
    },
    "/api/Comms/SearchMessages": {
      "post": {
        "tags": [
          "Comms"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageLogRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageLogRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/MessageLogRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfMessageLogResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfMessageLogResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfMessageLogResult"
                }
              }
            }
          }
        }
      }
    },
    "/api/Comms/GetMessageStats/{days}": {
      "get": {
        "tags": [
          "Comms"
        ],
        "summary": "Sent, failed and waiting, failure rates and send times over the last 1, 7 or 30 days — the\r\nsummary above the log.",
        "description": "Behind ViewLog, like the log itself: these are the log's own rows, counted. Delivery figures\r\nare operational data, not something every signed-in user needs.",
        "parameters": [
          {
            "name": "days",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfMessageStats"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfMessageStats"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfMessageStats"
                }
              }
            }
          }
        }
      }
    },
    "/api/Comms/GetMessagesByCorrelationId/{correlationId}": {
      "get": {
        "tags": [
          "Comms"
        ],
        "summary": "Every channel of one notification — the expanded row in the log.",
        "parameters": [
          {
            "name": "correlationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfMessageDetail"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfMessageDetail"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfMessageDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/Comms/RetryMessage/{queueId}": {
      "post": {
        "tags": [
          "Comms"
        ],
        "parameters": [
          {
            "name": "queueId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              }
            }
          }
        }
      }
    },
    "/api/Comms/GetMyPreferences": {
      "get": {
        "tags": [
          "Comms"
        ],
        "summary": "The caller's own preferences matrix.",
        "description": "The user id comes from the token, never from the request. An endpoint that took an id would\r\nlet anyone signed in read — and with the matching setter, change — anybody's preferences.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfNotificationPreferences"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfNotificationPreferences"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfNotificationPreferences"
                }
              }
            }
          }
        }
      }
    },
    "/api/Comms/SaveMyPreferences": {
      "post": {
        "tags": [
          "Comms"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PreferenceChange"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PreferenceChange"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PreferenceChange"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              }
            }
          }
        }
      }
    },
    "/api/Comms/StartPhoneVerification": {
      "post": {
        "tags": [
          "Comms"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PhoneVerificationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PhoneVerificationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PhoneVerificationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              }
            }
          }
        }
      }
    },
    "/api/Comms/ConfirmPhoneVerification": {
      "post": {
        "tags": [
          "Comms"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PhoneVerificationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PhoneVerificationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PhoneVerificationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              }
            }
          }
        }
      }
    },
    "/api/Comms/Unsubscribe": {
      "post": {
        "tags": [
          "Comms"
        ],
        "summary": "The unsubscribe link at the bottom of every optional email.",
        "description": "Anonymous on purpose. Somebody who wants to stop receiving mail must not be made to sign in\r\nfirst — that is exactly the friction anti-spam rules exist to remove — so the token itself\r\nis the authorisation: signed, scoped to one user and one channel, and valid for a month.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UnsubscribeRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UnsubscribeRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UnsubscribeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              }
            }
          }
        }
      }
    },
    "/api/Comms/GetMyNotificationSummary": {
      "get": {
        "tags": [
          "Comms"
        ],
        "summary": "The navbar bell: the unread count and the latest few.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfInAppSummary"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfInAppSummary"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfInAppSummary"
                }
              }
            }
          }
        }
      }
    },
    "/api/Comms/GetMyNotifications": {
      "get": {
        "tags": [
          "Comms"
        ],
        "parameters": [
          {
            "name": "unreadOnly",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "take",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfInAppPage"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfInAppPage"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfInAppPage"
                }
              }
            }
          }
        }
      }
    },
    "/api/Comms/MarkMyNotificationRead": {
      "post": {
        "tags": [
          "Comms"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarkReadRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/MarkReadRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/MarkReadRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              }
            }
          }
        }
      }
    },
    "/api/Comms/DeleteMyNotification/{id}": {
      "post": {
        "tags": [
          "Comms"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              }
            }
          }
        }
      }
    },
    "/api/Dashboard/GetDashboard": {
      "get": {
        "tags": [
          "Dashboard"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfDashboardViewModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfDashboardViewModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfDashboardViewModel"
                }
              }
            }
          }
        }
      }
    },
    "/api/ErrorLog/GetErrorGroups": {
      "get": {
        "tags": [
          "ErrorLog"
        ],
        "summary": "One row per fault, most recently seen first, each with its count.",
        "parameters": [
          {
            "name": "skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "take",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "includeResolved",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfErrorGroupPage"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfErrorGroupPage"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfErrorGroupPage"
                }
              }
            }
          }
        }
      }
    },
    "/api/ErrorLog/GetErrorOccurrences/{errorId}": {
      "get": {
        "tags": [
          "ErrorLog"
        ],
        "summary": "Every occurrence of the fault a reference belongs to, newest first — who it happened to, on\r\nwhich request or job run.",
        "parameters": [
          {
            "name": "errorId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfErrorLogViewModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfErrorLogViewModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfErrorLogViewModel"
                }
              }
            }
          }
        }
      }
    },
    "/api/ErrorLog/GetErrorByReference/{errorId}": {
      "get": {
        "tags": [
          "ErrorLog"
        ],
        "summary": "Looks up the reference a user quoted.",
        "description": "The whole reason the short id exists: it is six characters from an unambiguous alphabet,\r\nreadable over a telephone, and it goes straight to the one row.",
        "parameters": [
          {
            "name": "errorId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfErrorLogViewModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfErrorLogViewModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfErrorLogViewModel"
                }
              }
            }
          }
        }
      }
    },
    "/api/ErrorLog/ResolveError": {
      "post": {
        "tags": [
          "ErrorLog"
        ],
        "summary": "Marks a fault, and everything sharing its fingerprint, as dealt with.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResolveErrorRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ResolveErrorRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ResolveErrorRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfint"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfint"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfint"
                }
              }
            }
          }
        }
      }
    },
    "/api/Permission/GetPermissionCatalogue": {
      "get": {
        "tags": [
          "Permission"
        ],
        "summary": "Every permission the system defines, grouped for the editor.",
        "description": "Comes from code, not the database, so it is always exactly what this build enforces.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfPermissionGroup"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfPermissionGroup"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfPermissionGroup"
                }
              }
            }
          }
        }
      }
    },
    "/api/Permission/GetAllJobTitles": {
      "get": {
        "tags": [
          "Permission"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfJobTitleSummary"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfJobTitleSummary"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfJobTitleSummary"
                }
              }
            }
          }
        }
      }
    },
    "/api/Permission/GetJobTitleById/{id}": {
      "get": {
        "tags": [
          "Permission"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfJobTitleDetail"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfJobTitleDetail"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfJobTitleDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/Permission/CreateJobTitle": {
      "post": {
        "tags": [
          "Permission"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestJobTitle"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestJobTitle"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RequestJobTitle"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfGuid"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfGuid"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfGuid"
                }
              }
            }
          }
        }
      }
    },
    "/api/Permission/UpdateJobTitle/{id}": {
      "put": {
        "tags": [
          "Permission"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestJobTitle"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestJobTitle"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RequestJobTitle"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/Permission/DeleteJobTitle/{id}": {
      "delete": {
        "tags": [
          "Permission"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/Permission/SetJobTitlePermissions/{id}": {
      "put": {
        "tags": [
          "Permission"
        ],
        "summary": "Replaces the title's permissions with exactly the set supplied.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestJobTitlePermissions"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestJobTitlePermissions"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RequestJobTitlePermissions"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/Setting/GetAllSettings": {
      "get": {
        "tags": [
          "Setting"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfSettingView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfSettingView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfSettingView"
                }
              }
            }
          }
        }
      }
    },
    "/api/Setting/UpdateSetting": {
      "put": {
        "tags": [
          "Setting"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestUpdateSetting"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestUpdateSetting"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RequestUpdateSetting"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/Setting/ResetSetting/{key}": {
      "delete": {
        "tags": [
          "Setting"
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/Setting/GetMaintenanceStatus": {
      "get": {
        "tags": [
          "Setting"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfMaintenanceView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfMaintenanceView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfMaintenanceView"
                }
              }
            }
          }
        }
      }
    },
    "/api/Setting/SetMaintenanceStatus": {
      "put": {
        "tags": [
          "Setting"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestMaintenance"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestMaintenance"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RequestMaintenance"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfMaintenanceView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfMaintenanceView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfMaintenanceView"
                }
              }
            }
          }
        }
      }
    },
    "/api/System/GetPulse": {
      "get": {
        "tags": [
          "System"
        ],
        "summary": "The one endpoint the Portal polls.",
        "description": "    The Portal layout needs three things on a timer: whether maintenance has started, how many\r\nunread notifications the bell should show, and whether the user's permissions have changed\r\nsince their cookie was written. Three polls would be three timers, three round trips and three\r\nsets of retry behaviour for one piece of screen furniture, so they are one call.\r\n    Anonymous, and answers the maintenance part to anybody. It has to: a signed-out visitor on the\r\nlogin page should still see that the system is closed, and the maintenance middleware lets\r\nthis path through precisely so clients can find that out. The per-user parts are only filled\r\nin for an authenticated caller.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfPulseModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfPulseModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfPulseModel"
                }
              }
            }
          }
        }
      }
    },
    "/api/System/GetSystemInfo": {
      "get": {
        "tags": [
          "System"
        ],
        "summary": "Which build is running, where, against which database, and whether its dependencies answer.",
        "description": "The same checks as `/health`, plus the facts support asks for first. Behind\r\n`Settings.View`: server and database names are not for every signed-in user.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfSystemInfoViewModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfSystemInfoViewModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfSystemInfoViewModel"
                }
              }
            }
          }
        }
      }
    },
    "/api/User/SearchUsers": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "One page of users, optionally narrowed by a search on name, email or phone.",
        "parameters": [
          {
            "name": "Search",
            "in": "query",
            "description": "Matched against email, first name, last name and phone number.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "Take",
            "in": "query",
            "description": "Clamped to 1–200 by the service: it arrives on a query string.",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfUserSearchResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfUserSearchResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfUserSearchResult"
                }
              }
            }
          }
        }
      }
    },
    "/api/User/ExportUsers": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "The user list as a file. Its own permission: the list leaves the system.",
        "parameters": [
          {
            "name": "format",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ExportFormat"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/User/GetUserById/{userId}": {
      "get": {
        "tags": [
          "User"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfApplicationUserViewModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfApplicationUserViewModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfApplicationUserViewModel"
                }
              }
            }
          }
        }
      }
    },
    "/api/User/GetUserAccess/{userId}": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "Everything about one user's access: their job titles, their individual overrides, and the\r\npermissions actually in force with where each one came from.",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfUserAccessDetail"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfUserAccessDetail"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfUserAccessDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/User/GetUserPreferences/{userId}": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "Their notification subscriptions, read-only — the support question \"why didn't they get it?\".",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfNotificationPreferences"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfNotificationPreferences"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfNotificationPreferences"
                }
              }
            }
          }
        }
      }
    },
    "/api/User/GetUserSessions/{userId}": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "Where they are signed in — to confirm a report of a lost device before acting on it.",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfUserSessionView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfUserSessionView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfUserSessionView"
                }
              }
            }
          }
        }
      }
    },
    "/api/User/CreateUser": {
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Creates an account and emails its owner an invitation.",
        "description": "Created without a password; the invitation lets its owner choose one, and following it\r\nconfirms the address. Nobody but the owner ever knows the password.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestRegisterAccount"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestRegisterAccount"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RequestRegisterAccount"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfResponseRegisterAccount"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfResponseRegisterAccount"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfResponseRegisterAccount"
                }
              }
            }
          }
        }
      }
    },
    "/api/User/UpdateUser/{userId}": {
      "put": {
        "tags": [
          "User"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestUpdateAccount"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestUpdateAccount"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RequestUpdateAccount"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              }
            }
          }
        }
      }
    },
    "/api/User/ResendUserInvitation/{userId}": {
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Sends a new invitation to somebody who has not chosen a password yet.",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              }
            }
          }
        }
      }
    },
    "/api/User/ResetUserPassword/{userId}": {
      "post": {
        "tags": [
          "User"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestResetPassword"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestResetPassword"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RequestResetPassword"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              }
            }
          }
        }
      }
    },
    "/api/User/ResetUserTwoFactor/{userId}": {
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Clears their two-factor — a lost phone. They set it up again at next sign-in if a job title requires it.",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              }
            }
          }
        }
      }
    },
    "/api/User/LockUser/{userId}": {
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Locks the account until somebody unlocks it. Its sessions end within about 30 seconds.",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              }
            }
          }
        }
      }
    },
    "/api/User/UnlockUser/{userId}": {
      "post": {
        "tags": [
          "User"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              }
            }
          }
        }
      }
    },
    "/api/User/SignOutUserEverywhere/{userId}": {
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Ends every session they have, without locking them out — a lost laptop reported to the help desk.",
        "description": "Behind `Users.Lock`: it is the lesser of the two (they can sign straight back in), so\r\nwhoever may lock an account may do this.",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              }
            }
          }
        }
      }
    },
    "/api/User/SetUserJobTitles/{userId}": {
      "put": {
        "tags": [
          "User"
        ],
        "summary": "Replaces their job titles with exactly the set supplied.",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestUserJobTitles"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestUserJobTitles"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RequestUserJobTitles"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/User/SetUserPermissionOverride/{userId}": {
      "put": {
        "tags": [
          "User"
        ],
        "summary": "Grants or denies one permission to them alone, outside their job titles.",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestUserPermissionOverride"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestUserPermissionOverride"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RequestUserPermissionOverride"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/User/RemoveUserPermissionOverride/{userId}/{permissionKey}": {
      "delete": {
        "tags": [
          "User"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "permissionKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/Webhook/WhatsAppCallback": {
      "post": {
        "tags": [
          "Webhook"
        ],
        "summary": "Meta WhatsApp Cloud API: statuses (sent, delivered, read, failed) and inbound messages.",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "Webhook"
        ],
        "summary": "Meta's handshake when the callback URL is registered: echoes `hub.challenge` only when\r\n`hub.verify_token` matches the channel's Verify token setting.",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Webhook/SmsCallback": {
      "post": {
        "tags": [
          "Webhook"
        ],
        "summary": "The SMS gateway's delivery receipts and STOP replies.",
        "description": "`// TODO(project):` the SMS provider is a stand-in, so for now this accepts only the\r\nDevelopment-only simulated callback. When you wire in a gateway, register this URL with it\r\nand do the signature check in `SmsProvider.TryParseCallback`.",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Worker/GetAllJobs": {
      "get": {
        "tags": [
          "Worker"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfJobScheduleViewModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfJobScheduleViewModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfJobScheduleViewModel"
                }
              }
            }
          }
        }
      }
    },
    "/api/Worker/GetWorkerStatus": {
      "get": {
        "tags": [
          "Worker"
        ],
        "summary": "When the worker started, when it was last alive, and whether it stopped. Null payload when no\r\nworker has ever run against this database.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfWorkerStatusViewModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfWorkerStatusViewModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfWorkerStatusViewModel"
                }
              }
            }
          }
        }
      }
    },
    "/api/Worker/GetJobHistory/{jobName}": {
      "get": {
        "tags": [
          "Worker"
        ],
        "parameters": [
          {
            "name": "jobName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfJobHistoryViewModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfJobHistoryViewModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfJobHistoryViewModel"
                }
              }
            }
          }
        }
      }
    },
    "/api/Worker/TriggerJob/{jobName}": {
      "post": {
        "tags": [
          "Worker"
        ],
        "parameters": [
          {
            "name": "jobName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/Worker/UpdateJobSchedule/{jobName}": {
      "put": {
        "tags": [
          "Worker"
        ],
        "summary": "Enable, disable, or reschedule a job.",
        "parameters": [
          {
            "name": "jobName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestUpdateJobSchedule"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestUpdateJobSchedule"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RequestUpdateJobSchedule"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/Driver/GetDrivers": {
      "get": {
        "tags": [
          "Driver"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfDriverView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfDriverView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfDriverView"
                }
              }
            }
          }
        }
      }
    },
    "/api/Driver/CreateDriver": {
      "post": {
        "tags": [
          "Driver"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DriverEditRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DriverEditRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DriverEditRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfGuid"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfGuid"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfGuid"
                }
              }
            }
          }
        }
      }
    },
    "/api/Driver/UpdateDriver/{id}": {
      "put": {
        "tags": [
          "Driver"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DriverEditRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DriverEditRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DriverEditRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/Driver/SetDriverActive/{id}/{active}": {
      "post": {
        "tags": [
          "Driver"
        ],
        "summary": "Makes a driver inactive, so they cannot be picked, or active again.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "active",
            "in": "path",
            "required": true,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/Driver/AssignDriver/{consignmentId}": {
      "post": {
        "tags": [
          "Driver"
        ],
        "summary": "Offers a consignment's trip to a driver on the caller's register.",
        "parameters": [
          {
            "name": "consignmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DriverAssignRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DriverAssignRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DriverAssignRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/Driver/EndDriverAssignment/{consignmentId}": {
      "post": {
        "tags": [
          "Driver"
        ],
        "summary": "Takes the consignment's driver off it: a handover, a breakdown, a replacement.",
        "parameters": [
          {
            "name": "consignmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DriverEndRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DriverEndRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DriverEndRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/Credit/GetMyCredits": {
      "get": {
        "tags": [
          "Credit"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfCreditSummary"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfCreditSummary"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfCreditSummary"
                }
              }
            }
          }
        }
      }
    },
    "/api/Credit/RequestTopUp": {
      "post": {
        "tags": [
          "Credit"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TopUpRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TopUpRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TopUpRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfGuid"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfGuid"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfGuid"
                }
              }
            }
          }
        }
      }
    },
    "/api/Credit/GetPendingTopUps": {
      "get": {
        "tags": [
          "Credit"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfCreditLine"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfCreditLine"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfCreditLine"
                }
              }
            }
          }
        }
      }
    },
    "/api/Credit/DecideTopUp/{id}": {
      "post": {
        "tags": [
          "Credit"
        ],
        "summary": "Confirms a top-up, with the credits the payment bought, or rejects it with a reason.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TopUpDecision"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TopUpDecision"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TopUpDecision"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/Credit/GetAgentCredits/{agentId}": {
      "get": {
        "tags": [
          "Credit"
        ],
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfCreditSummary"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfCreditSummary"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfCreditSummary"
                }
              }
            }
          }
        }
      }
    },
    "/api/Credit/AdjustCredits/{agentId}": {
      "post": {
        "tags": [
          "Credit"
        ],
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreditAdjustRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreditAdjustRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreditAdjustRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/AgentTask/GetMyTasks": {
      "get": {
        "tags": [
          "AgentTask"
        ],
        "summary": "Open tasks, most urgent first.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfAgentTaskView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfAgentTaskView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfAgentTaskView"
                }
              }
            }
          }
        }
      }
    },
    "/api/AgentTask/DismissTask/{id}": {
      "post": {
        "tags": [
          "AgentTask"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/Consignment/GetConsignmentFormOptions": {
      "get": {
        "tags": [
          "Consignment"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfConsignmentFormOptions"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfConsignmentFormOptions"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfConsignmentFormOptions"
                }
              }
            }
          }
        }
      }
    },
    "/api/Consignment/PreviewConsignmentLink": {
      "post": {
        "tags": [
          "Consignment"
        ],
        "summary": "Reads a pasted supplier link so the form can open filled in. Stores nothing.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsignmentLinkRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsignmentLinkRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConsignmentLinkRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfConsignmentPreview"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfConsignmentPreview"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfConsignmentPreview"
                }
              }
            }
          }
        }
      }
    },
    "/api/Consignment/CreateConsignment": {
      "post": {
        "tags": [
          "Consignment"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsignmentCreateRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsignmentCreateRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConsignmentCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfGuid"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfGuid"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfGuid"
                }
              }
            }
          }
        }
      }
    },
    "/api/Consignment/AttachConsignmentLink/{id}": {
      "post": {
        "tags": [
          "Consignment"
        ],
        "summary": "Replaces the supplier link of a consignment whose link stopped working.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsignmentLinkRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsignmentLinkRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConsignmentLinkRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/Consignment/GetConsignments": {
      "get": {
        "tags": [
          "Consignment"
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ConsignmentStatus"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfConsignmentSummary"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfConsignmentSummary"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfConsignmentSummary"
                }
              }
            }
          }
        }
      }
    },
    "/api/Consignment/GetConsignmentById/{id}": {
      "get": {
        "tags": [
          "Consignment"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfConsignmentDetail"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfConsignmentDetail"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfConsignmentDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/Consignment/GetSupplierLink/{id}": {
      "get": {
        "tags": [
          "Consignment"
        ],
        "summary": "The supplier's tracking link, so the agent can open the page. Its own permission, because\r\nthe page shows the supplier's invoice. The link travels in the response body only.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              }
            }
          }
        }
      }
    },
    "/api/Consignment/RecordSupplierPageOpened/{id}": {
      "post": {
        "tags": [
          "Consignment"
        ],
        "summary": "Notes in the consignment's history that the caller opened the supplier's page.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/Consignment/UpdateConsignment/{id}": {
      "put": {
        "tags": [
          "Consignment"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsignmentEditRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsignmentEditRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConsignmentEditRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/Consignment/MarkDepositReceived/{id}": {
      "post": {
        "tags": [
          "Consignment"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/Consignment/MarkPaidInFull/{id}": {
      "post": {
        "tags": [
          "Consignment"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/Consignment/RecordShippingStage/{id}": {
      "post": {
        "tags": [
          "Consignment"
        ],
        "summary": "Booked or sailed, set by hand on a consignment with no working supplier link.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShippingStageRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ShippingStageRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ShippingStageRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/Consignment/ConfirmArrival/{id}": {
      "post": {
        "tags": [
          "Consignment"
        ],
        "summary": "The agent's answer to \"has the ship arrived?\": arrived, delayed to a new date, or not yet.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmArrivalRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmArrivalRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmArrivalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/Consignment/MarkClearingStarted/{id}": {
      "post": {
        "tags": [
          "Consignment"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/Consignment/EnterDuty/{id}": {
      "post": {
        "tags": [
          "Consignment"
        ],
        "summary": "The duty ZIMRA charged and its payment reference, which the client is then sent.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DutyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DutyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DutyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/Consignment/MarkDelivered/{id}": {
      "post": {
        "tags": [
          "Consignment"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/Consignment/CancelConsignment/{id}": {
      "post": {
        "tags": [
          "Consignment"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsignmentCancelRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsignmentCancelRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConsignmentCancelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/Agent/GetAgents": {
      "get": {
        "tags": [
          "Agent"
        ],
        "summary": "Agents, newest application first; status narrows it to one status.",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/AgentStatus"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfAgentSummary"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfAgentSummary"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfAgentSummary"
                }
              }
            }
          }
        }
      }
    },
    "/api/Agent/GetAgentById/{id}": {
      "get": {
        "tags": [
          "Agent"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfAgentDetail"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfAgentDetail"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfAgentDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/Agent/ApproveAgent/{id}": {
      "post": {
        "tags": [
          "Agent"
        ],
        "summary": "Approves a pending application and creates the owner's account.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentApprovalRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentApprovalRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AgentApprovalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              }
            }
          }
        }
      }
    },
    "/api/Agent/RejectAgent/{id}": {
      "post": {
        "tags": [
          "Agent"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentDecisionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentDecisionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AgentDecisionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/Agent/SuspendAgent/{id}": {
      "post": {
        "tags": [
          "Agent"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentDecisionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentDecisionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AgentDecisionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/Agent/ReinstateAgent/{id}": {
      "post": {
        "tags": [
          "Agent"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/Agent/ChangeAgentEmail/{id}": {
      "post": {
        "tags": [
          "Agent"
        ],
        "summary": "Corrects an agent's email before the owner has accepted the invitation, and invites them there.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentEmailChangeRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentEmailChangeRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AgentEmailChangeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              }
            }
          }
        }
      }
    },
    "/api/Agent/ResendAgentInvitation/{id}": {
      "post": {
        "tags": [
          "Agent"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              }
            }
          }
        }
      }
    },
    "/api/Agent/GetMyAgent": {
      "get": {
        "tags": [
          "Agent"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfAgentDetail"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfAgentDetail"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfAgentDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/Agent/UpdateMyAgent": {
      "put": {
        "tags": [
          "Agent"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentProfileEdit"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentProfileEdit"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AgentProfileEdit"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/Integration/GetIntegrations": {
      "get": {
        "tags": [
          "Integration"
        ],
        "summary": "Every integration that can still be asked for.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfIntegrationOption"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfIntegrationOption"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfIReadOnlyListOfIntegrationOption"
                }
              }
            }
          }
        }
      }
    },
    "/api/Integration/RequestIntegration/{integrationId}": {
      "post": {
        "tags": [
          "Integration"
        ],
        "summary": "The caller's agent asks to use an integration.",
        "parameters": [
          {
            "name": "integrationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/Integration/DecideIntegrationRequest/{id}": {
      "post": {
        "tags": [
          "Integration"
        ],
        "summary": "Approves or rejects a waiting request, or revokes an approved one.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntegrationDecisionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/IntegrationDecisionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/IntegrationDecisionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/Monitoring/GetMonitoring": {
      "get": {
        "tags": [
          "Monitoring"
        ],
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfMonitoringView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfMonitoringView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfMonitoringView"
                }
              }
            }
          }
        }
      }
    },
    "/api/Monitoring/SetIntegrationPaused/{id}/{paused}": {
      "post": {
        "tags": [
          "Monitoring"
        ],
        "summary": "Stops a supplier's pages being read for every agent, or starts them again.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "paused",
            "in": "path",
            "required": true,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfboolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/Registration/GetApplicationOptions": {
      "get": {
        "tags": [
          "Registration"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfApplicationOptions"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfApplicationOptions"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfApplicationOptions"
                }
              }
            }
          }
        }
      }
    },
    "/api/Registration/SendPhoneCode": {
      "post": {
        "tags": [
          "Registration"
        ],
        "summary": "Sends a WhatsApp code to the number on the form, and returns the ticket to send back with it.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestPhoneCode"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestPhoneCode"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RequestPhoneCode"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfPhoneCodeTicket"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfPhoneCodeTicket"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfPhoneCodeTicket"
                }
              }
            }
          }
        }
      }
    },
    "/api/Registration/SubmitApplication": {
      "post": {
        "tags": [
          "Registration"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentApplicationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentApplicationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AgentApplicationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOfstring"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AgentApplicationRequest": {
        "required": [
          "businessName",
          "contactPerson",
          "phone",
          "email",
          "idNumber",
          "officeAddress",
          "phoneTicket",
          "phoneCode"
        ],
        "type": "object",
        "properties": {
          "businessName": {
            "maxLength": 128,
            "type": "string"
          },
          "contactPerson": {
            "maxLength": 128,
            "type": "string"
          },
          "phone": {
            "maxLength": 32,
            "type": "string"
          },
          "email": {
            "maxLength": 256,
            "type": "string"
          },
          "idNumber": {
            "maxLength": 64,
            "type": "string"
          },
          "officeAddress": {
            "maxLength": 512,
            "type": "string"
          },
          "ecoCashNumber": {
            "maxLength": 32,
            "type": [
              "null",
              "string"
            ],
            "description": "The number top-ups will be paid from. Optional on the form; needed before the first top-up."
          },
          "businessTypes": {
            "$ref": "#/components/schemas/BusinessTypes"
          },
          "integrationCodes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Codes of the integrations the applicant wants, from ApplicationOptions."
          },
          "acceptsTerms": {
            "type": "boolean"
          },
          "termsVersion": {
            "maxLength": 32,
            "type": "string",
            "description": "The terms version the form showed. Refused if the terms have changed since."
          },
          "phoneTicket": {
            "type": "string",
            "description": "The ticket returned when the code was sent."
          },
          "phoneCode": {
            "maxLength": 12,
            "type": "string"
          }
        },
        "description": "The public application form, as posted."
      },
      "AgentApprovalRequest": {
        "required": [
          "verificationNote"
        ],
        "type": "object",
        "properties": {
          "verificationNote": {
            "maxLength": 512,
            "type": "string",
            "description": "How the applicant's identity and business were checked: \"called, ID shown on WhatsApp\"."
          }
        },
        "description": "Approves an application."
      },
      "AgentDecisionRequest": {
        "required": [
          "reason"
        ],
        "type": "object",
        "properties": {
          "reason": {
            "maxLength": 512,
            "type": "string"
          }
        },
        "description": "Rejects or suspends an agent. The reason is sent to them, so it is required."
      },
      "AgentDetail": {
        "type": "object",
        "properties": {
          "idNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "officeAddress": {
            "type": [
              "null",
              "string"
            ]
          },
          "ecoCashNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "businessTypes": {
            "$ref": "#/components/schemas/BusinessTypes"
          },
          "statusReason": {
            "type": [
              "null",
              "string"
            ]
          },
          "decidedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "verificationNote": {
            "type": [
              "null",
              "string"
            ],
            "description": "How the reviewer checked the applicant's identity. Shown to the platform only."
          },
          "termsVersion": {
            "type": "string"
          },
          "termsAcceptedAt": {
            "type": "string",
            "format": "date-time"
          },
          "showVesselName": {
            "type": "boolean"
          },
          "ownerUserId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The owner's account id, once approval has created it."
          },
          "invitationPending": {
            "type": "boolean",
            "description": "True while the owner has an account but has not yet followed the invitation to choose a\r\npassword, so their email is unproved and can still be corrected."
          },
          "integrations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentIntegrationView"
            }
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "contactPerson": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/AgentStatus"
          },
          "createdDate": {
            "type": "string",
            "description": "When they applied.",
            "format": "date-time"
          },
          "pendingIntegrations": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Integration requests still waiting for the platform.",
            "format": "int32"
          }
        },
        "description": "Everything about one agent: the platform's review screen, and the agent's own profile."
      },
      "AgentDriverStatus": {
        "type": "integer",
        "description": "Whether a driver is still on an agent's register. Stored as its number, so values are never renumbered."
      },
      "AgentEmailChangeRequest": {
        "required": [
          "email"
        ],
        "type": "object",
        "properties": {
          "email": {
            "maxLength": 256,
            "type": "string"
          }
        },
        "description": "Corrects the email on an agent, typically a typo that kept the invitation from arriving."
      },
      "AgentIntegrationStatus": {
        "type": "integer",
        "description": "Where one agent's request to use one integration stands."
      },
      "AgentIntegrationView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "integrationId": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/AgentIntegrationStatus"
          },
          "requestedAt": {
            "type": "string",
            "format": "date-time"
          },
          "decidedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "reason": {
            "type": [
              "null",
              "string"
            ]
          }
        },
        "description": "One of an agent's integration requests, with the platform's answer."
      },
      "AgentMonitorRow": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/AgentStatus"
          },
          "tracking": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Consignments being tracked now.",
            "format": "int32"
          },
          "clientMessages": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Updates sent to the agent's clients in the period.",
            "format": "int32"
          },
          "stops": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Clients who replied STOP.",
            "format": "int32"
          },
          "disputes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Numbers whose owner said they do not know the agent.",
            "format": "int32"
          },
          "undelivered": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Updates that could not be delivered.",
            "format": "int32"
          },
          "duplicateLinks": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Links pasted that another agent is already tracking.",
            "format": "int32"
          }
        },
        "description": "One agent on the platform's monitoring page: what has been counted against them lately."
      },
      "AgentProfileEdit": {
        "required": [
          "contactPerson"
        ],
        "type": "object",
        "properties": {
          "contactPerson": {
            "maxLength": 128,
            "type": "string"
          },
          "officeAddress": {
            "maxLength": 512,
            "type": [
              "null",
              "string"
            ]
          },
          "ecoCashNumber": {
            "maxLength": 32,
            "type": [
              "null",
              "string"
            ]
          },
          "showVesselName": {
            "type": "boolean"
          }
        },
        "description": "What an agent may change about their own business."
      },
      "AgentStatus": {
        "type": "integer",
        "description": "Where an agent stands with the platform."
      },
      "AgentSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "contactPerson": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/AgentStatus"
          },
          "createdDate": {
            "type": "string",
            "description": "When they applied.",
            "format": "date-time"
          },
          "pendingIntegrations": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Integration requests still waiting for the platform.",
            "format": "int32"
          }
        },
        "description": "One row of the platform's agents list."
      },
      "AgentTaskKind": {
        "type": "integer",
        "description": "What an agent is being asked to do. Stored as its number, so values are never renumbered."
      },
      "AgentTaskView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "consignmentId": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/AgentTaskKind"
          },
          "title": {
            "type": "string"
          },
          "dueAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "createdDate": {
            "type": "string",
            "format": "date-time"
          }
        },
        "description": "One thing an agent is being asked to do."
      },
      "ApplicationOptions": {
        "type": "object",
        "properties": {
          "termsVersion": {
            "type": "string",
            "description": "The version of the agent terms the form shows, sent back with the application."
          },
          "integrations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IntegrationOption"
            }
          }
        },
        "description": "What the public application form needs before it can be filled in."
      },
      "ApplicationUserViewModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "null",
              "string"
            ]
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "firstName": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastName": {
            "type": [
              "null",
              "string"
            ]
          },
          "passwordExpiryDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "passwordNeverExpires": {
            "type": "boolean"
          },
          "lastPasswordChangeDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "phoneNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "emailConfirmed": {
            "type": "boolean"
          },
          "phoneNumberConfirmed": {
            "type": "boolean"
          },
          "twoFactorEnabled": {
            "type": "boolean"
          },
          "lockoutEnd": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lockoutEnabled": {
            "type": "boolean"
          },
          "accessFailedCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "hasPassword": {
            "type": "boolean",
            "description": "False for an invited user who has not chosen a password yet."
          },
          "isLocked": {
            "type": "boolean",
            "description": "Locked right now, for whatever reason."
          },
          "isLockedByAdministrator": {
            "type": "boolean",
            "description": "Locked by an administrator, as opposed to temporarily after failed sign-ins — the first\r\nstays until somebody unlocks it, the second lifts itself."
          },
          "lastLogin": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "createdDate": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "isDeleted": {
            "type": [
              "null",
              "boolean"
            ]
          }
        },
        "description": "One user, for the details and My account pages."
      },
      "AssignmentEndReason": {
        "type": "integer",
        "description": "Why a driver's trip ended. Stored as its number, so values are never renumbered."
      },
      "AuditActor": {
        "type": "integer",
        "description": "Whose entries the audit page shows."
      },
      "AuditCategory": {
        "type": "integer",
        "description": "What kind of thing is being recorded. Stored as an int; never renumber."
      },
      "AuditLogViewModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "timestampUtc": {
            "type": "string",
            "format": "date-time"
          },
          "category": {
            "$ref": "#/components/schemas/AuditCategory"
          },
          "action": {
            "type": "string"
          },
          "entityName": {
            "type": [
              "null",
              "string"
            ]
          },
          "entityId": {
            "type": [
              "null",
              "string"
            ]
          },
          "changes": {
            "type": [
              "null",
              "string"
            ],
            "description": "JSON: `{\"Name\":{\"old\":\"Sales\",\"new\":\"Sales Officer\"}}`. Masked fields read `***`."
          },
          "userId": {
            "type": [
              "null",
              "string"
            ]
          },
          "userDisplayName": {
            "type": [
              "null",
              "string"
            ]
          },
          "ipAddress": {
            "type": [
              "null",
              "string"
            ]
          },
          "userAgent": {
            "type": [
              "null",
              "string"
            ]
          },
          "correlationId": {
            "type": [
              "null",
              "string"
            ]
          },
          "summary": {
            "type": [
              "null",
              "string"
            ]
          }
        },
        "description": "One row of the audit trail, as the API returns it."
      },
      "AuditSearchRequest": {
        "type": "object",
        "properties": {
          "fromUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "toUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "category": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AuditCategory"
              }
            ]
          },
          "action": {
            "type": [
              "null",
              "string"
            ]
          },
          "userId": {
            "type": [
              "null",
              "string"
            ]
          },
          "actor": {
            "description": "People, the system, or both. Everyone when not set, so an older caller sees what it always did.",
            "$ref": "#/components/schemas/AuditActor"
          },
          "entityName": {
            "type": [
              "null",
              "string"
            ]
          },
          "entityId": {
            "type": [
              "null",
              "string"
            ]
          },
          "search": {
            "type": [
              "null",
              "string"
            ],
            "description": "Matched against the summary and the change set."
          },
          "skip": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "take": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        },
        "description": "Filters for the audit page. Everything is optional; nothing set means \"most recent\"."
      },
      "AuditSearchResult": {
        "required": [
          "rows",
          "totalCount"
        ],
        "type": "object",
        "properties": {
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AuditLogViewModel"
            }
          },
          "totalCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        },
        "description": "A page of audit rows, plus the total so the grid can show how many there are."
      },
      "AuthenticatorSetup": {
        "type": "object",
        "properties": {
          "sharedKey": {
            "type": "string",
            "description": "Grouped in fours for typing: \"abcd efgh ijkl …\"."
          },
          "authenticatorUri": {
            "type": "string",
            "description": "otpauth://totp/… — what the QR code encodes."
          },
          "codeChannels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CodeChannel"
            },
            "description": "Verified addresses a setup code can be sent to instead, for someone without an app."
          }
        },
        "description": "The key an authenticator app needs, as a QR payload and as text to type."
      },
      "BusinessTypes": {
        "type": "integer",
        "description": "What an agent's business does. An agent may tick more than one."
      },
      "Channel": {
        "type": "integer",
        "description": "A way of reaching somebody. Flags, because a notification type allows a set of them and a\r\nreceiver subscribes to a set of them."
      },
      "ChannelAvailability": {
        "required": [
          "channel",
          "displayName",
          "enabledSystemWide",
          "hasVerifiedAddress",
          "address",
          "blockedReason"
        ],
        "type": "object",
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/Channel"
          },
          "displayName": {
            "type": "string"
          },
          "enabledSystemWide": {
            "type": "boolean"
          },
          "hasVerifiedAddress": {
            "type": "boolean"
          },
          "address": {
            "type": [
              "null",
              "string"
            ],
            "description": "The address in use — masked for phone channels."
          },
          "blockedReason": {
            "type": [
              "null",
              "string"
            ],
            "description": "Null when the channel is ready; otherwise what to tell the user."
          }
        },
        "description": "Whether a channel is usable by this receiver, and what would make it usable."
      },
      "ChannelConfigEdit": {
        "required": [
          "providerName"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Empty creates a configuration for the channel.",
            "format": "uuid"
          },
          "channel": {
            "$ref": "#/components/schemas/Channel"
          },
          "providerName": {
            "maxLength": 64,
            "type": "string"
          },
          "displayName": {
            "maxLength": 128,
            "type": [
              "null",
              "string"
            ]
          },
          "isEnabled": {
            "type": "boolean"
          },
          "isDefault": {
            "type": "boolean"
          },
          "fromAddress": {
            "maxLength": 256,
            "type": [
              "null",
              "string"
            ]
          },
          "maxPerMinute": {
            "maximum": 100000,
            "minimum": 1,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "settings": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Settings to store. A key left out keeps whatever is already stored; a key with an empty\r\nvalue clears it."
          }
        },
        "description": "What the channels form posts back."
      },
      "ChannelConfigViewModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "channel": {
            "$ref": "#/components/schemas/Channel"
          },
          "channelName": {
            "type": "string"
          },
          "providerName": {
            "type": "string"
          },
          "displayName": {
            "type": [
              "null",
              "string"
            ]
          },
          "isDummyProvider": {
            "type": "boolean",
            "description": "True when the selected provider only writes to the log. Said plainly in the UI."
          },
          "providerExists": {
            "type": "boolean",
            "description": "False when the provider named on the row does not exist in this build any more."
          },
          "isEnabled": {
            "type": "boolean"
          },
          "isDefault": {
            "type": "boolean"
          },
          "fromAddress": {
            "type": [
              "null",
              "string"
            ]
          },
          "maxPerMinute": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "host": {
            "type": [
              "null",
              "string"
            ],
            "description": "The server, returned because it is not a secret, so the form can show what is set."
          },
          "port": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "username": {
            "type": [
              "null",
              "string"
            ]
          },
          "encryption": {
            "type": [
              "null",
              "string"
            ]
          },
          "publicSettings": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Every stored setting the provider does not mark secret — the sender display name, the\r\ntimeout, and the host, port, username and encryption above — so the edit form shows what is\r\nreally set instead of empty boxes. Secrets are never in here; see IReadOnlyList&lt;string&gt; ChannelConfigViewModel.ConfiguredFields."
          },
          "configuredFields": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Settings keys that currently hold a value — never the values themselves."
          },
          "missingFields": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Required settings the provider has not been given, so the card can say why it cannot send."
          },
          "pendingCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "failedCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        },
        "description": "One channel's configuration as the channels page shows it."
      },
      "ChannelSettingsField": {
        "required": [
          "key",
          "label"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "The key in ChannelSettings."
          },
          "label": {
            "type": "string",
            "description": "What the form says."
          },
          "isSecret": {
            "type": "boolean",
            "description": "Rendered write-only, never returned by the API once stored.",
            "default": false
          },
          "isRequired": {
            "type": "boolean",
            "description": "Blocks saving an enabled configuration when empty.",
            "default": false
          },
          "help": {
            "type": [
              "null",
              "string"
            ],
            "description": "Optional hint under the field."
          },
          "options": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            },
            "description": "The only values allowed, when there is a fixed list. The form renders a dropdown and the save\r\nrefuses anything else, so a typo cannot quietly fall back to a default."
          }
        },
        "description": "One field of a provider's settings form, so the channels page can be generated instead of\r\nhand-written per vendor."
      },
      "CodeChannel": {
        "type": "object",
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/Channel"
          },
          "displayName": {
            "type": "string"
          },
          "maskedAddress": {
            "type": "string",
            "description": "\"••••4567\" or \"s•••@example.com\": enough to recognise, not enough to learn an address from."
          }
        }
      },
      "ConfirmArrivalRequest": {
        "type": "object",
        "properties": {
          "arrived": {
            "type": "boolean"
          },
          "newEta": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          }
        },
        "description": "The agent's answer to \"has the ship arrived?\"."
      },
      "ConsignmentCancelRequest": {
        "required": [
          "reason"
        ],
        "type": "object",
        "properties": {
          "reason": {
            "maxLength": 512,
            "type": "string"
          }
        }
      },
      "ConsignmentCreateRequest": {
        "required": [
          "clientName",
          "clientPhone",
          "routeCode"
        ],
        "type": "object",
        "properties": {
          "link": {
            "maxLength": 2048,
            "type": [
              "null",
              "string"
            ],
            "description": "The supplier's tracking link. Required: a consignment is made from the page it points to."
          },
          "clientName": {
            "maxLength": 128,
            "type": "string"
          },
          "clientPhone": {
            "maxLength": 32,
            "type": "string"
          },
          "clientEmail": {
            "maxLength": 256,
            "type": [
              "null",
              "string"
            ],
            "description": "Optional. The updates worth keeping are also emailed here, for the client's records."
          },
          "clientConsent": {
            "type": "boolean",
            "description": "The agent's word that the client agreed to WhatsApp updates."
          },
          "supplierRef": {
            "maxLength": 64,
            "type": [
              "null",
              "string"
            ]
          },
          "vehicle": {
            "$ref": "#/components/schemas/VehicleRecord"
          },
          "routeCode": {
            "maxLength": 16,
            "type": "string"
          },
          "agreedPriceUsd": {
            "maximum": 100000000,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "description": "The price agreed with the client, in US dollars. Ignored when another currency is given.",
            "format": "double"
          },
          "originalCurrency": {
            "maxLength": 3,
            "type": [
              "null",
              "string"
            ],
            "description": "Another currency the price was agreed in, with its amount and how many of it make one US dollar."
          },
          "originalAmount": {
            "maximum": 100000000000,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "exchangeRate": {
            "maximum": 1000000000,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "paidInFull": {
            "type": "boolean"
          },
          "depositReceived": {
            "type": "boolean"
          },
          "dutyEstimateUsd": {
            "maximum": 100000000,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          }
        },
        "description": "The new-consignment form, as posted."
      },
      "ConsignmentDetail": {
        "type": "object",
        "properties": {
          "clientPhone": {
            "type": "string"
          },
          "clientEmail": {
            "type": [
              "null",
              "string"
            ],
            "description": "The client's email, when the agent entered one."
          },
          "clientOptedOut": {
            "type": "boolean",
            "description": "The client replied STOP: no updates reach them until they reply START."
          },
          "clientDisputedAt": {
            "type": [
              "null",
              "string"
            ],
            "description": "When the person on the client's number said they do not know the agent.",
            "format": "date-time"
          },
          "routeName": {
            "type": "string"
          },
          "integrationName": {
            "type": "string"
          },
          "usesLink": {
            "type": "boolean",
            "description": "Whether this consignment's supplier is tracked by a link at all."
          },
          "supplierRef": {
            "type": [
              "null",
              "string"
            ]
          },
          "linkHint": {
            "type": [
              "null",
              "string"
            ],
            "description": "The last few characters of the supplier link. The link itself is never sent to a browser."
          },
          "linkAttachedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "manualTracking": {
            "type": "boolean"
          },
          "trackingStoppedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lastPolledAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "etaSource": {
            "$ref": "#/components/schemas/EtaSource"
          },
          "vehicle": {
            "$ref": "#/components/schemas/VehicleRecord"
          },
          "agreedPriceUsd": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "originalCurrency": {
            "type": [
              "null",
              "string"
            ]
          },
          "originalAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "exchangeRate": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "dutyEstimateUsd": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "dutyActualUsd": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "description": "What ZIMRA charged, once the agent has entered it.",
            "format": "double"
          },
          "dutyReference": {
            "type": [
              "null",
              "string"
            ]
          },
          "dutyNote": {
            "type": [
              "null",
              "string"
            ]
          },
          "border": {
            "type": [
              "null",
              "string"
            ],
            "description": "Where the vehicle enters Zimbabwe: \"Chirundu\"."
          },
          "driver": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The driver the consignment is with or has been offered to; null when it has none.",
                "$ref": "#/components/schemas/DriverAssignmentView"
              }
            ]
          },
          "depositReceivedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "paidAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "arrivedPortAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "deliveredAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "cancelReason": {
            "type": [
              "null",
              "string"
            ]
          },
          "vesselName": {
            "type": [
              "null",
              "string"
            ],
            "description": "The ship, as the supplier last reported it."
          },
          "etd": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "portOfDischarge": {
            "type": [
              "null",
              "string"
            ]
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StageEventView"
            },
            "description": "Newest first."
          },
          "tasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentTaskView"
            }
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": "string"
          },
          "clientName": {
            "type": "string"
          },
          "goods": {
            "type": [
              "null",
              "string"
            ],
            "description": "\"2016 TOYOTA Probox Van, Silver\"."
          },
          "identifier": {
            "type": [
              "null",
              "string"
            ],
            "description": "The chassis number."
          },
          "routeCode": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ConsignmentStatus"
          },
          "stageCode": {
            "type": "string"
          },
          "stageTitle": {
            "type": "string",
            "description": "The stage in words."
          },
          "stageAt": {
            "type": "string",
            "format": "date-time"
          },
          "eta": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "paidInFull": {
            "type": "boolean"
          },
          "openTasks": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "createdDate": {
            "type": "string",
            "format": "date-time"
          }
        },
        "description": "Everything about one consignment, for its page."
      },
      "ConsignmentEditRequest": {
        "required": [
          "clientName",
          "clientPhone",
          "routeCode"
        ],
        "type": "object",
        "properties": {
          "clientName": {
            "maxLength": 128,
            "type": "string"
          },
          "clientPhone": {
            "maxLength": 32,
            "type": "string"
          },
          "clientEmail": {
            "maxLength": 256,
            "type": [
              "null",
              "string"
            ],
            "description": "Optional. The updates worth keeping are also emailed here, for the client's records."
          },
          "routeCode": {
            "maxLength": 16,
            "type": "string"
          },
          "agreedPriceUsd": {
            "maximum": 100000000,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "dutyEstimateUsd": {
            "maximum": 100000000,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          }
        },
        "description": "What an agent may change on a consignment after it is created."
      },
      "ConsignmentFormOptions": {
        "type": "object",
        "properties": {
          "routes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RouteOption"
            }
          },
          "integrations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IntegrationOption"
            }
          },
          "creditsPerVehicle": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "What creating a consignment costs, in credits, as the setting stands today.",
            "format": "int32"
          },
          "creditBalance": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The agent's credits now, so the confirmation can say what is left.",
            "format": "int32"
          }
        },
        "description": "What the new-consignment form offers: the routes, and the integrations approved for this agent."
      },
      "ConsignmentLinkRequest": {
        "required": [
          "link"
        ],
        "type": "object",
        "properties": {
          "link": {
            "maxLength": 2048,
            "type": "string"
          }
        },
        "description": "A supplier tracking link, posted in a body: a link is a credential and never goes in an address."
      },
      "ConsignmentPreview": {
        "type": "object",
        "properties": {
          "integrationId": {
            "type": "string",
            "format": "uuid"
          },
          "integrationName": {
            "type": "string"
          },
          "pageRead": {
            "type": "boolean",
            "description": "False when the page could not be read: the form opens empty and says why."
          },
          "warning": {
            "type": [
              "null",
              "string"
            ]
          },
          "supplierRef": {
            "type": [
              "null",
              "string"
            ]
          },
          "vehicle": {
            "$ref": "#/components/schemas/VehicleRecord"
          },
          "vesselName": {
            "type": [
              "null",
              "string"
            ]
          },
          "etd": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "eta": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "portOfDischarge": {
            "type": [
              "null",
              "string"
            ]
          },
          "suggestedRouteCode": {
            "type": [
              "null",
              "string"
            ],
            "description": "The route the discharge port suggests, for the agent to confirm."
          },
          "progress": {
            "type": [
              "null",
              "string"
            ],
            "description": "How far the shipment already is, as a sentence: \"Already sailed.\""
          }
        },
        "description": "What the supplier's page says about a pasted link, for the agent to check and complete."
      },
      "ConsignmentStatus": {
        "type": "integer",
        "description": "Whether a consignment is being tracked."
      },
      "ConsignmentSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": "string"
          },
          "clientName": {
            "type": "string"
          },
          "goods": {
            "type": [
              "null",
              "string"
            ],
            "description": "\"2016 TOYOTA Probox Van, Silver\"."
          },
          "identifier": {
            "type": [
              "null",
              "string"
            ],
            "description": "The chassis number."
          },
          "routeCode": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ConsignmentStatus"
          },
          "stageCode": {
            "type": "string"
          },
          "stageTitle": {
            "type": "string",
            "description": "The stage in words."
          },
          "stageAt": {
            "type": "string",
            "format": "date-time"
          },
          "eta": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "paidInFull": {
            "type": "boolean"
          },
          "openTasks": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "createdDate": {
            "type": "string",
            "format": "date-time"
          }
        },
        "description": "One row of the consignments list."
      },
      "CreditAdjustRequest": {
        "required": [
          "reason"
        ],
        "type": "object",
        "properties": {
          "credits": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Credits to add, or with a minus sign to take away.",
            "format": "int32"
          },
          "reason": {
            "maxLength": 256,
            "type": "string"
          }
        },
        "description": "A correction to an agent's credits by the platform."
      },
      "CreditKind": {
        "type": "integer",
        "description": "What a line of an agent's credit history is. Stored as its number, so values are never renumbered."
      },
      "CreditLine": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "agentName": {
            "type": [
              "null",
              "string"
            ],
            "description": "Whose line it is. Filled in for the platform's list of top-ups, which spans agents."
          },
          "kind": {
            "$ref": "#/components/schemas/CreditKind"
          },
          "status": {
            "$ref": "#/components/schemas/CreditStatus"
          },
          "credits": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "amountUsd": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "paymentReference": {
            "type": [
              "null",
              "string"
            ]
          },
          "consignmentReference": {
            "type": [
              "null",
              "string"
            ],
            "description": "The consignment credits were used on."
          },
          "note": {
            "type": [
              "null",
              "string"
            ]
          },
          "createdDate": {
            "type": "string",
            "format": "date-time"
          },
          "decidedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        },
        "description": "One line of an agent's credit history."
      },
      "CreditStatus": {
        "type": "integer",
        "description": "Whether a line of credit history counts. Stored as its number, so values are never renumbered."
      },
      "CreditSummary": {
        "type": "object",
        "properties": {
          "balance": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Confirmed credits in, less credits used.",
            "format": "int32"
          },
          "creditsPerVehicle": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "What starting to track one vehicle uses.",
            "format": "int32"
          },
          "usdPerCredit": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "payTo": {
            "type": "string",
            "description": "Where a top-up is paid to, as the platform has set it. Empty until it has."
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreditLine"
            },
            "description": "Newest first."
          }
        },
        "description": "An agent's credits: what they have, what it costs, how to buy more, and the history."
      },
      "DashboardViewModel": {
        "type": "object",
        "properties": {
          "asOfUtc": {
            "type": [
              "null",
              "string"
            ],
            "description": "When the snapshot was taken. Shown, because a stale number presented as live misleads.",
            "format": "date-time"
          },
          "totalUsers": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "confirmedUsers": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "lockedUsers": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pendingMessages": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "failedMessages24h": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "jobsRun24h": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "failedJobs24h": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "unresolvedErrors": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Outstanding entries in the error log. Live rather than from the snapshot.",
            "format": "int32"
          }
        },
        "description": "The numbers on the dashboard."
      },
      "DriverAssignmentStatus": {
        "type": "integer",
        "description": "Where a trip offered to a driver has got to. Stored as its number, so values are never renumbered."
      },
      "DriverAssignmentView": {
        "type": "object",
        "properties": {
          "driverName": {
            "type": "string"
          },
          "driverPhone": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/DriverAssignmentStatus"
          },
          "assignedAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "description": "When an unanswered offer lapses.",
            "format": "date-time"
          },
          "acceptedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        },
        "description": "The driver a consignment is with, or has been offered to."
      },
      "DriverAssignRequest": {
        "type": "object",
        "properties": {
          "driverId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "description": "The driver picked for a consignment, from the caller's own register."
      },
      "DriverEditRequest": {
        "required": [
          "name",
          "phone"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 128,
            "type": "string"
          },
          "phone": {
            "maxLength": 32,
            "type": "string",
            "description": "The driver's WhatsApp number. Set when the driver is added, and not changed afterwards."
          },
          "idNumber": {
            "maxLength": 32,
            "type": [
              "null",
              "string"
            ]
          },
          "licenceNo": {
            "maxLength": 32,
            "type": [
              "null",
              "string"
            ]
          },
          "truckReg": {
            "maxLength": 32,
            "type": [
              "null",
              "string"
            ]
          }
        },
        "description": "A driver being added to the register, or their details being corrected."
      },
      "DriverEndRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "$ref": "#/components/schemas/AssignmentEndReason"
          },
          "note": {
            "maxLength": 512,
            "type": [
              "null",
              "string"
            ]
          }
        },
        "description": "Taking a driver off a consignment: a handover, a breakdown, or a change of mind."
      },
      "DriverView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The register entry's id: the agent's own row, not the platform's driver.",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "idNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "licenceNo": {
            "type": [
              "null",
              "string"
            ]
          },
          "truckReg": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/AgentDriverStatus"
          },
          "available": {
            "type": "boolean",
            "description": "False while the driver has a trip or an unanswered offer — the caller's own or anybody\r\nelse's. Which, and whose, is never said."
          },
          "ownTripReference": {
            "type": [
              "null",
              "string"
            ],
            "description": "The caller's own consignment the driver is on or has been offered, when that is why they are busy."
          }
        },
        "description": "A driver on the caller's own register."
      },
      "DutyRequest": {
        "required": [
          "reference"
        ],
        "type": "object",
        "properties": {
          "amountUsd": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "reference": {
            "maxLength": 64,
            "type": "string",
            "description": "The ZIMRA payment reference: the client pays ZIMRA directly, under this."
          },
          "note": {
            "maxLength": 160,
            "type": [
              "null",
              "string"
            ],
            "description": "The agent's own words to the client. Needed when the duty is well above the estimate."
          }
        },
        "description": "The duty charged at the border, as the client is to be told it."
      },
      "ErrorGroupPage": {
        "type": "object",
        "properties": {
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ErrorGroupViewModel"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        },
        "description": "One page of the error log, one row per fault, with the total so the grid can page server-side."
      },
      "ErrorGroupViewModel": {
        "type": "object",
        "properties": {
          "latest": {
            "description": "The newest occurrence. Its timestamp is when the fault was last seen.",
            "$ref": "#/components/schemas/ErrorLogViewModel"
          },
          "occurrences": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "firstSeenUtc": {
            "type": "string",
            "format": "date-time"
          }
        },
        "description": "One fault on the error page: its latest occurrence, and how often and since when it has happened."
      },
      "ErrorLogViewModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "errorId": {
            "type": "string",
            "description": "The short reference the user was shown, e.g. `E-4K2M9P`."
          },
          "timestampUtc": {
            "type": "string",
            "format": "date-time"
          },
          "source": {
            "type": "string",
            "description": "Which host it happened in: api, portal, worker, console."
          },
          "severity": {
            "type": "string"
          },
          "exceptionType": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "stackTrace": {
            "type": [
              "null",
              "string"
            ]
          },
          "innerExceptions": {
            "type": [
              "null",
              "string"
            ]
          },
          "fingerprint": {
            "type": "string",
            "description": "Faults with the same fingerprint are the same bug; resolving one resolves them all."
          },
          "requestMethod": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestPath": {
            "type": [
              "null",
              "string"
            ]
          },
          "statusCode": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "userId": {
            "type": [
              "null",
              "string"
            ]
          },
          "userDisplayName": {
            "type": [
              "null",
              "string"
            ]
          },
          "ipAddress": {
            "type": [
              "null",
              "string"
            ]
          },
          "userAgent": {
            "type": [
              "null",
              "string"
            ]
          },
          "correlationId": {
            "type": [
              "null",
              "string"
            ]
          },
          "jobName": {
            "type": [
              "null",
              "string"
            ]
          },
          "jobRunId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "machineName": {
            "type": [
              "null",
              "string"
            ]
          },
          "appVersion": {
            "type": [
              "null",
              "string"
            ]
          },
          "isResolved": {
            "type": "boolean"
          },
          "resolvedById": {
            "type": [
              "null",
              "string"
            ]
          },
          "resolvedUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "resolutionNote": {
            "type": [
              "null",
              "string"
            ]
          }
        },
        "description": "One recorded fault, as the error log page shows it."
      },
      "EtaSource": {
        "type": "integer",
        "description": "Who the arrival estimate on a consignment came from."
      },
      "ExportFormat": {
        "type": "integer",
        "description": "The file formats an export can be produced in."
      },
      "HealthCheckLine": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "durationMs": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        },
        "description": "One dependency's answer, as `/health` reports it."
      },
      "InAppNotification": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "link": {
            "type": [
              "null",
              "string"
            ]
          },
          "createdDate": {
            "type": "string",
            "format": "date-time"
          },
          "readUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "isRead": {
            "type": "boolean"
          },
          "notificationTypeKey": {
            "type": [
              "null",
              "string"
            ]
          }
        },
        "description": "One bell notification."
      },
      "InAppPage": {
        "required": [
          "rows",
          "totalCount",
          "unreadCount"
        ],
        "type": "object",
        "properties": {
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InAppNotification"
            }
          },
          "totalCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "unreadCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        },
        "description": "A page of the \"My notifications\" inbox."
      },
      "InAppSummary": {
        "required": [
          "unreadCount",
          "latest"
        ],
        "type": "object",
        "properties": {
          "unreadCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "latest": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InAppNotification"
            }
          }
        },
        "description": "What the navbar bell shows."
      },
      "IntegrationDecisionRequest": {
        "type": "object",
        "properties": {
          "approve": {
            "type": "boolean",
            "description": "False rejects a waiting request, or revokes one already approved."
          },
          "reason": {
            "maxLength": 512,
            "type": [
              "null",
              "string"
            ],
            "description": "Required when not approving. The agent is told it."
          }
        },
        "description": "The platform's answer to an integration request."
      },
      "IntegrationHealth": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "displayName": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/IntegrationStatus"
          },
          "readsPages": {
            "type": "boolean",
            "description": "Whether this supplier is read from a link at all. One tracked by hand has nothing to fail."
          },
          "tracked": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Consignments being read from this supplier now.",
            "format": "int32"
          },
          "failing": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Of those, the ones whose last reading failed.",
            "format": "int32"
          }
        },
        "description": "How well one supplier's pages are reading, across every agent."
      },
      "IntegrationOption": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/IntegrationStatus"
          }
        },
        "description": "One integration an agent can ask to use."
      },
      "IntegrationStatus": {
        "type": "integer",
        "description": "Whether an integration can be used, platform-wide."
      },
      "JobHistoryViewModel": {
        "required": [
          "jobName"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "jobName": {
            "type": "string"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "finishedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "status": {
            "$ref": "#/components/schemas/Status"
          },
          "affectedRecords": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "notes": {
            "type": [
              "null",
              "string"
            ]
          },
          "errorMessage": {
            "type": [
              "null",
              "string"
            ]
          },
          "durationSeconds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "description": "Null while a run is still in progress.",
            "format": "double"
          }
        },
        "description": "One run."
      },
      "JobScheduleViewModel": {
        "required": [
          "jobName",
          "cronExpression"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "jobName": {
            "type": "string"
          },
          "displayName": {
            "type": [
              "null",
              "string"
            ],
            "description": "What people see (\"Send messages\"). Falls back to string JobScheduleViewModel.JobName."
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "cronExpression": {
            "type": "string"
          },
          "isEnabled": {
            "type": "boolean"
          },
          "nextRunTime": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lastRunTime": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lastRunStatus": {
            "$ref": "#/components/schemas/Status"
          },
          "triggerRequested": {
            "type": "boolean",
            "description": "A manual run has been asked for and the worker has not picked it up yet."
          },
          "pendingRestart": {
            "type": "boolean",
            "description": "The cron was changed and the worker has not restarted to apply it."
          }
        },
        "description": "A job as the Jobs page shows it."
      },
      "JobTitleDetail": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "permissionKeys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JobTitleMember"
            }
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "isActive": {
            "type": "boolean"
          },
          "isSystem": {
            "type": "boolean",
            "description": "Shipped by the seeder: cannot be renamed or deleted."
          },
          "isSuperUser": {
            "type": "boolean",
            "description": "Holds every permission implicitly, so its permission list is not editable."
          },
          "requiresTwoFactor": {
            "type": "boolean",
            "description": "Holders must use two-factor authentication."
          },
          "permissionCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "memberCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "How many people hold it — the number that makes an edit feel consequential.",
            "format": "int32"
          }
        },
        "description": "A job title plus what it grants and who holds it."
      },
      "JobTitleMember": {
        "required": [
          "userId"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "fullName": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "JobTitleSummary": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "isActive": {
            "type": "boolean"
          },
          "isSystem": {
            "type": "boolean",
            "description": "Shipped by the seeder: cannot be renamed or deleted."
          },
          "isSuperUser": {
            "type": "boolean",
            "description": "Holds every permission implicitly, so its permission list is not editable."
          },
          "requiresTwoFactor": {
            "type": "boolean",
            "description": "Holders must use two-factor authentication."
          },
          "permissionCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "memberCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "How many people hold it — the number that makes an edit feel consequential.",
            "format": "int32"
          }
        },
        "description": "A job title as the list page shows it."
      },
      "MaintenanceSource": {
        "type": "integer",
        "description": "Which switch put the system into maintenance, so the Portal can say so."
      },
      "MaintenanceStatus": {
        "required": [
          "isActive",
          "message",
          "startsUtc",
          "expectedEndUtc",
          "source"
        ],
        "type": "object",
        "properties": {
          "isActive": {
            "type": "boolean",
            "description": "Whether non-bypass callers are being turned away right now."
          },
          "message": {
            "type": [
              "null",
              "string"
            ],
            "description": "The administrator's sentence, or null."
          },
          "startsUtc": {
            "type": [
              "null",
              "string"
            ],
            "description": "When it began, or is due to begin.",
            "format": "date-time"
          },
          "expectedEndUtc": {
            "type": [
              "null",
              "string"
            ],
            "description": "When it is expected to end. Not enforced — see the remarks.",
            "format": "date-time"
          },
          "source": {
            "description": "Which switch is responsible.",
            "$ref": "#/components/schemas/MaintenanceSource"
          },
          "isScheduled": {
            "type": "boolean",
            "description": "True when maintenance is scheduled but has not started."
          },
          "isOverrunning": {
            "type": "boolean",
            "description": "True once the expected end has passed and it is still on."
          }
        },
        "description": "What everything else asks about maintenance: the Portal's gate, the API's middleware, the Worker's\r\njob predicate and the pulse endpoint."
      },
      "MaintenanceView": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "startsUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "expectedEndUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "effective": {
            "description": "The combined state — config switch OR database switch, unless ForceOff.",
            "$ref": "#/components/schemas/MaintenanceStatus"
          },
          "configurationEnabled": {
            "type": "boolean",
            "description": "`Maintenance:Enabled` in appsettings.json is on. The card cannot turn that off."
          },
          "forceOff": {
            "type": "boolean",
            "description": "`Maintenance:ForceOff` is on, overriding the database switch."
          }
        },
        "description": "The Maintenance card's view: the database switch, and what is actually in force."
      },
      "MarkReadRequest": {
        "type": "object",
        "properties": {
          "notificationId": {
            "type": [
              "null",
              "string"
            ],
            "description": "Null means every unread notification the caller has.",
            "format": "uuid"
          },
          "read": {
            "type": "boolean"
          }
        },
        "description": "Marking one notification, or all of them, read or unread."
      },
      "MessageDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "correlationId": {
            "type": "string",
            "format": "uuid"
          },
          "notificationTypeKey": {
            "type": "string"
          },
          "channel": {
            "$ref": "#/components/schemas/Channel"
          },
          "recipientUserId": {
            "type": [
              "null",
              "string"
            ]
          },
          "to": {
            "type": "string"
          },
          "subject": {
            "type": [
              "null",
              "string"
            ]
          },
          "body": {
            "type": [
              "null",
              "string"
            ],
            "description": "What was sent. Null once the retention job has trimmed it."
          },
          "bodyHidden": {
            "type": "boolean",
            "description": "True when the body was withheld because it grants access. See the remarks."
          },
          "status": {
            "$ref": "#/components/schemas/MessageStatus"
          },
          "sendAttempts": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "createdDate": {
            "type": "string",
            "format": "date-time"
          },
          "nextAttemptUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "sentUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "deliveredUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "readUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "providerName": {
            "type": [
              "null",
              "string"
            ]
          },
          "providerMessageId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errorMessage": {
            "type": [
              "null",
              "string"
            ]
          },
          "segments": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        },
        "description": "One message, with its body, for the expanded row of the message log."
      },
      "MessageFigures": {
        "type": "object",
        "properties": {
          "channel": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "Null for the every-channel line.",
                "$ref": "#/components/schemas/Channel"
              }
            ]
          },
          "name": {
            "type": "string"
          },
          "sent": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Accepted by the provider: sent, delivered or read.",
            "format": "int32"
          },
          "delivered": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Reported as arrived — the subset of int MessageFigures.Sent whose channel reports it.",
            "format": "int32"
          },
          "failed": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Given up on.",
            "format": "int32"
          },
          "suppressed": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Not sent on purpose (unsubscribed, cancelled). Not a failure.",
            "format": "int32"
          },
          "waiting": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "In the queue now — pending or being sent — whenever it was created.",
            "format": "int32"
          },
          "failureRate": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "description": "Failed as a share of the messages that finished one way or the other (sent or failed).\r\nNull when none finished. Suppressed and waiting messages are neither.",
            "format": "double"
          },
          "medianSendSeconds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "description": "Queued to accepted by the provider, the middle send. Includes retries and back-off.",
            "format": "double"
          },
          "p95SendSeconds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "description": "Queued to accepted: 95 in 100 sends were this quick or quicker.",
            "format": "double"
          }
        },
        "description": "One line of the summary: a channel, or every channel together."
      },
      "MessageLogRequest": {
        "type": "object",
        "properties": {
          "fromUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "toUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "channel": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Channel"
              }
            ]
          },
          "status": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MessageStatus"
              }
            ]
          },
          "notificationTypeKey": {
            "type": [
              "null",
              "string"
            ]
          },
          "recipientUserId": {
            "type": [
              "null",
              "string"
            ]
          },
          "search": {
            "type": [
              "null",
              "string"
            ],
            "description": "Matched against the address and the subject."
          },
          "skip": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "take": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        },
        "description": "Filters for the message log. Everything optional; nothing set means \"most recent\"."
      },
      "MessageLogResult": {
        "required": [
          "rows",
          "totalCount"
        ],
        "type": "object",
        "properties": {
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MessageLogRow"
            }
          },
          "totalCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        },
        "description": "A page of the message log, plus the total so the grid can page."
      },
      "MessageLogRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "correlationId": {
            "type": "string",
            "format": "uuid"
          },
          "notificationTypeKey": {
            "type": "string"
          },
          "typeDisplayName": {
            "type": "string"
          },
          "channel": {
            "$ref": "#/components/schemas/Channel"
          },
          "channelName": {
            "type": "string"
          },
          "to": {
            "type": "string",
            "description": "Masked for phone channels. A support screen needs to tell one recipient from another, not\r\nto publish everybody's mobile number to everyone who can read the log."
          },
          "recipientUserId": {
            "type": [
              "null",
              "string"
            ]
          },
          "recipientName": {
            "type": [
              "null",
              "string"
            ]
          },
          "subject": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/MessageStatus"
          },
          "sendAttempts": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "createdDate": {
            "type": "string",
            "format": "date-time"
          },
          "sentUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "deliveredUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "readUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "nextAttemptUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "providerName": {
            "type": [
              "null",
              "string"
            ]
          },
          "errorMessage": {
            "type": [
              "null",
              "string"
            ]
          },
          "segments": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        },
        "description": "One row of the message log."
      },
      "MessageStats": {
        "type": "object",
        "properties": {
          "days": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The period, in days: one of IReadOnlyList&lt;int&gt; MessageStatistics.Periods.",
            "format": "int32"
          },
          "fromUtc": {
            "type": "string",
            "format": "date-time"
          },
          "toUtc": {
            "type": "string",
            "format": "date-time"
          },
          "all": {
            "description": "Every channel together.",
            "$ref": "#/components/schemas/MessageFigures"
          },
          "byChannel": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MessageFigures"
            },
            "description": "One row per channel, in the order the UI shows channels; every channel, even a quiet one."
          },
          "previousSent": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Sent in the period before this one, for the trend.",
            "format": "int32"
          },
          "previousFailed": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Failed in the period before this one, for the trend.",
            "format": "int32"
          },
          "oldestWaitingUtc": {
            "type": [
              "null",
              "string"
            ],
            "description": "When the longest-waiting message was queued. Null when nothing is waiting.",
            "format": "date-time"
          },
          "timingSample": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "How many sends the timings were worked out from.",
            "format": "int32"
          },
          "timingCapped": {
            "type": "boolean",
            "description": "The period had more sends than the sample, so the timings describe the latest of them."
          }
        },
        "description": "How well messages have been going out over a recent period: the summary above the message log."
      },
      "MessageStatus": {
        "type": "integer",
        "description": "Where one queued message has got to."
      },
      "MessageTemplateDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "notificationTypeKey": {
            "type": "string"
          },
          "channel": {
            "$ref": "#/components/schemas/Channel"
          },
          "language": {
            "type": "string"
          },
          "subject": {
            "type": [
              "null",
              "string"
            ]
          },
          "body": {
            "type": "string"
          },
          "providerTemplateName": {
            "type": [
              "null",
              "string"
            ],
            "description": "For WhatsApp: the name of the template approved by Meta."
          },
          "providerTemplateParams": {
            "type": [
              "null",
              "string"
            ],
            "description": "For WhatsApp: the placeholders, in the order the approved template expects them."
          },
          "isActive": {
            "type": "boolean"
          },
          "lastUpdatedDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        },
        "description": "One template with its full wording, for the template editor."
      },
      "MessageTemplateEdit": {
        "required": [
          "notificationTypeKey",
          "body"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "notificationTypeKey": {
            "maxLength": 128,
            "type": "string"
          },
          "channel": {
            "$ref": "#/components/schemas/Channel"
          },
          "language": {
            "maxLength": 8,
            "type": "string"
          },
          "subject": {
            "maxLength": 512,
            "type": [
              "null",
              "string"
            ]
          },
          "body": {
            "type": "string"
          },
          "providerTemplateName": {
            "maxLength": 128,
            "type": [
              "null",
              "string"
            ]
          },
          "providerTemplateParams": {
            "maxLength": 512,
            "type": [
              "null",
              "string"
            ]
          },
          "isActive": {
            "type": "boolean"
          }
        },
        "description": "What the template editor posts back."
      },
      "MessageTemplateViewModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "notificationTypeKey": {
            "type": "string"
          },
          "typeDisplayName": {
            "type": "string",
            "description": "From the catalogue. Empty when the row's key no longer exists in this build."
          },
          "groupDisplayName": {
            "type": "string"
          },
          "channel": {
            "$ref": "#/components/schemas/Channel"
          },
          "channelName": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "subject": {
            "type": [
              "null",
              "string"
            ]
          },
          "isActive": {
            "type": "boolean"
          },
          "isDefaultWording": {
            "type": "boolean",
            "description": "True when the stored wording still matches the one shipped in the build."
          },
          "segments": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "SMS only: what this template costs to send, before any placeholder is filled.",
            "format": "int32"
          },
          "providerTemplateName": {
            "type": [
              "null",
              "string"
            ],
            "description": "WhatsApp only: the pre-approved template this quotes."
          },
          "lastUpdatedDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        },
        "description": "A template as the grid lists it."
      },
      "MonitoringView": {
        "type": "object",
        "properties": {
          "days": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The period the agents' counts cover, in days.",
            "format": "int32"
          },
          "agents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentMonitorRow"
            },
            "description": "Those with the most counted against them first."
          },
          "integrations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IntegrationHealth"
            }
          },
          "numberQuality": {
            "type": [
              "null",
              "string"
            ],
            "description": "How Meta last rated the WhatsApp number: GREEN, YELLOW or RED. Null until it has been asked."
          },
          "numberQualityCheckedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        },
        "description": "The platform's monitoring page: each agent's counts, and each supplier's health."
      },
      "NotificationDefinition": {
        "required": [
          "key",
          "groupKey",
          "groupDisplayName",
          "groupOrder",
          "displayName",
          "description",
          "allowed",
          "default",
          "mandatory",
          "mandatoryChannel"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "groupKey": {
            "type": "string"
          },
          "groupDisplayName": {
            "type": "string"
          },
          "groupOrder": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "displayName": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "allowed": {
            "$ref": "#/components/schemas/Channel"
          },
          "default": {
            "$ref": "#/components/schemas/Channel"
          },
          "mandatory": {
            "type": "boolean"
          },
          "mandatoryChannel": {
            "$ref": "#/components/schemas/Channel"
          },
          "containsSecret": {
            "type": "boolean",
            "default": false
          },
          "sendWithin": {
            "pattern": "^-?(\\d+\\.)?\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,7})?$",
            "type": [
              "null",
              "string"
            ]
          },
          "forContacts": {
            "type": "boolean",
            "default": false
          },
          "plainTextInConversation": {
            "type": "boolean",
            "default": false
          }
        },
        "description": "One notification type, as the preferences screen and the dispatcher need it."
      },
      "NotificationGroup": {
        "required": [
          "key",
          "displayName",
          "order",
          "types"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "order": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "types": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NotificationDefinition"
            }
          }
        },
        "description": "One section of the preferences screen, in display order."
      },
      "NotificationPreferences": {
        "type": "object",
        "properties": {
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PreferenceGroup"
            }
          },
          "channels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChannelAvailability"
            },
            "description": "Channels the user can actually choose right now — one that is disabled system-wide, or one\r\nwhose address they have not verified, is shown disabled with the reason rather than hidden."
          }
        },
        "description": "The preferences matrix: rows are notification types grouped, columns are channels."
      },
      "PermissionDefinition": {
        "required": [
          "key",
          "groupKey",
          "groupDisplayName",
          "groupOrder",
          "displayName",
          "description",
          "isSensitive"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "groupKey": {
            "type": "string"
          },
          "groupDisplayName": {
            "type": "string"
          },
          "groupOrder": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "displayName": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "isSensitive": {
            "type": "boolean"
          }
        },
        "description": "One permission, as the admin UI needs to render it."
      },
      "PermissionGroup": {
        "required": [
          "key",
          "displayName",
          "order",
          "permissions"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "order": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "permissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PermissionDefinition"
            }
          }
        },
        "description": "One group of permissions, in display order."
      },
      "PermissionSource": {
        "required": [
          "permission",
          "source",
          "kind"
        ],
        "type": "object",
        "properties": {
          "permission": {
            "type": "string",
            "description": "The permission key."
          },
          "source": {
            "type": "string",
            "description": "The job title's name, or the reason recorded on the override."
          },
          "kind": {
            "description": "How it was granted or withheld.",
            "$ref": "#/components/schemas/PermissionSourceKind"
          }
        },
        "description": "Where one effective permission came from."
      },
      "PermissionSourceKind": {
        "type": "integer"
      },
      "PhoneCodeTicket": {
        "type": "object",
        "properties": {
          "ticket": {
            "type": "string"
          },
          "message": {
            "type": "string",
            "description": "\"A code is on its way to +263***567.\""
          },
          "needsMessageFirst": {
            "type": "boolean",
            "description": "True when WhatsApp would not take the code from us, and the applicant should send any\r\nmessage to the business number first, then ask again. string PhoneCodeTicket.Ticket is then empty."
          }
        },
        "description": "What sending a code returns: the ticket the application must carry back with the code."
      },
      "PhoneVerificationRequest": {
        "type": "object",
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/Channel"
          },
          "phoneNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "code": {
            "type": [
              "null",
              "string"
            ]
          }
        },
        "description": "Both steps of proving a number: sending the code, and typing it back."
      },
      "PreferenceCell": {
        "required": [
          "channel",
          "allowed",
          "isSubscribed",
          "isLocked",
          "lockedReason",
          "source"
        ],
        "type": "object",
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/Channel"
          },
          "allowed": {
            "type": "boolean"
          },
          "isSubscribed": {
            "type": "boolean"
          },
          "isLocked": {
            "type": "boolean"
          },
          "lockedReason": {
            "type": [
              "null",
              "string"
            ]
          },
          "source": {
            "type": "string",
            "description": "Where the current answer came from: \"you\", \"everything on this channel\", or \"default\"."
          }
        },
        "description": "One cell: is it on, can it be changed, and if not why not."
      },
      "PreferenceChange": {
        "required": [
          "notificationTypeKey",
          "channel",
          "isSubscribed"
        ],
        "type": "object",
        "properties": {
          "notificationTypeKey": {
            "type": "string",
            "description": "A catalogue key, or \"*\" for the whole column."
          },
          "channel": {
            "$ref": "#/components/schemas/Channel"
          },
          "isSubscribed": {
            "type": "boolean"
          }
        },
        "description": "One cell of the preferences matrix, as the user changed it."
      },
      "PreferenceGroup": {
        "required": [
          "key",
          "displayName",
          "rows"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PreferenceRow"
            }
          }
        },
        "description": "One section of the preferences screen."
      },
      "PreferenceRow": {
        "required": [
          "notificationTypeKey",
          "displayName",
          "description",
          "mandatory",
          "cells"
        ],
        "type": "object",
        "properties": {
          "notificationTypeKey": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "mandatory": {
            "type": "boolean"
          },
          "cells": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PreferenceCell"
            },
            "description": "One entry per channel, in the order of IReadOnlyList&lt;ChannelAvailability&gt; NotificationPreferences.Channels."
          }
        },
        "description": "One notification type's row on the preferences screen."
      },
      "ProviderDescriptor": {
        "required": [
          "channel",
          "name",
          "isDummy",
          "fields"
        ],
        "type": "object",
        "properties": {
          "channel": {
            "description": "Which channel it serves.",
            "$ref": "#/components/schemas/Channel"
          },
          "name": {
            "type": "string",
            "description": "Matches `TblChannelConfig.ProviderName`."
          },
          "isDummy": {
            "type": "boolean",
            "description": "True for one that only writes to the log. Marked plainly in the UI."
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChannelSettingsField"
            },
            "description": "The settings form to render."
          },
          "callbackPath": {
            "type": [
              "null",
              "string"
            ],
            "description": "The API path its vendor posts delivery receipts to (`api/Webhook/WhatsAppCallback`), shown\r\non the form so it can be pasted into the vendor's console; null for a provider with no callbacks."
          }
        },
        "description": "One provider this build carries, for the channels page's dropdown."
      },
      "PulseModel": {
        "type": "object",
        "properties": {
          "maintenance": {
            "description": "Always present, signed in or not.",
            "$ref": "#/components/schemas/MaintenanceStatus"
          },
          "permissionVersion": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Changes when the caller's effective permissions change.",
            "format": "int64"
          },
          "unreadNotifications": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Zero for an anonymous caller.",
            "format": "int32"
          },
          "product": {
            "type": [
              "null",
              "string"
            ],
            "description": "Which product's API answered. Always present, signed in or not."
          }
        },
        "description": "What one poll of `GET api/System/GetPulse` answers."
      },
      "RequestChangePassword": {
        "required": [
          "oldPassword",
          "newPassword",
          "confirmPassword"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "Optional, and only ever the caller's own id: the API changes the signed-in user's password\r\nand refuses a request naming anybody else.",
            "format": "uuid"
          },
          "oldPassword": {
            "type": "string"
          },
          "newPassword": {
            "type": "string"
          },
          "confirmPassword": {
            "type": "string"
          }
        },
        "description": "The signed-in user changing their own password."
      },
      "RequestForgotPassword": {
        "required": [
          "email"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          }
        },
        "description": "\"Forgot password?\" Always answered the same way, whether or not the address exists."
      },
      "RequestJobTitle": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 128,
            "type": "string"
          },
          "description": {
            "maxLength": 500,
            "type": [
              "null",
              "string"
            ]
          },
          "isActive": {
            "type": "boolean"
          },
          "requiresTwoFactor": {
            "type": "boolean",
            "description": "Holders must use two-factor authentication."
          }
        },
        "description": "Create or rename a job title."
      },
      "RequestJobTitlePermissions": {
        "type": "object",
        "properties": {
          "permissionKeys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "description": "The complete set of permissions a job title should grant."
      },
      "RequestLoginAccount": {
        "type": "object",
        "properties": {
          "login": {
            "maxLength": 256,
            "minLength": 0,
            "type": "string",
            "description": "What the person signs in with: their email, or their verified phone number."
          },
          "password": {
            "maxLength": 256,
            "minLength": 0,
            "type": "string"
          }
        }
      },
      "RequestMaintenance": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "message": {
            "maxLength": 1000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "startsUtc": {
            "type": [
              "null",
              "string"
            ],
            "description": "Null means \"now\".",
            "format": "date-time"
          },
          "expectedEndUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        },
        "description": "What the Maintenance card submits."
      },
      "RequestPhoneCode": {
        "required": [
          "phone"
        ],
        "type": "object",
        "properties": {
          "phone": {
            "maxLength": 32,
            "type": "string"
          }
        },
        "description": "Asks for a WhatsApp code to prove the applicant owns the number on the form."
      },
      "RequestRegisterAccount": {
        "required": [
          "firstName",
          "lastName",
          "email"
        ],
        "type": "object",
        "properties": {
          "firstName": {
            "maxLength": 100,
            "minLength": 0,
            "type": "string"
          },
          "lastName": {
            "maxLength": 100,
            "minLength": 0,
            "type": "string"
          },
          "email": {
            "maxLength": 256,
            "minLength": 0,
            "type": "string"
          },
          "phoneNumber": {
            "maxLength": 32,
            "minLength": 0,
            "type": "string"
          }
        }
      },
      "RequestResetPassword": {
        "required": [
          "userId",
          "newPassword",
          "confirmPassword"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "newPassword": {
            "type": "string"
          },
          "confirmPassword": {
            "type": "string"
          },
          "passwordExpiryDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "passwordNeverExpires": {
            "type": "boolean"
          }
        },
        "description": "An administrator setting somebody else's password."
      },
      "RequestSetPassword": {
        "required": [
          "userId",
          "token",
          "newPassword",
          "confirmPassword"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "token": {
            "type": "string",
            "description": "The link's token, Base64Url-encoded as it appears in the link."
          },
          "newPassword": {
            "type": "string"
          },
          "confirmPassword": {
            "type": "string"
          }
        },
        "description": "Setting a password from an emailed link: an invitation, a reset, or an expired password."
      },
      "RequestTwoFactorEnable": {
        "type": "object",
        "properties": {
          "ticket": {
            "type": [
              "null",
              "string"
            ],
            "description": "Set during a sign-in that requires setup; empty when a signed-in user turns it on."
          },
          "method": {
            "description": "TwoFactorMethod.Authenticator confirms the app just registered;\r\n        TwoFactorMethod.SentCode confirms a setup code that was sent, for someone with no app.",
            "$ref": "#/components/schemas/TwoFactorMethod"
          },
          "code": {
            "type": "string"
          }
        }
      },
      "RequestTwoFactorSendCode": {
        "type": "object",
        "properties": {
          "ticket": {
            "type": "string",
            "description": "The sign-in ticket. Empty when a signed-in user asks for a setup code."
          },
          "channel": {
            "$ref": "#/components/schemas/Channel"
          }
        }
      },
      "RequestTwoFactorTicket": {
        "type": "object",
        "properties": {
          "ticket": {
            "type": "string"
          }
        }
      },
      "RequestTwoFactorVerify": {
        "type": "object",
        "properties": {
          "ticket": {
            "type": "string"
          },
          "method": {
            "$ref": "#/components/schemas/TwoFactorMethod"
          },
          "code": {
            "type": "string"
          }
        }
      },
      "RequestUpdateAccount": {
        "required": [
          "userId"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "firstName": {
            "maxLength": 100,
            "minLength": 0,
            "type": "string"
          },
          "lastName": {
            "maxLength": 100,
            "minLength": 0,
            "type": "string"
          },
          "description": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "phoneNumber": {
            "maxLength": 32,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "RequestUpdateJobSchedule": {
        "type": "object",
        "properties": {
          "isEnabled": {
            "type": "boolean"
          },
          "cronExpression": {
            "maxLength": 64,
            "type": [
              "null",
              "string"
            ],
            "description": "Five-field cron in UTC. Leave empty to keep the current one."
          }
        },
        "description": "Enable, disable or reschedule a job."
      },
      "RequestUpdateSetting": {
        "type": "object",
        "properties": {
          "key": {
            "maxLength": 128,
            "minLength": 0,
            "type": "string"
          },
          "value": {
            "maxLength": 4000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ],
            "description": "Null or empty resets text and date settings; other types need a value."
          }
        }
      },
      "RequestUserJobTitles": {
        "type": "object",
        "properties": {
          "jobTitleIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "description": "The complete set of job titles a user should hold."
      },
      "RequestUserPermissionOverride": {
        "required": [
          "permissionKey",
          "reason"
        ],
        "type": "object",
        "properties": {
          "permissionKey": {
            "type": "string"
          },
          "isGranted": {
            "type": "boolean",
            "description": "True grants it; false withholds it even when a job title grants it."
          },
          "reason": {
            "maxLength": 500,
            "type": "string",
            "description": "Required: an exception nobody can explain later is one nobody dares remove."
          }
        },
        "description": "Grant or withhold a single permission for one user, outside their job titles."
      },
      "ResolveErrorRequest": {
        "required": [
          "errorId"
        ],
        "type": "object",
        "properties": {
          "errorId": {
            "type": "string"
          },
          "note": {
            "maxLength": 1000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ],
            "description": "Optional note — \"fixed in 1.4.2\", \"external outage\"."
          }
        },
        "description": "Marking a fault, and everything sharing its fingerprint, as dealt with."
      },
      "ResponseLoginAccount": {
        "type": "object",
        "properties": {
          "nextStep": {
            "description": "SignInStep.None when this is a finished sign-in. Otherwise there is no token, and\r\n        string? ResponseLoginAccount.Ticket carries the password step across to the next one.",
            "$ref": "#/components/schemas/SignInStep"
          },
          "ticket": {
            "type": [
              "null",
              "string"
            ],
            "description": "Short-lived and single-purpose; only meaningful with a SignInStep ResponseLoginAccount.NextStep."
          },
          "twoFactor": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "With SignInStep.TwoFactor: the ways this user can prove the second factor.",
                "$ref": "#/components/schemas/TwoFactorChallenge"
              }
            ]
          },
          "token": {
            "type": [
              "null",
              "string"
            ]
          },
          "expiration": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "userId": {
            "type": [
              "null",
              "string"
            ]
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "phone": {
            "type": [
              "null",
              "string"
            ]
          },
          "jobTitles": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Job title names, for display."
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "What this user may do, as the API resolved it at sign-in."
          }
        }
      },
      "ResponseOfAgentDetail": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AgentDetail"
              }
            ]
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfApplicationOptions": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApplicationOptions"
              }
            ]
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfApplicationUserViewModel": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApplicationUserViewModel"
              }
            ]
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfAuditSearchResult": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AuditSearchResult"
              }
            ]
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfAuthenticatorSetup": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AuthenticatorSetup"
              }
            ]
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfboolean": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "type": "boolean"
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfConsignmentDetail": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ConsignmentDetail"
              }
            ]
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfConsignmentFormOptions": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ConsignmentFormOptions"
              }
            ]
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfConsignmentPreview": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ConsignmentPreview"
              }
            ]
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfCreditSummary": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CreditSummary"
              }
            ]
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfDashboardViewModel": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DashboardViewModel"
              }
            ]
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfErrorGroupPage": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ErrorGroupPage"
              }
            ]
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfErrorLogViewModel": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ErrorLogViewModel"
              }
            ]
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfGuid": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "type": "string",
            "format": "uuid"
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfInAppPage": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/InAppPage"
              }
            ]
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfInAppSummary": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/InAppSummary"
              }
            ]
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfint": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfIReadOnlyListOfAgentSummary": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/AgentSummary"
            }
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfIReadOnlyListOfAgentTaskView": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/AgentTaskView"
            }
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfIReadOnlyListOfAuditLogViewModel": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/AuditLogViewModel"
            }
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfIReadOnlyListOfChannelConfigViewModel": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ChannelConfigViewModel"
            }
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfIReadOnlyListOfConsignmentSummary": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ConsignmentSummary"
            }
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfIReadOnlyListOfCreditLine": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/CreditLine"
            }
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfIReadOnlyListOfDriverView": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/DriverView"
            }
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfIReadOnlyListOfErrorLogViewModel": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ErrorLogViewModel"
            }
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfIReadOnlyListOfIntegrationOption": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/IntegrationOption"
            }
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfIReadOnlyListOfJobHistoryViewModel": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/JobHistoryViewModel"
            }
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfIReadOnlyListOfJobScheduleViewModel": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/JobScheduleViewModel"
            }
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfIReadOnlyListOfJobTitleSummary": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/JobTitleSummary"
            }
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfIReadOnlyListOfMessageDetail": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/MessageDetail"
            }
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfIReadOnlyListOfMessageTemplateViewModel": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/MessageTemplateViewModel"
            }
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfIReadOnlyListOfNotificationGroup": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/NotificationGroup"
            }
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfIReadOnlyListOfPermissionGroup": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/PermissionGroup"
            }
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfIReadOnlyListOfProviderDescriptor": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ProviderDescriptor"
            }
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfIReadOnlyListOfSettingView": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/SettingView"
            }
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfIReadOnlyListOfUserSessionView": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/UserSessionView"
            }
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfJobTitleDetail": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/JobTitleDetail"
              }
            ]
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfListOfstring": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfMaintenanceView": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MaintenanceView"
              }
            ]
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfMessageLogResult": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MessageLogResult"
              }
            ]
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfMessageStats": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MessageStats"
              }
            ]
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfMessageTemplateDetail": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MessageTemplateDetail"
              }
            ]
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfMonitoringView": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MonitoringView"
              }
            ]
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfNotificationPreferences": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/NotificationPreferences"
              }
            ]
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfPhoneCodeTicket": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PhoneCodeTicket"
              }
            ]
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfPulseModel": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PulseModel"
              }
            ]
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfResponseLoginAccount": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ResponseLoginAccount"
              }
            ]
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfResponseRegisterAccount": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ResponseRegisterAccount"
              }
            ]
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfstring": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "type": [
              "null",
              "string"
            ]
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfSystemInfoViewModel": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SystemInfoViewModel"
              }
            ]
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfTemplatePreview": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TemplatePreview"
              }
            ]
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfTwoFactorEnabled": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TwoFactorEnabled"
              }
            ]
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfTwoFactorStatus": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TwoFactorStatus"
              }
            ]
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfUserAccessDetail": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/UserAccessDetail"
              }
            ]
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfUserSearchResult": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/UserSearchResult"
              }
            ]
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseOfWorkerStatusViewModel": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Status"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "payload": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/WorkerStatusViewModel"
              }
            ]
          },
          "errorId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field-level validation errors, present only when Status Response&lt;T&gt;.Code is Status.Failed because of input."
          }
        }
      },
      "ResponseRegisterAccount": {
        "required": [
          "email"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The new account's id, so the caller can open it without looking it up by email."
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "RouteOption": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "SendTestRequest": {
        "type": "object",
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/Channel"
          },
          "to": {
            "type": "string"
          }
        },
        "description": "What the \"Send test\" button posts."
      },
      "SettingType": {
        "type": "integer",
        "description": "What kind of value a setting holds — decides how it is validated, stored and edited."
      },
      "SettingView": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "groupKey": {
            "type": "string"
          },
          "groupDisplayName": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "type": {
            "$ref": "#/components/schemas/SettingType"
          },
          "min": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "max": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "options": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "value": {
            "type": [
              "null",
              "string"
            ],
            "description": "The value in force. Always null for a secret — it is write-only."
          },
          "default": {
            "type": [
              "null",
              "string"
            ]
          },
          "isDefault": {
            "type": "boolean",
            "description": "True when nothing is stored and string? SettingView.Default applies."
          },
          "isSecret": {
            "type": "boolean"
          },
          "hasSecretValue": {
            "type": "boolean",
            "description": "For a secret: whether one has been set, which is all the page may know."
          },
          "lastChangedUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        },
        "description": "One row of the Settings page: the definition from code, the value from the table."
      },
      "ShippingStageRequest": {
        "required": [
          "stageCode"
        ],
        "type": "object",
        "properties": {
          "stageCode": {
            "maxLength": 32,
            "type": "string",
            "description": "`BOOKED` or `SAILED`."
          },
          "eta": {
            "type": [
              "null",
              "string"
            ],
            "description": "The estimated arrival, when the agent knows it.",
            "format": "date"
          }
        },
        "description": "A shipping stage set by hand, for a consignment with no working supplier link."
      },
      "SignInStep": {
        "type": "integer",
        "description": "What a sign-in still needs before it is complete."
      },
      "StageEventSource": {
        "type": "integer",
        "description": "Who or what a stage event came from."
      },
      "StageEventView": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "title": {
            "type": "string",
            "description": "The code in words: \"Sailed\"."
          },
          "source": {
            "$ref": "#/components/schemas/StageEventSource"
          },
          "observedAt": {
            "type": "string",
            "format": "date-time"
          },
          "clientFacing": {
            "type": "boolean",
            "description": "Whether the client is told about this one."
          },
          "note": {
            "type": [
              "null",
              "string"
            ]
          },
          "delivery": {
            "type": [
              "null",
              "string"
            ],
            "description": "What became of the client's message: \"Delivered\", \"Waiting to send\", \"Not sent: …\". Null when the client is not told."
          }
        },
        "description": "One line of a consignment's history."
      },
      "Status": {
        "type": "integer",
        "description": "Outcome of an operation, and the lifecycle state of things that have one."
      },
      "SystemInfoViewModel": {
        "type": "object",
        "properties": {
          "version": {
            "type": "string"
          },
          "commit": {
            "type": "string"
          },
          "environment": {
            "type": "string"
          },
          "machineName": {
            "type": "string"
          },
          "framework": {
            "type": "string"
          },
          "operatingSystem": {
            "type": "string"
          },
          "startedUtc": {
            "type": "string",
            "format": "date-time"
          },
          "serverTimeUtc": {
            "type": "string",
            "format": "date-time"
          },
          "database": {
            "type": [
              "null",
              "string"
            ],
            "description": "The database server and catalogue the API is connected to, e.g. `.\\SQLEXPRESS / AcmeDB`."
          },
          "workerLastRunUtc": {
            "type": [
              "null",
              "string"
            ],
            "description": "The most recent job run the worker recorded. Null when it has never run one.",
            "format": "date-time"
          },
          "health": {
            "type": "string",
            "description": "Healthy, Degraded or Unhealthy — the worst of List&lt;HealthCheckLine&gt; SystemInfoViewModel.Checks."
          },
          "checks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HealthCheckLine"
            }
          }
        },
        "description": "What is running, where, and whether its dependencies answer — the \"System info\" page."
      },
      "TemplatePreview": {
        "required": [
          "subject",
          "body",
          "placeholders",
          "missing",
          "segments",
          "isGsm7"
        ],
        "type": "object",
        "properties": {
          "subject": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "placeholders": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "missing": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "segments": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "isGsm7": {
            "type": [
              "null",
              "boolean"
            ]
          }
        },
        "description": "A rendered preview, plus what the editor should warn about."
      },
      "TemplatePreviewRequest": {
        "type": "object",
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/Channel"
          },
          "subject": {
            "type": [
              "null",
              "string"
            ]
          },
          "body": {
            "type": [
              "null",
              "string"
            ]
          },
          "sample": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Sample values for the placeholders, as the editor's side panel collected them."
          }
        },
        "description": "What the template editor's preview posts."
      },
      "TopUpDecision": {
        "type": "object",
        "properties": {
          "confirm": {
            "type": "boolean"
          },
          "credits": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The credits to add, when confirming. What was paid decides it, not what was asked for.",
            "format": "int32"
          },
          "reason": {
            "maxLength": 256,
            "type": [
              "null",
              "string"
            ],
            "description": "Why not, when rejecting. The agent is told this."
          }
        },
        "description": "The platform's answer to a top-up: the payment was found, or it was not."
      },
      "TopUpRequest": {
        "required": [
          "paymentReference"
        ],
        "type": "object",
        "properties": {
          "amountUsd": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "paymentReference": {
            "maxLength": 64,
            "type": "string",
            "description": "The payment's reference, from the confirmation message the agent received."
          }
        },
        "description": "An agent saying they have paid for credits."
      },
      "TwoFactorChallenge": {
        "type": "object",
        "properties": {
          "authenticator": {
            "type": "boolean"
          },
          "codeChannels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CodeChannel"
            },
            "description": "Verified addresses a code can be sent to, masked."
          }
        },
        "description": "What the second step of a sign-in can offer this user."
      },
      "TwoFactorEnabled": {
        "type": "object",
        "properties": {
          "recoveryCodes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "signIn": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "When it was turned on during a sign-in, the finished sign-in.",
                "$ref": "#/components/schemas/ResponseLoginAccount"
              }
            ]
          }
        },
        "description": "The result of turning two-factor on: the recovery codes, shown once."
      },
      "TwoFactorMethod": {
        "type": "integer",
        "description": "How a second factor is proven."
      },
      "TwoFactorStatus": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "hasAuthenticator": {
            "type": "boolean"
          },
          "recoveryCodesLeft": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "requiredByJobTitle": {
            "type": "boolean",
            "description": "A job title they hold requires it, so it cannot be turned off."
          },
          "codeChannels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CodeChannel"
            },
            "description": "Verified addresses a code can be sent to at sign-in."
          }
        },
        "description": "A user's two-factor state, for their own security page and for administrators."
      },
      "UnsubscribeRequest": {
        "type": "object",
        "properties": {
          "token": {
            "type": [
              "null",
              "string"
            ]
          }
        },
        "description": "What the unsubscribe page posts."
      },
      "UserAccessDetail": {
        "required": [
          "userId"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "jobTitles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JobTitleSummary"
            }
          },
          "overrides": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserPermissionOverride"
            }
          },
          "effectivePermissions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The permissions actually in force."
          },
          "provenance": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PermissionSource"
            },
            "description": "Where each one came from — \"from Sales Officer\", \"granted directly\", \"denied\".\r\nThis is what turns \"why can Sam do that?\" from an investigation into a glance."
          }
        },
        "description": "Everything about one user's access, for the Access tab."
      },
      "UserPermissionOverride": {
        "required": [
          "permissionKey"
        ],
        "type": "object",
        "properties": {
          "permissionKey": {
            "type": "string"
          },
          "isGranted": {
            "type": "boolean"
          },
          "reason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UserSearchResult": {
        "type": "object",
        "properties": {
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ViewUserViewModel"
            }
          },
          "totalCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        },
        "description": "One page of users, with the total so the grid can page on the server."
      },
      "UserSessionView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "createdUtc": {
            "type": "string",
            "format": "date-time"
          },
          "lastSeenUtc": {
            "type": "string",
            "format": "date-time"
          },
          "expiresUtc": {
            "type": "string",
            "format": "date-time"
          },
          "ipAddress": {
            "type": [
              "null",
              "string"
            ]
          },
          "device": {
            "type": "string",
            "description": "\"Chrome on Windows\" — enough to recognise a device, worked out from its user agent."
          },
          "isCurrent": {
            "type": "boolean",
            "description": "The session this request came from."
          }
        },
        "description": "One place the account is signed in, for My account → Security."
      },
      "VehicleRecord": {
        "type": "object",
        "properties": {
          "year": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "make": {
            "maxLength": 64,
            "type": [
              "null",
              "string"
            ]
          },
          "model": {
            "maxLength": 64,
            "type": [
              "null",
              "string"
            ]
          },
          "grade": {
            "maxLength": 64,
            "type": [
              "null",
              "string"
            ]
          },
          "chassisNo": {
            "maxLength": 64,
            "type": [
              "null",
              "string"
            ],
            "description": "What identifies the vehicle everywhere: on the supplier's page, to the driver, at the border."
          },
          "engineNo": {
            "maxLength": 64,
            "type": [
              "null",
              "string"
            ]
          },
          "colour": {
            "maxLength": 32,
            "type": [
              "null",
              "string"
            ]
          },
          "engineCc": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "fuel": {
            "maxLength": 32,
            "type": [
              "null",
              "string"
            ]
          },
          "transmission": {
            "maxLength": 32,
            "type": [
              "null",
              "string"
            ]
          },
          "mileageKm": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        },
        "description": "The vehicle on a consignment: what the form shows, and what is stored as the goods' details."
      },
      "ViewUserViewModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "firstName": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastName": {
            "type": [
              "null",
              "string"
            ]
          },
          "userName": {
            "type": [
              "null",
              "string"
            ]
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "emailConfirmed": {
            "type": "boolean"
          },
          "phoneNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "lockoutEnd": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lockoutEnabled": {
            "type": "boolean"
          },
          "accessFailedCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "createdDate": {
            "type": "string",
            "format": "date-time"
          },
          "lastLogin": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "isLocked": {
            "type": "boolean",
            "description": "Whether the account cannot sign in right now — the same rule as\r\n`ApplicationUserViewModel.IsLocked` (see `UserMapping.ToViewModel`), so the list and\r\nthe user's own page never disagree about it."
          }
        },
        "description": "A row of the users grid."
      },
      "WorkerStatusViewModel": {
        "required": [
          "machineName",
          "version"
        ],
        "type": "object",
        "properties": {
          "machineName": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "startedUtc": {
            "type": "string",
            "format": "date-time"
          },
          "lastSeenUtc": {
            "type": "string",
            "format": "date-time"
          },
          "stoppedUtc": {
            "type": [
              "null",
              "string"
            ],
            "description": "Set by an orderly stop; null while it runs, and after a crash or a kill.",
            "format": "date-time"
          }
        },
        "description": "The worker as the Jobs page shows it: where it runs, since when, and whether it is alive."
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "description": "The token from POST api/Account/Login.",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "security": [
    {
      "Bearer": [ ]
    }
  ],
  "tags": [
    {
      "name": "Account"
    },
    {
      "name": "Audit"
    },
    {
      "name": "Comms"
    },
    {
      "name": "Dashboard"
    },
    {
      "name": "ErrorLog"
    },
    {
      "name": "Permission"
    },
    {
      "name": "Setting"
    },
    {
      "name": "System"
    },
    {
      "name": "User"
    },
    {
      "name": "Webhook"
    },
    {
      "name": "Worker"
    },
    {
      "name": "Driver"
    },
    {
      "name": "Credit"
    },
    {
      "name": "AgentTask"
    },
    {
      "name": "Consignment"
    },
    {
      "name": "Agent"
    },
    {
      "name": "Integration"
    },
    {
      "name": "Monitoring"
    },
    {
      "name": "Registration"
    }
  ]
}