{
  "openapi": "3.0.1",
  "info": {
    "title": "AEMO Prudential API",
    "version": "v1"
  },
  "paths": {
    "/api/v2/prudential": {
      "get": {
        "tags": [
          "Prudential"
        ],
        "summary": "Retrieves the high-level summary of a participant’s prudential position",
        "parameters": [
          {
            "name": "dateFrom",
            "in": "query",
            "description": "The trading day associated with the start of the request e.g. 2021-06-01",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "dateTo",
            "in": "query",
            "description": "The trading day associated with the end of the request e.g. 2021-07-31",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "participantCode",
            "in": "query",
            "description": "This is automatically populated from the authenticated certificate",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PrudentialCalculationViewModelV2ListOkResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrudentialCalculationViewModelV2ListOkResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrudentialCalculationViewModelV2ListOkResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/api/v2/prudential/summary/latest": {
      "get": {
        "tags": [
          "Prudential"
        ],
        "summary": "Retrieves the latest Outstanding Amount for a participant",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PrudentialCalculationSummaryViewModelV2OkResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrudentialCalculationSummaryViewModelV2OkResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrudentialCalculationSummaryViewModelV2OkResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/api/v2/prudential/detail/{tradingDay}": {
      "get": {
        "tags": [
          "Prudential"
        ],
        "summary": "Retrieves the low-level details for a single day, associated with a participant’s prudential position",
        "parameters": [
          {
            "name": "tradingDay",
            "in": "path",
            "description": "The trading day associated with the request e.g. 2019-10-25",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SettlementOutputViewModelV2OkResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettlementOutputViewModelV2OkResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettlementOutputViewModelV2OkResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/api/v2/prudential/estimation/{tradingDay}": {
      "get": {
        "tags": [
          "Prudential"
        ],
        "summary": "Retrieves the low-level NSTEM estimation details for a single day, associated with a participant’s prudential position",
        "parameters": [
          {
            "name": "tradingDay",
            "in": "path",
            "description": "The trading day associated with the request e.g. 2019-10-25",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SettlementOutputViewModelV2OkResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettlementOutputViewModelV2OkResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettlementOutputViewModelV2OkResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/api/v2/settlements/{marketService}/summary/{periodFrom}/{designation}": {
      "get": {
        "tags": [
          "Settlement"
        ],
        "summary": "Retrieves the high-level summary of a settlement statement for a settlement period, associated with a participant",
        "parameters": [
          {
            "name": "marketService",
            "in": "path",
            "description": "The market service type of the settlement run (WEM|NSTEM|STEM)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "periodFrom",
            "in": "path",
            "description": "The trading day at the start of the settlement period e.g. 2021-06-01",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "designation",
            "in": "path",
            "description": "The settlement run type designation (INITIAL|ADJ1|ADJ2|ADJ3 for WEM|NSTEM, INITIAL for STEM)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "participantCode",
            "in": "query",
            "description": "This is automatically populated from the authenticated certificate",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SettlementStatementSummaryViewModelV2OkResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettlementStatementSummaryViewModelV2OkResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettlementStatementSummaryViewModelV2OkResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/api/v2/settlements/{marketService}/detail/{tradingDay}/{designation}": {
      "get": {
        "tags": [
          "Settlement"
        ],
        "summary": "Retrieves the low-level details of a settlement statement for a trading day, associated with a participant",
        "parameters": [
          {
            "name": "marketService",
            "in": "path",
            "description": "The market Service type of the settlement run (WEM|NSTEM|STEM)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tradingDay",
            "in": "path",
            "description": "The trading day associated with the request e.g. 2021-06-15",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "designation",
            "in": "path",
            "description": "The settlement run type designation (INITIAL|ADJ1|ADJ2|ADJ3 for WEM|NSTEM, INITIAL for STEM)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "participantCode",
            "in": "query",
            "description": "This is automatically populated from the authenticated certificate",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SettlementOutputDetailsViewModelV2OkResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettlementOutputDetailsViewModelV2OkResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettlementOutputDetailsViewModelV2OkResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/api/v2/settlements/{marketService}/estimation/{periodFrom}/{designation}/{tradingDay}": {
      "get": {
        "tags": [
          "Settlement"
        ],
        "summary": "Retrieves the low-level details of an NSTEM estimation settlement statement for a trading day, associated with a participant",
        "parameters": [
          {
            "name": "marketService",
            "in": "path",
            "description": "The market service type of the settlement run (NSTEM)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "periodFrom",
            "in": "path",
            "description": "The trading day at the start of the settlement period e.g. 2021-06-01",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "designation",
            "in": "path",
            "description": "The settlement run type designation (INITIAL|ADJ1|ADJ2|ADJ3 for NSTEM)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tradingDay",
            "in": "path",
            "description": "The trading day associated with the request e.g. 2021-06-15",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "participantCode",
            "in": "query",
            "description": "This is automatically populated from the authenticated certificate",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SettlementOutputDetailsViewModelV2OkResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettlementOutputDetailsViewModelV2OkResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettlementOutputDetailsViewModelV2OkResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/api/v2/settlements/{marketService}/invoiceFile/{periodFrom}/{designation}": {
      "get": {
        "tags": [
          "Settlement"
        ],
        "summary": "Retrieves the settlement invoice as a PDF for a settlement period, associated with a participant",
        "parameters": [
          {
            "name": "marketService",
            "in": "path",
            "description": "The market Service type of the settlement run (WEM|NSTEM|STEM)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "periodFrom",
            "in": "path",
            "description": "The trading day at the start of the settlement period e.g. 2021-06-01",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "designation",
            "in": "path",
            "description": "The settlement run type designation (INITIAL|ADJ1|ADJ2|ADJ3 for WEM|NSTEM, INITIAL for STEM)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "participantCode",
            "in": "query",
            "description": "This is automatically populated from the authenticated certificate",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/api/v2/settlements/{marketService}/invoice/{periodFrom}/{designation}": {
      "get": {
        "tags": [
          "Settlement"
        ],
        "summary": "Retrieves the settlement invoice for a settlement period, associated with a participant",
        "parameters": [
          {
            "name": "marketService",
            "in": "path",
            "description": "The market Service of the settlement run (WEM|NSTEM|STEM)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "periodFrom",
            "in": "path",
            "description": "The trading day at the start of the settlement period e.g. 2021-06-01",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "designation",
            "in": "path",
            "description": "The settlement run type designation (INITIAL|ADJ1|ADJ2|ADJ3 for WEM|NSTEM, INITIAL for STEM)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "participantCode",
            "in": "query",
            "description": "This is automatically populated from the authenticated certificate",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SettlementInvoiceViewModelV2OkResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettlementInvoiceViewModelV2OkResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettlementInvoiceViewModelV2OkResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/api/v2/settlements/timeline": {
      "get": {
        "tags": [
          "Settlement"
        ],
        "summary": "Retrieves the settlement cycle timeline.",
        "parameters": [
          {
            "name": "invoiceDateFrom",
            "in": "query",
            "description": "The settlement invoice day associated with the start of the request e.g. 2021-08-09",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "invoiceDateTo",
            "in": "query",
            "description": "The settlement invoice day associated with the end of the request e.g. 2022-08-08",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SettlementCycleTimelineViewModelV2OkResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettlementCycleTimelineViewModelV2OkResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettlementCycleTimelineViewModelV2OkResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AdjustmentGstApplicable": {
        "type": "object",
        "properties": {
          "gstExclusive": {
            "$ref": "#/components/schemas/AdjustmentLine"
          },
          "gst": {
            "$ref": "#/components/schemas/AdjustmentLine"
          },
          "gstInclusive": {
            "$ref": "#/components/schemas/AdjustmentLine"
          }
        },
        "additionalProperties": false
      },
      "AdjustmentLine": {
        "required": [
          "adjustment",
          "current",
          "previous"
        ],
        "type": "object",
        "properties": {
          "previous": {
            "type": "number",
            "description": "The amount applicable for the billing line item in the previous invoice. Format: decimal(28,2) (e.g. 12345.12)",
            "format": "double"
          },
          "current": {
            "type": "number",
            "description": "The amount applicable for the billing line item in the current invoice. Format: decimal(28,2) (e.g. 12345.12)",
            "format": "double"
          },
          "adjustment": {
            "type": "number",
            "description": "The difference between the amount applicable for the billing line item in the current invoice and previous invoice. Format: decimal(28,2) (e.g. 12345.12)",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "AdjustmentSummary": {
        "type": "object",
        "properties": {
          "recipientCreatedTaxInvoiceAdjustment": {
            "$ref": "#/components/schemas/TaxInvoiceAdjustment"
          },
          "taxInvoiceAdjustment": {
            "$ref": "#/components/schemas/TaxInvoiceAdjustment"
          }
        },
        "additionalProperties": false
      },
      "CalculationDataViewModelV2": {
        "type": "object",
        "properties": {
          "tradingDay": {
            "type": "string",
            "description": "The Trading Day associated with the variables",
            "format": "date-time"
          },
          "variables": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CalculationVariableViewModelV2"
            },
            "description": "An array of variables required to determine the estimated exposure",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CalculationVariableViewModelV2": {
        "type": "object",
        "properties": {
          "variable": {
            "type": "string",
            "description": "The name of the variable",
            "nullable": true
          },
          "scope": {
            "type": "string",
            "description": "The entity to which the variable applies",
            "nullable": true
          },
          "granularity": {
            "type": "string",
            "description": "The granularity of the variable as outlined in the WEM Metering, Settlement and Prudential Calculations document",
            "nullable": true
          },
          "value": {
            "type": "array",
            "items": {
              "type": "number",
              "format": "double"
            },
            "description": "A list of values (e.g. If the variable is Trading Interval granularity, then there are 48 values listed in chronological order)\r\nFormat for each array item: decimal(23,8) (e.g. 123.12345678)",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CycleViewModelV2": {
        "required": [
          "marketService",
          "period",
          "periodFrom",
          "periodTo"
        ],
        "type": "object",
        "properties": {
          "period": {
            "maxLength": 30,
            "minLength": 0,
            "type": "string",
            "description": "The name of the cycle\r\nFormat: TW DD MMM YYY for WEM (e.g. TW 08 Oct 2023), MMM YYYY for NSTEM (e.g. Jun 2021), TW WW/YY for STEM (e.g. TW 30/21)"
          },
          "marketService": {
            "maxLength": 20,
            "minLength": 0,
            "pattern": "WEM|NSTEM|STEM",
            "type": "string",
            "description": "The market service of the cycle (WEM|NSTEM|STEM)"
          },
          "periodFrom": {
            "pattern": "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}",
            "type": "string",
            "description": "The timestamp marking the start of the cycle.\r\nFormat: yyyy-MM-ddTHH:mm:ss (e.g. 2021-06-01T08:00:00)",
            "format": "date-time"
          },
          "periodTo": {
            "pattern": "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}",
            "type": "string",
            "description": "The timestamp marking the end of the cycle.\r\nFormat: yyyy-MM-ddTHH:mm:ss (e.g. 2021-07-01T08:00:00)",
            "format": "date-time"
          },
          "runs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RunViewModelV2"
            },
            "description": "An array of runs of associated with the cycle",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "InvoiceTotal": {
        "required": [
          "gst",
          "gstExclusive",
          "gstInclusive"
        ],
        "type": "object",
        "properties": {
          "gstExclusive": {
            "type": "number",
            "description": "The ex-GST amount applicable to the invoice. Format: decimal(28,2) (e.g. 12345.12)",
            "format": "double"
          },
          "gst": {
            "type": "number",
            "description": "The GST amount applicable to the invoice. Format: decimal(28,2) (e.g. 12345.12)",
            "format": "double"
          },
          "gstInclusive": {
            "type": "number",
            "description": "The ex-GST amount applicable plus the GST amount applicable to the invoice. Format: decimal(28,2) (e.g. 12345.12)",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "LineItem": {
        "required": [
          "amount"
        ],
        "type": "object",
        "properties": {
          "code": {
            "maxLength": 40,
            "minLength": 0,
            "type": "string",
            "description": "The code of the billing line item",
            "nullable": true
          },
          "description": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string",
            "description": "The description of the billing line item",
            "nullable": true
          },
          "amount": {
            "type": "number",
            "description": "The amount applicable for the billing line item. Format: decimal(18,2) (e.g. 12345.12)",
            "format": "double"
          },
          "gstApplicable": {
            "type": "boolean",
            "description": "Indicates if GST is applicable to the billing line item (true|false)",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Party": {
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string",
            "description": "The participant id associated with the invoice"
          },
          "name": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string",
            "description": "The business name associated with the party id"
          },
          "addressLine1": {
            "maxLength": 60,
            "minLength": 0,
            "type": "string",
            "description": "The postal address line 1 associated with the party id",
            "nullable": true
          },
          "addressLine2": {
            "maxLength": 40,
            "minLength": 0,
            "type": "string",
            "description": "The postal address line 2 associated with the party id",
            "nullable": true
          },
          "abn": {
            "maxLength": 20,
            "minLength": 0,
            "type": "string",
            "description": "The Australian Business Number associated with the party id",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PaymentSummary": {
        "required": [
          "payableAmount",
          "settlementRequired",
          "total"
        ],
        "type": "object",
        "properties": {
          "lineItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LineItem"
            },
            "description": "An array of billing line items associated with the invoice",
            "nullable": true
          },
          "total": {
            "type": "number",
            "description": "The total amount of all billing line items associated with the invoice. Format: decimal(18,2) (e.g. 12345.12)",
            "format": "double"
          },
          "prepaymentBalance": {
            "$ref": "#/components/schemas/PrepaymentBalance"
          },
          "payableAmount": {
            "type": "number",
            "description": "The amount required to be settled. Format: decimal(18,2) (e.g. 12345.12)",
            "format": "double"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Any additional information relating to the invoice",
            "nullable": true
          },
          "settlementRequired": {
            "type": "boolean",
            "description": "Identifies if settlement is required on the invoice (1|0)"
          }
        },
        "additionalProperties": false
      },
      "PrepaymentBalance": {
        "required": [
          "asAt",
          "balance"
        ],
        "type": "object",
        "properties": {
          "balance": {
            "type": "number",
            "description": "The prepayment balance (leftover prepayment plus new prepayment). Format: decimal(18,2) (e.g. 12345.12)",
            "format": "double"
          },
          "asAt": {
            "pattern": "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}",
            "type": "string",
            "description": "The effective date of prepayment balance. Format: yyyy-MM-ddTHH:mm:ss.fff (e.g. 2020-02-28T13:49:58.360)",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "PrudentialCalculationSummaryViewModelV2": {
        "type": "object",
        "properties": {
          "participantCode": {
            "type": "string",
            "description": "The participant Code",
            "nullable": true
          },
          "tradingDay": {
            "type": "string",
            "description": "The Trading Day associated with the response",
            "format": "date-time"
          },
          "outstandingAmount": {
            "type": "number",
            "description": "The participant's current Outstanding Amount",
            "format": "double"
          },
          "tradingMargin": {
            "type": "number",
            "description": "The participant's current Trading Margin",
            "format": "double"
          },
          "calculatedAt": {
            "type": "string",
            "description": "The time the calculation was performed",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "PrudentialCalculationSummaryViewModelV2OkResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PrudentialCalculationSummaryViewModelV2"
          }
        },
        "additionalProperties": false
      },
      "PrudentialCalculationViewModelV2": {
        "type": "object",
        "properties": {
          "participantCode": {
            "type": "string",
            "description": "The participant Code",
            "nullable": true
          },
          "tradingDay": {
            "type": "string",
            "description": "The Trading Day associated with the response",
            "format": "date-time"
          },
          "prepayment": {
            "type": "number",
            "description": "Prepayments held by AEMO on behalf of a participant as of TradingDay",
            "format": "double"
          },
          "invoiceNotPaid": {
            "type": "number",
            "description": "Amount of money a participant owes for which a Settlement Statement has been issued but payment has not been made as of TradingDay",
            "format": "double"
          },
          "cumulativeEstimatedExposure": {
            "type": "number",
            "description": "Cumulative estimated exposure for the participant as of TradingDay",
            "format": "double"
          },
          "outstandingAmount": {
            "type": "number",
            "description": "Outstanding Amount for the participant as of TradingDay",
            "format": "double"
          },
          "creditSupport": {
            "type": "number",
            "description": "Credit Support held by AEMO on behalf of the participant as of TradingDay",
            "format": "double"
          },
          "creditLimit": {
            "type": "number",
            "description": "Credit Limit for the participant as of TradingDay",
            "format": "double"
          },
          "tradingLimit": {
            "type": "number",
            "description": "Trading Limit for the participant as of TradingDay",
            "format": "double"
          },
          "tradingMargin": {
            "type": "number",
            "description": "Trading Margin for the participant as of TradingDay",
            "format": "double"
          },
          "calculatedAt": {
            "type": "string",
            "description": "The time the calculation was performed",
            "format": "date-time"
          },
          "isForecast": {
            "type": "boolean",
            "description": "Indicates whether the calculation was a forecast"
          }
        },
        "additionalProperties": false
      },
      "PrudentialCalculationViewModelV2ListOkResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PrudentialCalculationViewModelV2"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RunViewModelV2": {
        "required": [
          "invoiceDate",
          "settlementDate",
          "statementDate"
        ],
        "type": "object",
        "properties": {
          "designation": {
            "maxLength": 30,
            "minLength": 0,
            "type": "string",
            "description": "The designation of the run (INITIAL|ADJ1|ADJ2|ADJ3 for WEM|NSTEM, whitespace|null|INITIAL for STEM)",
            "nullable": true
          },
          "commencementDate": {
            "pattern": "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}",
            "type": "string",
            "description": "The commencement date of the run. This is the business day on which AEMO will commence the initial or adjustment process for WEM|NSTEM.\r\nThis value is omitted for STEM.\r\nFormat: null for STEM, yyyy-MM-ddTHH:mm:ss for WEM|NSTEM (e.g. 2021-11-12T00:00:00)",
            "format": "date-time",
            "nullable": true
          },
          "statementDate": {
            "pattern": "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}",
            "type": "string",
            "description": "The statement date of the run. This is the business day by which the settlement statement for the run must be issued by AEMO.\r\nFormat: yyyy-MM-ddTHH:mm:ss (e.g. 2021-12-15T00:00:00)",
            "format": "date-time"
          },
          "invoiceDate": {
            "pattern": "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}",
            "type": "string",
            "description": "The invoice date of the run. This is the business day by which the invoice for the run must be issued by AEMO.\r\nFormat: yyyy-MM-ddTHH:mm:ss (e.g. 2021-12-17T00:00:00)",
            "format": "date-time"
          },
          "settlementDate": {
            "pattern": "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}",
            "type": "string",
            "description": "The settlement date of the run. This is the business day on which the transactions covered by the settlement statement for the run are settled.\r\nFormat: yyyy-MM-ddTHH:mm:ss (e.g. 2021-12-21T00:00:00)",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "SettlementCalculationDataViewModelV2": {
        "required": [
          "tradingDay",
          "variables"
        ],
        "type": "object",
        "properties": {
          "tradingDay": {
            "pattern": "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}",
            "type": "string",
            "description": "A specific trading day within tradingDays. Format: yyyy-MM-ddTHH:mm:ss (e.g. 2020-05-31T00:00:00)",
            "format": "date-time"
          },
          "variables": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SettlementCalculationVariableViewModelV2"
            },
            "description": "An array of variables associated with tradingDay"
          }
        },
        "additionalProperties": false
      },
      "SettlementCalculationVariableViewModelV2": {
        "required": [
          "gstApplicable",
          "pOrC",
          "value",
          "variable"
        ],
        "type": "object",
        "properties": {
          "variable": {
            "maxLength": 60,
            "minLength": 0,
            "type": "string",
            "description": "A variable within variables. (e.g. TOTNSTEM_P_D)"
          },
          "pOrC": {
            "maxLength": 8,
            "minLength": 0,
            "type": "string",
            "description": "Indicates whether the transaction is a payment from AEMO to the participant (P) or a charge paid by the participant to AEMO (C)"
          },
          "gstApplicable": {
            "maxLength": 1,
            "minLength": 0,
            "type": "string",
            "description": "Indicates if GST is applicable to the variable (Y|N)"
          },
          "value": {
            "type": "number",
            "description": "A list of values (e.g. If the variable is trading interval granularity, then there are 48 values listed in chronological order)\r\nFormat: decimal(23,8) (e.g. 123.12345678)",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "SettlementCycleTimelineViewModelV2": {
        "type": "object",
        "properties": {
          "cycles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CycleViewModelV2"
            },
            "description": "An array of settlement cycles associated with the request",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SettlementCycleTimelineViewModelV2OkResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SettlementCycleTimelineViewModelV2"
          }
        },
        "additionalProperties": false
      },
      "SettlementInvoiceViewModelV2": {
        "required": [
          "dueDate",
          "id",
          "invoiceDate",
          "market"
        ],
        "type": "object",
        "properties": {
          "id": {
            "maxLength": 20,
            "minLength": 0,
            "type": "string",
            "description": "The unique identifier of the invoice"
          },
          "reversedId": {
            "maxLength": 20,
            "minLength": 0,
            "type": "string",
            "description": "The unique identifier of the invoice reversal, if applicable",
            "nullable": true
          },
          "party": {
            "$ref": "#/components/schemas/Party"
          },
          "invoiceDate": {
            "pattern": "\\d{4}-\\d{2}-\\d{2}",
            "type": "string",
            "description": "The date on which the invoice is published by AEMO",
            "format": "date-time"
          },
          "dueDate": {
            "pattern": "\\d{4}-\\d{2}-\\d{2}",
            "type": "string",
            "description": "The date on which the invoice is required to be settled",
            "format": "date-time"
          },
          "market": {
            "maxLength": 20,
            "minLength": 0,
            "type": "string",
            "description": "The market service of the settlement run associated with the invoice (WEM|NSTEM|STEM)"
          },
          "tradeWeek": {
            "maxLength": 14,
            "minLength": 0,
            "type": "string",
            "description": "If the invoice is for the WEM market service, then this value is the WEM trading week in TW DD MMM YYYY format. If the invoice is for the STEM market service, then this value is the STEM trading week in YYYY-WW format. Otherwise this value is omitted.",
            "nullable": true
          },
          "tradeMonth": {
            "maxLength": 7,
            "minLength": 0,
            "type": "string",
            "description": "If the invoice is for the NSTEM market service, then this value is the NSTEM trading month in YYYY-MM format. Otherwise this value is omitted",
            "nullable": true
          },
          "adjustment": {
            "maximum": 3,
            "minimum": 0,
            "type": "integer",
            "description": "A value indicating the initial version (0) or adjustment version of the invoice (1|2|3)",
            "format": "int32",
            "nullable": true
          },
          "title": {
            "maxLength": 200,
            "minLength": 0,
            "type": "string",
            "description": "The title of the invoice",
            "nullable": true
          },
          "paymentSummary": {
            "$ref": "#/components/schemas/PaymentSummary"
          },
          "recipientCreatedTaxInvoice": {
            "$ref": "#/components/schemas/TaxInvoice"
          },
          "taxInvoice": {
            "$ref": "#/components/schemas/TaxInvoice"
          },
          "adjustmentSummary": {
            "$ref": "#/components/schemas/AdjustmentSummary"
          }
        },
        "additionalProperties": false
      },
      "SettlementInvoiceViewModelV2OkResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SettlementInvoiceViewModelV2"
          }
        },
        "additionalProperties": false
      },
      "SettlementOutputCalculationDataViewModelV2": {
        "required": [
          "tradingDay",
          "variables"
        ],
        "type": "object",
        "properties": {
          "tradingDay": {
            "pattern": "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}",
            "type": "string",
            "description": "A specific trading day within tradingDays. Format: yyyy-MM-ddTHH:mm:ss (e.g. 2020-05-31T00:00:00)",
            "format": "date-time"
          },
          "variables": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SettlementOutputCalculationVariableViewModelV2"
            },
            "description": "An array of variables associated with tradingDay"
          }
        },
        "additionalProperties": false
      },
      "SettlementOutputCalculationVariableViewModelV2": {
        "required": [
          "granularity",
          "scope",
          "variable"
        ],
        "type": "object",
        "properties": {
          "variable": {
            "maxLength": 60,
            "minLength": 0,
            "type": "string",
            "description": "A variable within variables. (e.g. TOTNSTEM_P_D)"
          },
          "scope": {
            "maxLength": 70,
            "minLength": 0,
            "type": "string",
            "description": "The entity associated with Variable"
          },
          "granularity": {
            "maxLength": 5,
            "minLength": 0,
            "type": "string",
            "description": "Indicates the granularity of Variable as Trading Interval (I), Dispatch Interval (DI) Trading Day (D), Trading Week (W?), Trading Month (M), Capacity Year (CY), or Financial Year (FY)"
          },
          "value": {
            "type": "array",
            "items": {
              "type": "number",
              "format": "double"
            },
            "description": "A list of values\r\ne.g.\r\nIf the variable is trading interval granularity, then there are 48 values listed in chronological order\r\nIf the variable is dispatch interval granularity, then there are 288 values listed in chronological order\r\nFormat for each array item: decimal(23,8) (e.g. 123.12345678)",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SettlementOutputDetailsViewModelV2": {
        "required": [
          "designation",
          "marketService",
          "participantCode",
          "period",
          "periodFrom",
          "periodTo",
          "publishedAt",
          "runId",
          "tradingDay",
          "tradingDays"
        ],
        "type": "object",
        "properties": {
          "runId": {
            "maximum": 2147483647,
            "minimum": 1,
            "type": "integer",
            "description": "The id of this settlement run",
            "format": "int32"
          },
          "publishedAt": {
            "pattern": "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}",
            "type": "string",
            "description": "The time the calculation was published by AEMO. Format: yyyy-MM-ddTHH:mm:ss (e.g. 2021-01-07T15:30:45)"
          },
          "marketService": {
            "maxLength": 20,
            "minLength": 0,
            "pattern": "WEM|NSTEM|STEM",
            "type": "string",
            "description": "The market service of the settlement run (WEM|NSTEM|STEM)"
          },
          "designation": {
            "maxLength": 30,
            "minLength": 0,
            "pattern": "INITIAL|ADJ1|ADJ2|ADJ3",
            "type": "string",
            "description": "The settlement run type designation (INITIAL|ADJ1|ADJ2|ADJ3)"
          },
          "period": {
            "maxLength": 30,
            "minLength": 0,
            "type": "string",
            "description": "The settlement period of the run, either a trading week or trading month"
          },
          "periodFrom": {
            "pattern": "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}",
            "type": "string",
            "description": "The trading day at the start of the settlement period. Format: yyyy-MM-ddTHH:mm:ss (e.g. 2020-05-01T00:00:00)",
            "format": "date-time"
          },
          "periodTo": {
            "pattern": "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}",
            "type": "string",
            "description": "The trading day at the end of the settlement period eg:\"2020-05-31T00:00:00\". Format: yyyy-MM-ddTHH:mm:ss (e.g. 2020-05-31T00:00:00)",
            "format": "date-time"
          },
          "participantCode": {
            "maxLength": 20,
            "minLength": 0,
            "type": "string",
            "description": "The participant code associated with the request"
          },
          "tradingDay": {
            "pattern": "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}",
            "type": "string",
            "description": "A specific trading day within the settlement period. Format: yyyy-MM-ddTHH:mm:ss (e.g. 2020-05-31T00:00:00)",
            "format": "date-time"
          },
          "tradingDays": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SettlementOutputCalculationDataViewModelV2"
            },
            "description": "An array of trading days associated with the request"
          }
        },
        "additionalProperties": false
      },
      "SettlementOutputDetailsViewModelV2OkResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SettlementOutputDetailsViewModelV2"
          }
        },
        "additionalProperties": false
      },
      "SettlementOutputViewModelV2": {
        "type": "object",
        "properties": {
          "tradingDay": {
            "type": "string",
            "description": "The Trading Day for which estimated exposure is being calculated",
            "format": "date-time"
          },
          "tradingDays": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CalculationDataViewModelV2"
            },
            "description": "An array of Trading Days associated with variables that are required to determine the estimated exposure",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SettlementOutputViewModelV2OkResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SettlementOutputViewModelV2"
          }
        },
        "additionalProperties": false
      },
      "SettlementStatementSummaryViewModelV2": {
        "required": [
          "designation",
          "marketService",
          "participantCode",
          "period",
          "periodFrom",
          "periodTo",
          "publishedAt",
          "runId",
          "tradingDays"
        ],
        "type": "object",
        "properties": {
          "runId": {
            "maximum": 2147483647,
            "minimum": 1,
            "type": "integer",
            "description": "The id of this settlement run",
            "format": "int32"
          },
          "publishedAt": {
            "pattern": "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}",
            "type": "string",
            "description": "The time the calculation was published by AEMO. Format: yyyy-MM-ddTHH:mm:ss (e.g. 2021-01-07T15:30:45)"
          },
          "marketService": {
            "maxLength": 20,
            "minLength": 0,
            "pattern": "WEM|NSTEM|STEM",
            "type": "string",
            "description": "The market service of the settlement run (WEM|NSTEM|STEM)"
          },
          "designation": {
            "maxLength": 30,
            "minLength": 0,
            "pattern": "INITIAL|ADJ1|ADJ2|ADJ3",
            "type": "string",
            "description": "The settlement run type designation (INITIAL|ADJ1|ADJ2|ADJ3)"
          },
          "period": {
            "maxLength": 40,
            "minLength": 0,
            "type": "string",
            "description": "The settlement period of the run, either a trading week or trading month"
          },
          "periodFrom": {
            "pattern": "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}",
            "type": "string",
            "description": "The trading day at the start of the settlement period. Format: yyyy-MM-ddTHH:mm:ss (e.g. 2020-05-01T00:00:00)",
            "format": "date-time"
          },
          "periodTo": {
            "pattern": "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}",
            "type": "string",
            "description": "The trading day at the end of the settlement period. Format: yyyy-MM-ddTHH:mm:ss (e.g. 2020-05-31T00:00:00)",
            "format": "date-time"
          },
          "participantCode": {
            "maxLength": 60,
            "minLength": 0,
            "type": "string",
            "description": "The participant code associated with the request"
          },
          "tradingDays": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SettlementCalculationDataViewModelV2"
            },
            "description": "An array of trading days associated with the request"
          }
        },
        "additionalProperties": false
      },
      "SettlementStatementSummaryViewModelV2OkResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SettlementStatementSummaryViewModelV2"
          }
        },
        "additionalProperties": false
      },
      "TaxInvoice": {
        "required": [
          "id"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier of the Receipt Created Tax Invoice (RCTI) or unique identifier of the Tax Invoice"
          },
          "gstApplicable": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LineItem"
            },
            "description": "The amount applicable for the GST applicable billing line item (this amount is ex-GST)",
            "nullable": true
          },
          "gstFree": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LineItem"
            },
            "description": "The amount applicable for the GST free billing line item (this amount is ex-GST)",
            "nullable": true
          },
          "total": {
            "$ref": "#/components/schemas/InvoiceTotal"
          }
        },
        "additionalProperties": false
      },
      "TaxInvoiceAdjustment": {
        "type": "object",
        "properties": {
          "gstApplicable": {
            "$ref": "#/components/schemas/AdjustmentGstApplicable"
          },
          "gstFree": {
            "$ref": "#/components/schemas/AdjustmentLine"
          }
        },
        "additionalProperties": false
      }
    }
  }
}