{
  "openapi": "3.1.0",
  "info": {
    "title": "Coal LSL levy calculator",
    "version": "0.4.0",
    "summary": "Coal Mining Industry (Long Service Leave) payroll levy on eligible wages under s 3B, as a deterministic HTTP calculator.",
    "description": "Same arithmetic as https://duguid.com.au/tools/coal-lsl-levy/ (assets/levy.mjs). Money in and out is decimal strings.\n\nRefusals are a feature: 422 names a malformed or missing field, 400 carries a refusal_class, 404 names the calculator or period URNs this service accepts.\n\nRefusal classes: unsupported_period (The reporting month is outside the months backed by a verified rate row and a supported method record.) out_of_scope_employee (The employee is asserted not to be an eligible employee, so the wages are not eligible wages.) insufficient_facts (A fact the calculation turns on was supplied as \"unknown\".) components_not_read_by_branch (Pay was supplied that the selected branch does not read; it would otherwise be discarded silently.)\n\nRounding: half up to the cent at the final step only, from the exact integer value, named in each manifest as rounding_policy \"half_up_cent_final_step\". Output scales are fixed and published as patterns: money 2 decimal places, rates and factors 4, eligible wages and Formula B 4 (exact quarter cents) and levy_before_rounding 8 (exact). Not advice; review aid only.\n\nNo external conformance approval or practitioner attestation is claimed.",
    "license": {
      "name": "Ryan Duguid Public Attribution Licence 1.0",
      "url": "https://github.com/ryanduguid/ryanduguid.github.io/blob/main/LICENSE"
    }
  },
  "servers": [
    {
      "url": "/"
    }
  ],
  "paths": {
    "/v1/calculators": {
      "get": {
        "summary": "List calculators with their period URNs",
        "parameters": [
          {
            "name": "module",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by module URN. An unknown module returns an empty array."
          }
        ],
        "responses": {
          "200": {
            "description": "Calculator listing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorListing"
                }
              }
            }
          }
        }
      }
    },
    "/v1/modules": {
      "get": {
        "summary": "List modules and the calculator URNs they contain",
        "responses": {
          "200": {
            "description": "Modules",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "module",
                      "description",
                      "calculators"
                    ],
                    "properties": {
                      "module": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "calculators": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/calculators/urn:sbrm:calculator:coal-lsl:levy/{period_uri}": {
      "post": {
        "summary": "Calculate the levy for one employee for one reporting month",
        "parameters": [
          {
            "name": "period_uri",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "urn:sbrm:period:coal-lsl-levy:2024-01",
                "urn:sbrm:period:coal-lsl-levy:2024-02",
                "urn:sbrm:period:coal-lsl-levy:2024-03",
                "urn:sbrm:period:coal-lsl-levy:2024-04",
                "urn:sbrm:period:coal-lsl-levy:2024-05",
                "urn:sbrm:period:coal-lsl-levy:2024-06",
                "urn:sbrm:period:coal-lsl-levy:2024-07",
                "urn:sbrm:period:coal-lsl-levy:2024-08",
                "urn:sbrm:period:coal-lsl-levy:2024-09",
                "urn:sbrm:period:coal-lsl-levy:2024-10",
                "urn:sbrm:period:coal-lsl-levy:2024-11",
                "urn:sbrm:period:coal-lsl-levy:2024-12",
                "urn:sbrm:period:coal-lsl-levy:2025-01",
                "urn:sbrm:period:coal-lsl-levy:2025-02",
                "urn:sbrm:period:coal-lsl-levy:2025-03",
                "urn:sbrm:period:coal-lsl-levy:2025-04",
                "urn:sbrm:period:coal-lsl-levy:2025-05",
                "urn:sbrm:period:coal-lsl-levy:2025-06",
                "urn:sbrm:period:coal-lsl-levy:2025-07",
                "urn:sbrm:period:coal-lsl-levy:2025-08",
                "urn:sbrm:period:coal-lsl-levy:2025-09",
                "urn:sbrm:period:coal-lsl-levy:2025-10",
                "urn:sbrm:period:coal-lsl-levy:2025-11",
                "urn:sbrm:period:coal-lsl-levy:2025-12",
                "urn:sbrm:period:coal-lsl-levy:2026-01",
                "urn:sbrm:period:coal-lsl-levy:2026-02",
                "urn:sbrm:period:coal-lsl-levy:2026-03",
                "urn:sbrm:period:coal-lsl-levy:2026-04",
                "urn:sbrm:period:coal-lsl-levy:2026-05",
                "urn:sbrm:period:coal-lsl-levy:2026-06",
                "urn:sbrm:period:coal-lsl-levy:2026-07",
                "urn:sbrm:period:coal-lsl-levy:2026-08",
                "urn:sbrm:period:coal-lsl-levy:2026-09",
                "urn:sbrm:period:coal-lsl-levy:2026-10"
              ]
            },
            "description": "Period URN for the reporting month. The listing is the authority for which months are supported."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CoalLslLevyInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Computed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CoalLslLevyResult"
                }
              }
            }
          },
          "400": {
            "description": "Well-formed but outside what this calculator answers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Refusal"
                }
              }
            }
          },
          "404": {
            "description": "Unknown calculator or period URN",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "413": {
            "description": "Body larger than the configured limit"
          },
          "415": {
            "description": "Content-Type is not application/json"
          },
          "422": {
            "description": "Malformed or incomplete request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            }
          },
          "429": {
            "description": "Throttled; Retry-After is set in seconds"
          },
          "500": {
            "description": "Service fault. The body contains a request identifier and no internal error details."
          }
        }
      }
    },
    "/v1/rates/{period_uri}": {
      "get": {
        "summary": "Rate tables registered for a period, each with the SHA-256 of the bytes served by /v1/rates/{period_uri}/{rate_id}",
        "parameters": [
          {
            "name": "period_uri",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Rate table listing"
          },
          "404": {
            "description": "Unsupported period"
          }
        }
      }
    },
    "/v1/rates/{period_uri}/{rate_id}": {
      "get": {
        "summary": "The exact bytes of a rate table (the rates register series file)",
        "parameters": [
          {
            "name": "period_uri",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rate_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "levy-rate",
                "eligible-wages-method"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The document whose SHA-256 the manifest cites"
          },
          "404": {
            "description": "Unknown period or rate id"
          }
        }
      }
    },
    "/healthz": {
      "get": {
        "summary": "Liveness",
        "responses": {
          "200": {
            "description": "ok"
          }
        }
      }
    },
    "/livez": {
      "get": {
        "summary": "Liveness (alias)",
        "responses": {
          "200": {
            "description": "ok"
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "summary": "This document",
        "responses": {
          "200": {
            "description": "OpenAPI 3.1"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CoalLslLevyInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "reporting_month",
          "branch",
          "employee",
          "pay"
        ],
        "properties": {
          "reporting_month": {
            "type": "string",
            "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])$",
            "description": "The reporting month, YYYY-MM. Must equal the month in the period URN of the path."
          },
          "branch": {
            "type": "string",
            "enum": [
              "base_rate",
              "annual_salary",
              "casual"
            ],
            "description": "base_rate: s 3B(1); annual_salary: s 3B(2); casual: s 3B(3)."
          },
          "employee": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "eligible_employee"
            ],
            "properties": {
              "eligible_employee": {
                "description": "Whether the person is an eligible employee under s 4 of the Administration Act, as established by the caller. true, false or the string \"unknown\". An unknown fact is refused when it is needed to settle the selected branch.",
                "oneOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "string",
                    "enum": [
                      "unknown"
                    ]
                  }
                ]
              }
            }
          },
          "pay": {
            "description": "Pay components for the selected branch. The set of fields is fixed per branch and every field is required.",
            "oneOf": [
              {
                "title": "base_rate",
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "base_rate_of_pay",
                  "salary_sacrificed",
                  "overtime_and_penalty_rates",
                  "allowances",
                  "allowances_exclude_expense_reimbursements",
                  "bonuses"
                ],
                "properties": {
                  "base_rate_of_pay": {
                    "type": "string",
                    "pattern": "^(0(\\.[0-9]{1,2})?|[1-9][0-9]{0,10}(\\.[0-9]{1,2})?|[1-7][0-9]{11}(\\.[0-9]{1,2})?|8[0-2][0-9]{10}(\\.[0-9]{1,2})?|83[0-2][0-9]{9}(\\.[0-9]{1,2})?|833[0-8][0-9]{8}(\\.[0-9]{1,2})?|8339[0-8][0-9]{7}(\\.[0-9]{1,2})?|83399[0-8][0-9]{6}(\\.[0-9]{1,2})?|833999[0-8][0-9]{5}(\\.[0-9]{1,2})?|8339999[0-2][0-9]{4}(\\.[0-9]{1,2})?|833999930[0-8][0-9]{2}(\\.[0-9]{1,2})?|8339999309[0-8][0-9]{1}(\\.[0-9]{1,2})?|83399993099[0-3](\\.[0-9]{1,2})?|833999930994(\\.([0-4][0-9]?|5[0-3]?))?)$",
                    "description": "Base rate of pay paid in the month, after salary sacrifice deductions. AUD as a decimal string with at most 2 decimal places, for example \"6000.00\", and at most 833999930994.53 (the limits.max_amount the discovery listing publishes). JSON numbers are rejected. Send \"0.00\" for nil; a missing amount is not nil."
                  },
                  "salary_sacrificed": {
                    "type": "string",
                    "pattern": "^(0(\\.[0-9]{1,2})?|[1-9][0-9]{0,10}(\\.[0-9]{1,2})?|[1-7][0-9]{11}(\\.[0-9]{1,2})?|8[0-2][0-9]{10}(\\.[0-9]{1,2})?|83[0-2][0-9]{9}(\\.[0-9]{1,2})?|833[0-8][0-9]{8}(\\.[0-9]{1,2})?|8339[0-8][0-9]{7}(\\.[0-9]{1,2})?|83399[0-8][0-9]{6}(\\.[0-9]{1,2})?|833999[0-8][0-9]{5}(\\.[0-9]{1,2})?|8339999[0-2][0-9]{4}(\\.[0-9]{1,2})?|833999930[0-8][0-9]{2}(\\.[0-9]{1,2})?|8339999309[0-8][0-9]{1}(\\.[0-9]{1,2})?|83399993099[0-3](\\.[0-9]{1,2})?|833999930994(\\.([0-4][0-9]?|5[0-3]?))?)$",
                    "description": "Amounts deducted under a salary sacrifice arrangement, grossed back onto the base rate (s 3B(4)(a)). AUD as a decimal string with at most 2 decimal places, for example \"6000.00\", and at most 833999930994.53 (the limits.max_amount the discovery listing publishes). JSON numbers are rejected. Send \"0.00\" for nil; a missing amount is not nil."
                  },
                  "overtime_and_penalty_rates": {
                    "type": "string",
                    "pattern": "^(0(\\.[0-9]{1,2})?|[1-9][0-9]{0,10}(\\.[0-9]{1,2})?|[1-7][0-9]{11}(\\.[0-9]{1,2})?|8[0-2][0-9]{10}(\\.[0-9]{1,2})?|83[0-2][0-9]{9}(\\.[0-9]{1,2})?|833[0-8][0-9]{8}(\\.[0-9]{1,2})?|8339[0-8][0-9]{7}(\\.[0-9]{1,2})?|83399[0-8][0-9]{6}(\\.[0-9]{1,2})?|833999[0-8][0-9]{5}(\\.[0-9]{1,2})?|8339999[0-2][0-9]{4}(\\.[0-9]{1,2})?|833999930[0-8][0-9]{2}(\\.[0-9]{1,2})?|8339999309[0-8][0-9]{1}(\\.[0-9]{1,2})?|83399993099[0-3](\\.[0-9]{1,2})?|833999930994(\\.([0-4][0-9]?|5[0-3]?))?)$",
                    "description": "Overtime and penalty rates paid (Formula B only). AUD as a decimal string with at most 2 decimal places, for example \"6000.00\", and at most 833999930994.53 (the limits.max_amount the discovery listing publishes). JSON numbers are rejected. Send \"0.00\" for nil; a missing amount is not nil."
                  },
                  "allowances": {
                    "type": "string",
                    "pattern": "^(0(\\.[0-9]{1,2})?|[1-9][0-9]{0,10}(\\.[0-9]{1,2})?|[1-7][0-9]{11}(\\.[0-9]{1,2})?|8[0-2][0-9]{10}(\\.[0-9]{1,2})?|83[0-2][0-9]{9}(\\.[0-9]{1,2})?|833[0-8][0-9]{8}(\\.[0-9]{1,2})?|8339[0-8][0-9]{7}(\\.[0-9]{1,2})?|83399[0-8][0-9]{6}(\\.[0-9]{1,2})?|833999[0-8][0-9]{5}(\\.[0-9]{1,2})?|8339999[0-2][0-9]{4}(\\.[0-9]{1,2})?|833999930[0-8][0-9]{2}(\\.[0-9]{1,2})?|8339999309[0-8][0-9]{1}(\\.[0-9]{1,2})?|83399993099[0-3](\\.[0-9]{1,2})?|833999930994(\\.([0-4][0-9]?|5[0-3]?))?)$",
                    "description": "Allowances other than expense reimbursements (Formula B only). AUD as a decimal string with at most 2 decimal places, for example \"6000.00\", and at most 833999930994.53 (the limits.max_amount the discovery listing publishes). JSON numbers are rejected. Send \"0.00\" for nil; a missing amount is not nil."
                  },
                  "allowances_exclude_expense_reimbursements": {
                    "description": "Assertion that the allowances figure contains no reimbursement of expenses. Required to be true when allowances are non-nil. true, false or the string \"unknown\". An unknown fact is refused when it is needed to settle the selected branch.",
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "unknown"
                        ]
                      }
                    ]
                  },
                  "bonuses": {
                    "type": "array",
                    "maxItems": 24,
                    "description": "Incentive-based payments and bonuses paid in the month with their payment frequency. Only weekly, fortnightly and monthly frequencies count (s 3B(4)(c) and (d)); the rest are reported under excluded, never spread.",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "amount",
                        "frequency"
                      ],
                      "properties": {
                        "amount": {
                          "type": "string",
                          "pattern": "^(0(\\.[0-9]{1,2})?|[1-9][0-9]{0,10}(\\.[0-9]{1,2})?|[1-7][0-9]{11}(\\.[0-9]{1,2})?|8[0-2][0-9]{10}(\\.[0-9]{1,2})?|83[0-2][0-9]{9}(\\.[0-9]{1,2})?|833[0-8][0-9]{8}(\\.[0-9]{1,2})?|8339[0-8][0-9]{7}(\\.[0-9]{1,2})?|83399[0-8][0-9]{6}(\\.[0-9]{1,2})?|833999[0-8][0-9]{5}(\\.[0-9]{1,2})?|8339999[0-2][0-9]{4}(\\.[0-9]{1,2})?|833999930[0-8][0-9]{2}(\\.[0-9]{1,2})?|8339999309[0-8][0-9]{1}(\\.[0-9]{1,2})?|83399993099[0-3](\\.[0-9]{1,2})?|833999930994(\\.([0-4][0-9]?|5[0-3]?))?)$",
                          "description": "Bonus amount. AUD as a decimal string with at most 2 decimal places, for example \"6000.00\", and at most 833999930994.53 (the limits.max_amount the discovery listing publishes). JSON numbers are rejected. Send \"0.00\" for nil; a missing amount is not nil."
                        },
                        "frequency": {
                          "type": "string",
                          "enum": [
                            "weekly",
                            "fortnightly",
                            "monthly",
                            "quarterly",
                            "halfYearly",
                            "annually"
                          ]
                        }
                      }
                    }
                  }
                }
              },
              {
                "title": "annual_salary",
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "annual_salary_paid",
                  "salary_sacrificed",
                  "bonuses"
                ],
                "properties": {
                  "annual_salary_paid": {
                    "type": "string",
                    "pattern": "^(0(\\.[0-9]{1,2})?|[1-9][0-9]{0,10}(\\.[0-9]{1,2})?|[1-7][0-9]{11}(\\.[0-9]{1,2})?|8[0-2][0-9]{10}(\\.[0-9]{1,2})?|83[0-2][0-9]{9}(\\.[0-9]{1,2})?|833[0-8][0-9]{8}(\\.[0-9]{1,2})?|8339[0-8][0-9]{7}(\\.[0-9]{1,2})?|83399[0-8][0-9]{6}(\\.[0-9]{1,2})?|833999[0-8][0-9]{5}(\\.[0-9]{1,2})?|8339999[0-2][0-9]{4}(\\.[0-9]{1,2})?|833999930[0-8][0-9]{2}(\\.[0-9]{1,2})?|8339999309[0-8][0-9]{1}(\\.[0-9]{1,2})?|83399993099[0-3](\\.[0-9]{1,2})?|833999930994(\\.([0-4][0-9]?|5[0-3]?))?)$",
                    "description": "Annual salary paid in the month, after salary sacrifice deductions, excluding overtime, penalty rates and shift loadings. AUD as a decimal string with at most 2 decimal places, for example \"6000.00\", and at most 833999930994.53 (the limits.max_amount the discovery listing publishes). JSON numbers are rejected. Send \"0.00\" for nil; a missing amount is not nil."
                  },
                  "salary_sacrificed": {
                    "type": "string",
                    "pattern": "^(0(\\.[0-9]{1,2})?|[1-9][0-9]{0,10}(\\.[0-9]{1,2})?|[1-7][0-9]{11}(\\.[0-9]{1,2})?|8[0-2][0-9]{10}(\\.[0-9]{1,2})?|83[0-2][0-9]{9}(\\.[0-9]{1,2})?|833[0-8][0-9]{8}(\\.[0-9]{1,2})?|8339[0-8][0-9]{7}(\\.[0-9]{1,2})?|83399[0-8][0-9]{6}(\\.[0-9]{1,2})?|833999[0-8][0-9]{5}(\\.[0-9]{1,2})?|8339999[0-2][0-9]{4}(\\.[0-9]{1,2})?|833999930[0-8][0-9]{2}(\\.[0-9]{1,2})?|8339999309[0-8][0-9]{1}(\\.[0-9]{1,2})?|83399993099[0-3](\\.[0-9]{1,2})?|833999930994(\\.([0-4][0-9]?|5[0-3]?))?)$",
                    "description": "Amounts deducted under a salary sacrifice arrangement, grossed back onto the salary (s 3B(4)(b)). AUD as a decimal string with at most 2 decimal places, for example \"6000.00\", and at most 833999930994.53 (the limits.max_amount the discovery listing publishes). JSON numbers are rejected. Send \"0.00\" for nil; a missing amount is not nil."
                  },
                  "bonuses": {
                    "type": "array",
                    "maxItems": 24,
                    "description": "Incentive-based payments and bonuses paid in the month with their payment frequency. Only weekly, fortnightly and monthly frequencies count (s 3B(4)(c) and (d)); the rest are reported under excluded, never spread.",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "amount",
                        "frequency"
                      ],
                      "properties": {
                        "amount": {
                          "type": "string",
                          "pattern": "^(0(\\.[0-9]{1,2})?|[1-9][0-9]{0,10}(\\.[0-9]{1,2})?|[1-7][0-9]{11}(\\.[0-9]{1,2})?|8[0-2][0-9]{10}(\\.[0-9]{1,2})?|83[0-2][0-9]{9}(\\.[0-9]{1,2})?|833[0-8][0-9]{8}(\\.[0-9]{1,2})?|8339[0-8][0-9]{7}(\\.[0-9]{1,2})?|83399[0-8][0-9]{6}(\\.[0-9]{1,2})?|833999[0-8][0-9]{5}(\\.[0-9]{1,2})?|8339999[0-2][0-9]{4}(\\.[0-9]{1,2})?|833999930[0-8][0-9]{2}(\\.[0-9]{1,2})?|8339999309[0-8][0-9]{1}(\\.[0-9]{1,2})?|83399993099[0-3](\\.[0-9]{1,2})?|833999930994(\\.([0-4][0-9]?|5[0-3]?))?)$",
                          "description": "Bonus amount. AUD as a decimal string with at most 2 decimal places, for example \"6000.00\", and at most 833999930994.53 (the limits.max_amount the discovery listing publishes). JSON numbers are rejected. Send \"0.00\" for nil; a missing amount is not nil."
                        },
                        "frequency": {
                          "type": "string",
                          "enum": [
                            "weekly",
                            "fortnightly",
                            "monthly",
                            "quarterly",
                            "halfYearly",
                            "annually"
                          ]
                        }
                      }
                    }
                  }
                }
              },
              {
                "title": "casual",
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "instrument_specifies_loading",
                  "loading_quantifiable",
                  "base_rate_of_pay",
                  "casual_loading",
                  "ordinary_rate_of_pay",
                  "salary_sacrificed",
                  "bonuses"
                ],
                "properties": {
                  "instrument_specifies_loading": {
                    "description": "Whether an industrial instrument covering the employee specifies a casual loading. true, false or the string \"unknown\". An unknown fact is refused when it is needed to settle the selected branch.",
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "unknown"
                        ]
                      }
                    ]
                  },
                  "loading_quantifiable": {
                    "description": "Whether that casual loading can be quantified. true, false or the string \"unknown\". An unknown fact is refused when it is needed to settle the selected branch.",
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "unknown"
                        ]
                      }
                    ]
                  },
                  "base_rate_of_pay": {
                    "type": "string",
                    "pattern": "^(0(\\.[0-9]{1,2})?|[1-9][0-9]{0,10}(\\.[0-9]{1,2})?|[1-7][0-9]{11}(\\.[0-9]{1,2})?|8[0-2][0-9]{10}(\\.[0-9]{1,2})?|83[0-2][0-9]{9}(\\.[0-9]{1,2})?|833[0-8][0-9]{8}(\\.[0-9]{1,2})?|8339[0-8][0-9]{7}(\\.[0-9]{1,2})?|83399[0-8][0-9]{6}(\\.[0-9]{1,2})?|833999[0-8][0-9]{5}(\\.[0-9]{1,2})?|8339999[0-2][0-9]{4}(\\.[0-9]{1,2})?|833999930[0-8][0-9]{2}(\\.[0-9]{1,2})?|8339999309[0-8][0-9]{1}(\\.[0-9]{1,2})?|83399993099[0-3](\\.[0-9]{1,2})?|833999930994(\\.([0-4][0-9]?|5[0-3]?))?)$",
                    "description": "Base rate of pay paid (s 3B(3)(a) branch). Send \"0.00\" on the other branch. AUD as a decimal string with at most 2 decimal places, for example \"6000.00\", and at most 833999930994.53 (the limits.max_amount the discovery listing publishes). JSON numbers are rejected. Send \"0.00\" for nil; a missing amount is not nil."
                  },
                  "casual_loading": {
                    "type": "string",
                    "pattern": "^(0(\\.[0-9]{1,2})?|[1-9][0-9]{0,10}(\\.[0-9]{1,2})?|[1-7][0-9]{11}(\\.[0-9]{1,2})?|8[0-2][0-9]{10}(\\.[0-9]{1,2})?|83[0-2][0-9]{9}(\\.[0-9]{1,2})?|833[0-8][0-9]{8}(\\.[0-9]{1,2})?|8339[0-8][0-9]{7}(\\.[0-9]{1,2})?|83399[0-8][0-9]{6}(\\.[0-9]{1,2})?|833999[0-8][0-9]{5}(\\.[0-9]{1,2})?|8339999[0-2][0-9]{4}(\\.[0-9]{1,2})?|833999930[0-8][0-9]{2}(\\.[0-9]{1,2})?|8339999309[0-8][0-9]{1}(\\.[0-9]{1,2})?|83399993099[0-3](\\.[0-9]{1,2})?|833999930994(\\.([0-4][0-9]?|5[0-3]?))?)$",
                    "description": "Casual loading paid (s 3B(3)(a) branch). Send \"0.00\" on the other branch. AUD as a decimal string with at most 2 decimal places, for example \"6000.00\", and at most 833999930994.53 (the limits.max_amount the discovery listing publishes). JSON numbers are rejected. Send \"0.00\" for nil; a missing amount is not nil."
                  },
                  "ordinary_rate_of_pay": {
                    "type": "string",
                    "pattern": "^(0(\\.[0-9]{1,2})?|[1-9][0-9]{0,10}(\\.[0-9]{1,2})?|[1-7][0-9]{11}(\\.[0-9]{1,2})?|8[0-2][0-9]{10}(\\.[0-9]{1,2})?|83[0-2][0-9]{9}(\\.[0-9]{1,2})?|833[0-8][0-9]{8}(\\.[0-9]{1,2})?|8339[0-8][0-9]{7}(\\.[0-9]{1,2})?|83399[0-8][0-9]{6}(\\.[0-9]{1,2})?|833999[0-8][0-9]{5}(\\.[0-9]{1,2})?|8339999[0-2][0-9]{4}(\\.[0-9]{1,2})?|833999930[0-8][0-9]{2}(\\.[0-9]{1,2})?|8339999309[0-8][0-9]{1}(\\.[0-9]{1,2})?|83399993099[0-3](\\.[0-9]{1,2})?|833999930994(\\.([0-4][0-9]?|5[0-3]?))?)$",
                    "description": "Ordinary rate of pay paid, loading included (s 3B(3)(b) branch). Send \"0.00\" on the other branch. AUD as a decimal string with at most 2 decimal places, for example \"6000.00\", and at most 833999930994.53 (the limits.max_amount the discovery listing publishes). JSON numbers are rejected. Send \"0.00\" for nil; a missing amount is not nil."
                  },
                  "salary_sacrificed": {
                    "type": "string",
                    "pattern": "^(0(\\.[0-9]{1,2})?|[1-9][0-9]{0,10}(\\.[0-9]{1,2})?|[1-7][0-9]{11}(\\.[0-9]{1,2})?|8[0-2][0-9]{10}(\\.[0-9]{1,2})?|83[0-2][0-9]{9}(\\.[0-9]{1,2})?|833[0-8][0-9]{8}(\\.[0-9]{1,2})?|8339[0-8][0-9]{7}(\\.[0-9]{1,2})?|83399[0-8][0-9]{6}(\\.[0-9]{1,2})?|833999[0-8][0-9]{5}(\\.[0-9]{1,2})?|8339999[0-2][0-9]{4}(\\.[0-9]{1,2})?|833999930[0-8][0-9]{2}(\\.[0-9]{1,2})?|8339999309[0-8][0-9]{1}(\\.[0-9]{1,2})?|83399993099[0-3](\\.[0-9]{1,2})?|833999930994(\\.([0-4][0-9]?|5[0-3]?))?)$",
                    "description": "Amounts deducted under a salary sacrifice arrangement, grossed onto the component the branch reads. AUD as a decimal string with at most 2 decimal places, for example \"6000.00\", and at most 833999930994.53 (the limits.max_amount the discovery listing publishes). JSON numbers are rejected. Send \"0.00\" for nil; a missing amount is not nil."
                  },
                  "bonuses": {
                    "type": "array",
                    "maxItems": 24,
                    "description": "Incentive-based payments and bonuses paid in the month with their payment frequency. Only weekly, fortnightly and monthly frequencies count (s 3B(4)(c) and (d)); the rest are reported under excluded, never spread.",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "amount",
                        "frequency"
                      ],
                      "properties": {
                        "amount": {
                          "type": "string",
                          "pattern": "^(0(\\.[0-9]{1,2})?|[1-9][0-9]{0,10}(\\.[0-9]{1,2})?|[1-7][0-9]{11}(\\.[0-9]{1,2})?|8[0-2][0-9]{10}(\\.[0-9]{1,2})?|83[0-2][0-9]{9}(\\.[0-9]{1,2})?|833[0-8][0-9]{8}(\\.[0-9]{1,2})?|8339[0-8][0-9]{7}(\\.[0-9]{1,2})?|83399[0-8][0-9]{6}(\\.[0-9]{1,2})?|833999[0-8][0-9]{5}(\\.[0-9]{1,2})?|8339999[0-2][0-9]{4}(\\.[0-9]{1,2})?|833999930[0-8][0-9]{2}(\\.[0-9]{1,2})?|8339999309[0-8][0-9]{1}(\\.[0-9]{1,2})?|83399993099[0-3](\\.[0-9]{1,2})?|833999930994(\\.([0-4][0-9]?|5[0-3]?))?)$",
                          "description": "Bonus amount. AUD as a decimal string with at most 2 decimal places, for example \"6000.00\", and at most 833999930994.53 (the limits.max_amount the discovery listing publishes). JSON numbers are rejected. Send \"0.00\" for nil; a missing amount is not nil."
                        },
                        "frequency": {
                          "type": "string",
                          "enum": [
                            "weekly",
                            "fortnightly",
                            "monthly",
                            "quarterly",
                            "halfYearly",
                            "annually"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            ]
          }
        },
        "allOf": [
          {
            "if": {
              "properties": {
                "branch": {
                  "const": "base_rate"
                }
              },
              "required": [
                "branch"
              ]
            },
            "then": {
              "properties": {
                "pay": {
                  "title": "base_rate",
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "base_rate_of_pay",
                    "salary_sacrificed",
                    "overtime_and_penalty_rates",
                    "allowances",
                    "allowances_exclude_expense_reimbursements",
                    "bonuses"
                  ],
                  "properties": {
                    "base_rate_of_pay": {
                      "type": "string",
                      "pattern": "^(0(\\.[0-9]{1,2})?|[1-9][0-9]{0,10}(\\.[0-9]{1,2})?|[1-7][0-9]{11}(\\.[0-9]{1,2})?|8[0-2][0-9]{10}(\\.[0-9]{1,2})?|83[0-2][0-9]{9}(\\.[0-9]{1,2})?|833[0-8][0-9]{8}(\\.[0-9]{1,2})?|8339[0-8][0-9]{7}(\\.[0-9]{1,2})?|83399[0-8][0-9]{6}(\\.[0-9]{1,2})?|833999[0-8][0-9]{5}(\\.[0-9]{1,2})?|8339999[0-2][0-9]{4}(\\.[0-9]{1,2})?|833999930[0-8][0-9]{2}(\\.[0-9]{1,2})?|8339999309[0-8][0-9]{1}(\\.[0-9]{1,2})?|83399993099[0-3](\\.[0-9]{1,2})?|833999930994(\\.([0-4][0-9]?|5[0-3]?))?)$",
                      "description": "Base rate of pay paid in the month, after salary sacrifice deductions. AUD as a decimal string with at most 2 decimal places, for example \"6000.00\", and at most 833999930994.53 (the limits.max_amount the discovery listing publishes). JSON numbers are rejected. Send \"0.00\" for nil; a missing amount is not nil."
                    },
                    "salary_sacrificed": {
                      "type": "string",
                      "pattern": "^(0(\\.[0-9]{1,2})?|[1-9][0-9]{0,10}(\\.[0-9]{1,2})?|[1-7][0-9]{11}(\\.[0-9]{1,2})?|8[0-2][0-9]{10}(\\.[0-9]{1,2})?|83[0-2][0-9]{9}(\\.[0-9]{1,2})?|833[0-8][0-9]{8}(\\.[0-9]{1,2})?|8339[0-8][0-9]{7}(\\.[0-9]{1,2})?|83399[0-8][0-9]{6}(\\.[0-9]{1,2})?|833999[0-8][0-9]{5}(\\.[0-9]{1,2})?|8339999[0-2][0-9]{4}(\\.[0-9]{1,2})?|833999930[0-8][0-9]{2}(\\.[0-9]{1,2})?|8339999309[0-8][0-9]{1}(\\.[0-9]{1,2})?|83399993099[0-3](\\.[0-9]{1,2})?|833999930994(\\.([0-4][0-9]?|5[0-3]?))?)$",
                      "description": "Amounts deducted under a salary sacrifice arrangement, grossed back onto the base rate (s 3B(4)(a)). AUD as a decimal string with at most 2 decimal places, for example \"6000.00\", and at most 833999930994.53 (the limits.max_amount the discovery listing publishes). JSON numbers are rejected. Send \"0.00\" for nil; a missing amount is not nil."
                    },
                    "overtime_and_penalty_rates": {
                      "type": "string",
                      "pattern": "^(0(\\.[0-9]{1,2})?|[1-9][0-9]{0,10}(\\.[0-9]{1,2})?|[1-7][0-9]{11}(\\.[0-9]{1,2})?|8[0-2][0-9]{10}(\\.[0-9]{1,2})?|83[0-2][0-9]{9}(\\.[0-9]{1,2})?|833[0-8][0-9]{8}(\\.[0-9]{1,2})?|8339[0-8][0-9]{7}(\\.[0-9]{1,2})?|83399[0-8][0-9]{6}(\\.[0-9]{1,2})?|833999[0-8][0-9]{5}(\\.[0-9]{1,2})?|8339999[0-2][0-9]{4}(\\.[0-9]{1,2})?|833999930[0-8][0-9]{2}(\\.[0-9]{1,2})?|8339999309[0-8][0-9]{1}(\\.[0-9]{1,2})?|83399993099[0-3](\\.[0-9]{1,2})?|833999930994(\\.([0-4][0-9]?|5[0-3]?))?)$",
                      "description": "Overtime and penalty rates paid (Formula B only). AUD as a decimal string with at most 2 decimal places, for example \"6000.00\", and at most 833999930994.53 (the limits.max_amount the discovery listing publishes). JSON numbers are rejected. Send \"0.00\" for nil; a missing amount is not nil."
                    },
                    "allowances": {
                      "type": "string",
                      "pattern": "^(0(\\.[0-9]{1,2})?|[1-9][0-9]{0,10}(\\.[0-9]{1,2})?|[1-7][0-9]{11}(\\.[0-9]{1,2})?|8[0-2][0-9]{10}(\\.[0-9]{1,2})?|83[0-2][0-9]{9}(\\.[0-9]{1,2})?|833[0-8][0-9]{8}(\\.[0-9]{1,2})?|8339[0-8][0-9]{7}(\\.[0-9]{1,2})?|83399[0-8][0-9]{6}(\\.[0-9]{1,2})?|833999[0-8][0-9]{5}(\\.[0-9]{1,2})?|8339999[0-2][0-9]{4}(\\.[0-9]{1,2})?|833999930[0-8][0-9]{2}(\\.[0-9]{1,2})?|8339999309[0-8][0-9]{1}(\\.[0-9]{1,2})?|83399993099[0-3](\\.[0-9]{1,2})?|833999930994(\\.([0-4][0-9]?|5[0-3]?))?)$",
                      "description": "Allowances other than expense reimbursements (Formula B only). AUD as a decimal string with at most 2 decimal places, for example \"6000.00\", and at most 833999930994.53 (the limits.max_amount the discovery listing publishes). JSON numbers are rejected. Send \"0.00\" for nil; a missing amount is not nil."
                    },
                    "allowances_exclude_expense_reimbursements": {
                      "description": "Assertion that the allowances figure contains no reimbursement of expenses. Required to be true when allowances are non-nil. true, false or the string \"unknown\". An unknown fact is refused when it is needed to settle the selected branch.",
                      "oneOf": [
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "unknown"
                          ]
                        }
                      ]
                    },
                    "bonuses": {
                      "type": "array",
                      "maxItems": 24,
                      "description": "Incentive-based payments and bonuses paid in the month with their payment frequency. Only weekly, fortnightly and monthly frequencies count (s 3B(4)(c) and (d)); the rest are reported under excluded, never spread.",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "amount",
                          "frequency"
                        ],
                        "properties": {
                          "amount": {
                            "type": "string",
                            "pattern": "^(0(\\.[0-9]{1,2})?|[1-9][0-9]{0,10}(\\.[0-9]{1,2})?|[1-7][0-9]{11}(\\.[0-9]{1,2})?|8[0-2][0-9]{10}(\\.[0-9]{1,2})?|83[0-2][0-9]{9}(\\.[0-9]{1,2})?|833[0-8][0-9]{8}(\\.[0-9]{1,2})?|8339[0-8][0-9]{7}(\\.[0-9]{1,2})?|83399[0-8][0-9]{6}(\\.[0-9]{1,2})?|833999[0-8][0-9]{5}(\\.[0-9]{1,2})?|8339999[0-2][0-9]{4}(\\.[0-9]{1,2})?|833999930[0-8][0-9]{2}(\\.[0-9]{1,2})?|8339999309[0-8][0-9]{1}(\\.[0-9]{1,2})?|83399993099[0-3](\\.[0-9]{1,2})?|833999930994(\\.([0-4][0-9]?|5[0-3]?))?)$",
                            "description": "Bonus amount. AUD as a decimal string with at most 2 decimal places, for example \"6000.00\", and at most 833999930994.53 (the limits.max_amount the discovery listing publishes). JSON numbers are rejected. Send \"0.00\" for nil; a missing amount is not nil."
                          },
                          "frequency": {
                            "type": "string",
                            "enum": [
                              "weekly",
                              "fortnightly",
                              "monthly",
                              "quarterly",
                              "halfYearly",
                              "annually"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "branch": {
                  "const": "annual_salary"
                }
              },
              "required": [
                "branch"
              ]
            },
            "then": {
              "properties": {
                "pay": {
                  "title": "annual_salary",
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "annual_salary_paid",
                    "salary_sacrificed",
                    "bonuses"
                  ],
                  "properties": {
                    "annual_salary_paid": {
                      "type": "string",
                      "pattern": "^(0(\\.[0-9]{1,2})?|[1-9][0-9]{0,10}(\\.[0-9]{1,2})?|[1-7][0-9]{11}(\\.[0-9]{1,2})?|8[0-2][0-9]{10}(\\.[0-9]{1,2})?|83[0-2][0-9]{9}(\\.[0-9]{1,2})?|833[0-8][0-9]{8}(\\.[0-9]{1,2})?|8339[0-8][0-9]{7}(\\.[0-9]{1,2})?|83399[0-8][0-9]{6}(\\.[0-9]{1,2})?|833999[0-8][0-9]{5}(\\.[0-9]{1,2})?|8339999[0-2][0-9]{4}(\\.[0-9]{1,2})?|833999930[0-8][0-9]{2}(\\.[0-9]{1,2})?|8339999309[0-8][0-9]{1}(\\.[0-9]{1,2})?|83399993099[0-3](\\.[0-9]{1,2})?|833999930994(\\.([0-4][0-9]?|5[0-3]?))?)$",
                      "description": "Annual salary paid in the month, after salary sacrifice deductions, excluding overtime, penalty rates and shift loadings. AUD as a decimal string with at most 2 decimal places, for example \"6000.00\", and at most 833999930994.53 (the limits.max_amount the discovery listing publishes). JSON numbers are rejected. Send \"0.00\" for nil; a missing amount is not nil."
                    },
                    "salary_sacrificed": {
                      "type": "string",
                      "pattern": "^(0(\\.[0-9]{1,2})?|[1-9][0-9]{0,10}(\\.[0-9]{1,2})?|[1-7][0-9]{11}(\\.[0-9]{1,2})?|8[0-2][0-9]{10}(\\.[0-9]{1,2})?|83[0-2][0-9]{9}(\\.[0-9]{1,2})?|833[0-8][0-9]{8}(\\.[0-9]{1,2})?|8339[0-8][0-9]{7}(\\.[0-9]{1,2})?|83399[0-8][0-9]{6}(\\.[0-9]{1,2})?|833999[0-8][0-9]{5}(\\.[0-9]{1,2})?|8339999[0-2][0-9]{4}(\\.[0-9]{1,2})?|833999930[0-8][0-9]{2}(\\.[0-9]{1,2})?|8339999309[0-8][0-9]{1}(\\.[0-9]{1,2})?|83399993099[0-3](\\.[0-9]{1,2})?|833999930994(\\.([0-4][0-9]?|5[0-3]?))?)$",
                      "description": "Amounts deducted under a salary sacrifice arrangement, grossed back onto the salary (s 3B(4)(b)). AUD as a decimal string with at most 2 decimal places, for example \"6000.00\", and at most 833999930994.53 (the limits.max_amount the discovery listing publishes). JSON numbers are rejected. Send \"0.00\" for nil; a missing amount is not nil."
                    },
                    "bonuses": {
                      "type": "array",
                      "maxItems": 24,
                      "description": "Incentive-based payments and bonuses paid in the month with their payment frequency. Only weekly, fortnightly and monthly frequencies count (s 3B(4)(c) and (d)); the rest are reported under excluded, never spread.",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "amount",
                          "frequency"
                        ],
                        "properties": {
                          "amount": {
                            "type": "string",
                            "pattern": "^(0(\\.[0-9]{1,2})?|[1-9][0-9]{0,10}(\\.[0-9]{1,2})?|[1-7][0-9]{11}(\\.[0-9]{1,2})?|8[0-2][0-9]{10}(\\.[0-9]{1,2})?|83[0-2][0-9]{9}(\\.[0-9]{1,2})?|833[0-8][0-9]{8}(\\.[0-9]{1,2})?|8339[0-8][0-9]{7}(\\.[0-9]{1,2})?|83399[0-8][0-9]{6}(\\.[0-9]{1,2})?|833999[0-8][0-9]{5}(\\.[0-9]{1,2})?|8339999[0-2][0-9]{4}(\\.[0-9]{1,2})?|833999930[0-8][0-9]{2}(\\.[0-9]{1,2})?|8339999309[0-8][0-9]{1}(\\.[0-9]{1,2})?|83399993099[0-3](\\.[0-9]{1,2})?|833999930994(\\.([0-4][0-9]?|5[0-3]?))?)$",
                            "description": "Bonus amount. AUD as a decimal string with at most 2 decimal places, for example \"6000.00\", and at most 833999930994.53 (the limits.max_amount the discovery listing publishes). JSON numbers are rejected. Send \"0.00\" for nil; a missing amount is not nil."
                          },
                          "frequency": {
                            "type": "string",
                            "enum": [
                              "weekly",
                              "fortnightly",
                              "monthly",
                              "quarterly",
                              "halfYearly",
                              "annually"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "branch": {
                  "const": "casual"
                }
              },
              "required": [
                "branch"
              ]
            },
            "then": {
              "properties": {
                "pay": {
                  "title": "casual",
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "instrument_specifies_loading",
                    "loading_quantifiable",
                    "base_rate_of_pay",
                    "casual_loading",
                    "ordinary_rate_of_pay",
                    "salary_sacrificed",
                    "bonuses"
                  ],
                  "properties": {
                    "instrument_specifies_loading": {
                      "description": "Whether an industrial instrument covering the employee specifies a casual loading. true, false or the string \"unknown\". An unknown fact is refused when it is needed to settle the selected branch.",
                      "oneOf": [
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "unknown"
                          ]
                        }
                      ]
                    },
                    "loading_quantifiable": {
                      "description": "Whether that casual loading can be quantified. true, false or the string \"unknown\". An unknown fact is refused when it is needed to settle the selected branch.",
                      "oneOf": [
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "unknown"
                          ]
                        }
                      ]
                    },
                    "base_rate_of_pay": {
                      "type": "string",
                      "pattern": "^(0(\\.[0-9]{1,2})?|[1-9][0-9]{0,10}(\\.[0-9]{1,2})?|[1-7][0-9]{11}(\\.[0-9]{1,2})?|8[0-2][0-9]{10}(\\.[0-9]{1,2})?|83[0-2][0-9]{9}(\\.[0-9]{1,2})?|833[0-8][0-9]{8}(\\.[0-9]{1,2})?|8339[0-8][0-9]{7}(\\.[0-9]{1,2})?|83399[0-8][0-9]{6}(\\.[0-9]{1,2})?|833999[0-8][0-9]{5}(\\.[0-9]{1,2})?|8339999[0-2][0-9]{4}(\\.[0-9]{1,2})?|833999930[0-8][0-9]{2}(\\.[0-9]{1,2})?|8339999309[0-8][0-9]{1}(\\.[0-9]{1,2})?|83399993099[0-3](\\.[0-9]{1,2})?|833999930994(\\.([0-4][0-9]?|5[0-3]?))?)$",
                      "description": "Base rate of pay paid (s 3B(3)(a) branch). Send \"0.00\" on the other branch. AUD as a decimal string with at most 2 decimal places, for example \"6000.00\", and at most 833999930994.53 (the limits.max_amount the discovery listing publishes). JSON numbers are rejected. Send \"0.00\" for nil; a missing amount is not nil."
                    },
                    "casual_loading": {
                      "type": "string",
                      "pattern": "^(0(\\.[0-9]{1,2})?|[1-9][0-9]{0,10}(\\.[0-9]{1,2})?|[1-7][0-9]{11}(\\.[0-9]{1,2})?|8[0-2][0-9]{10}(\\.[0-9]{1,2})?|83[0-2][0-9]{9}(\\.[0-9]{1,2})?|833[0-8][0-9]{8}(\\.[0-9]{1,2})?|8339[0-8][0-9]{7}(\\.[0-9]{1,2})?|83399[0-8][0-9]{6}(\\.[0-9]{1,2})?|833999[0-8][0-9]{5}(\\.[0-9]{1,2})?|8339999[0-2][0-9]{4}(\\.[0-9]{1,2})?|833999930[0-8][0-9]{2}(\\.[0-9]{1,2})?|8339999309[0-8][0-9]{1}(\\.[0-9]{1,2})?|83399993099[0-3](\\.[0-9]{1,2})?|833999930994(\\.([0-4][0-9]?|5[0-3]?))?)$",
                      "description": "Casual loading paid (s 3B(3)(a) branch). Send \"0.00\" on the other branch. AUD as a decimal string with at most 2 decimal places, for example \"6000.00\", and at most 833999930994.53 (the limits.max_amount the discovery listing publishes). JSON numbers are rejected. Send \"0.00\" for nil; a missing amount is not nil."
                    },
                    "ordinary_rate_of_pay": {
                      "type": "string",
                      "pattern": "^(0(\\.[0-9]{1,2})?|[1-9][0-9]{0,10}(\\.[0-9]{1,2})?|[1-7][0-9]{11}(\\.[0-9]{1,2})?|8[0-2][0-9]{10}(\\.[0-9]{1,2})?|83[0-2][0-9]{9}(\\.[0-9]{1,2})?|833[0-8][0-9]{8}(\\.[0-9]{1,2})?|8339[0-8][0-9]{7}(\\.[0-9]{1,2})?|83399[0-8][0-9]{6}(\\.[0-9]{1,2})?|833999[0-8][0-9]{5}(\\.[0-9]{1,2})?|8339999[0-2][0-9]{4}(\\.[0-9]{1,2})?|833999930[0-8][0-9]{2}(\\.[0-9]{1,2})?|8339999309[0-8][0-9]{1}(\\.[0-9]{1,2})?|83399993099[0-3](\\.[0-9]{1,2})?|833999930994(\\.([0-4][0-9]?|5[0-3]?))?)$",
                      "description": "Ordinary rate of pay paid, loading included (s 3B(3)(b) branch). Send \"0.00\" on the other branch. AUD as a decimal string with at most 2 decimal places, for example \"6000.00\", and at most 833999930994.53 (the limits.max_amount the discovery listing publishes). JSON numbers are rejected. Send \"0.00\" for nil; a missing amount is not nil."
                    },
                    "salary_sacrificed": {
                      "type": "string",
                      "pattern": "^(0(\\.[0-9]{1,2})?|[1-9][0-9]{0,10}(\\.[0-9]{1,2})?|[1-7][0-9]{11}(\\.[0-9]{1,2})?|8[0-2][0-9]{10}(\\.[0-9]{1,2})?|83[0-2][0-9]{9}(\\.[0-9]{1,2})?|833[0-8][0-9]{8}(\\.[0-9]{1,2})?|8339[0-8][0-9]{7}(\\.[0-9]{1,2})?|83399[0-8][0-9]{6}(\\.[0-9]{1,2})?|833999[0-8][0-9]{5}(\\.[0-9]{1,2})?|8339999[0-2][0-9]{4}(\\.[0-9]{1,2})?|833999930[0-8][0-9]{2}(\\.[0-9]{1,2})?|8339999309[0-8][0-9]{1}(\\.[0-9]{1,2})?|83399993099[0-3](\\.[0-9]{1,2})?|833999930994(\\.([0-4][0-9]?|5[0-3]?))?)$",
                      "description": "Amounts deducted under a salary sacrifice arrangement, grossed onto the component the branch reads. AUD as a decimal string with at most 2 decimal places, for example \"6000.00\", and at most 833999930994.53 (the limits.max_amount the discovery listing publishes). JSON numbers are rejected. Send \"0.00\" for nil; a missing amount is not nil."
                    },
                    "bonuses": {
                      "type": "array",
                      "maxItems": 24,
                      "description": "Incentive-based payments and bonuses paid in the month with their payment frequency. Only weekly, fortnightly and monthly frequencies count (s 3B(4)(c) and (d)); the rest are reported under excluded, never spread.",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "amount",
                          "frequency"
                        ],
                        "properties": {
                          "amount": {
                            "type": "string",
                            "pattern": "^(0(\\.[0-9]{1,2})?|[1-9][0-9]{0,10}(\\.[0-9]{1,2})?|[1-7][0-9]{11}(\\.[0-9]{1,2})?|8[0-2][0-9]{10}(\\.[0-9]{1,2})?|83[0-2][0-9]{9}(\\.[0-9]{1,2})?|833[0-8][0-9]{8}(\\.[0-9]{1,2})?|8339[0-8][0-9]{7}(\\.[0-9]{1,2})?|83399[0-8][0-9]{6}(\\.[0-9]{1,2})?|833999[0-8][0-9]{5}(\\.[0-9]{1,2})?|8339999[0-2][0-9]{4}(\\.[0-9]{1,2})?|833999930[0-8][0-9]{2}(\\.[0-9]{1,2})?|8339999309[0-8][0-9]{1}(\\.[0-9]{1,2})?|83399993099[0-3](\\.[0-9]{1,2})?|833999930994(\\.([0-4][0-9]?|5[0-3]?))?)$",
                            "description": "Bonus amount. AUD as a decimal string with at most 2 decimal places, for example \"6000.00\", and at most 833999930994.53 (the limits.max_amount the discovery listing publishes). JSON numbers are rejected. Send \"0.00\" for nil; a missing amount is not nil."
                          },
                          "frequency": {
                            "type": "string",
                            "enum": [
                              "weekly",
                              "fortnightly",
                              "monthly",
                              "quarterly",
                              "halfYearly",
                              "annually"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "CoalLslLevyResult": {
        "type": "object",
        "required": [
          "calculator",
          "period",
          "reporting_month",
          "branch",
          "eligible_wages",
          "levy",
          "levy_before_rounding",
          "rate",
          "workings",
          "excluded",
          "rounding",
          "manifest",
          "advisory"
        ],
        "properties": {
          "calculator": {
            "type": "string"
          },
          "period": {
            "type": "string"
          },
          "reporting_month": {
            "type": "string"
          },
          "branch": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "label": {
                "type": "string"
              }
            }
          },
          "eligible_wages": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{4}$",
            "description": "Eligible wages, exact to the quarter cent (Formula B is three quarters of an aggregate). Decimal string at a fixed scale of 4 decimal places."
          },
          "levy": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$",
            "description": "The levy, rounded once, half up, to the cent. Decimal string at a fixed scale of 2 decimal places."
          },
          "levy_before_rounding": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{8}$",
            "description": "The exact levy before the final rounding. The value never needs more than 7 places, so no digit is rounded away. Decimal string at a fixed scale of 8 decimal places."
          },
          "rate": {
            "type": "object",
            "required": [
              "value_percent",
              "as_fraction"
            ],
            "properties": {
              "value_percent": {
                "type": "string",
                "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{4}$",
                "description": "The prescribed percentage the engine applies. Decimal string at a fixed scale of 4 decimal places."
              },
              "as_fraction": {
                "type": "string",
                "description": "The same rate as an exact fraction, for example \"27/1000\"."
              }
            }
          },
          "workings": {
            "type": "object",
            "description": "Branch-specific workings. Money has 2 decimal places, quarter-cent figures 4 and factors 4.",
            "properties": {
              "base_rate_of_pay_grossed_up": {
                "type": "string",
                "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$",
                "description": "Base rate of pay with the salary sacrifice added back. Decimal string at a fixed scale of 2 decimal places."
              },
              "annual_salary_paid_grossed_up": {
                "type": "string",
                "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$",
                "description": "Annual salary paid with the salary sacrifice added back. Decimal string at a fixed scale of 2 decimal places."
              },
              "bonuses_counted": {
                "type": "array",
                "description": "Bonuses paid at least monthly, which count.",
                "items": {
                  "type": "object",
                  "required": [
                    "component",
                    "amount",
                    "frequency"
                  ],
                  "properties": {
                    "component": {
                      "type": "string"
                    },
                    "amount": {
                      "type": "string",
                      "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$",
                      "description": "Bonus amount. Decimal string at a fixed scale of 2 decimal places."
                    },
                    "frequency": {
                      "type": "string",
                      "enum": [
                        "weekly",
                        "fortnightly",
                        "monthly",
                        "quarterly",
                        "halfYearly",
                        "annually"
                      ]
                    }
                  }
                }
              },
              "formula_a": {
                "type": "string",
                "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$",
                "description": "Formula A. Decimal string at a fixed scale of 2 decimal places."
              },
              "formula_b": {
                "type": "string",
                "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{4}$",
                "description": "Formula B, exact to the quarter cent. Decimal string at a fixed scale of 4 decimal places."
              },
              "formula_b_basis": {
                "type": "object",
                "required": [
                  "aggregate",
                  "factor"
                ],
                "properties": {
                  "aggregate": {
                    "type": "string",
                    "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$",
                    "description": "The aggregate Formula B takes three quarters of. Decimal string at a fixed scale of 2 decimal places."
                  },
                  "factor": {
                    "type": "string",
                    "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{4}$",
                    "description": "The Formula B factor. Decimal string at a fixed scale of 4 decimal places."
                  }
                }
              }
            }
          },
          "excluded": {
            "type": "array",
            "description": "Bonuses paid less often than monthly, which do not count.",
            "items": {
              "type": "object",
              "required": [
                "component",
                "amount",
                "frequency",
                "reason"
              ],
              "properties": {
                "component": {
                  "type": "string"
                },
                "amount": {
                  "type": "string",
                  "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$",
                  "description": "Bonus amount. Decimal string at a fixed scale of 2 decimal places."
                },
                "frequency": {
                  "type": "string",
                  "enum": [
                    "weekly",
                    "fortnightly",
                    "monthly",
                    "quarterly",
                    "halfYearly",
                    "annually"
                  ]
                },
                "reason": {
                  "type": "string",
                  "description": "Why the bonus does not count, citing s 3B(4)(c) and (d)."
                }
              }
            }
          },
          "rounding": {
            "type": "object"
          },
          "manifest": {
            "type": "object",
            "description": "calculator, period, schema, engine, method, rate_table_uris with SHA-256 content hashes, rounding_policy and citation.",
            "required": [
              "rounding_policy"
            ],
            "properties": {
              "rounding_policy": {
                "type": "string",
                "const": "half_up_cent_final_step",
                "description": "Stable identifier of the rounding in force: the levy is rounded once, half up (ties away from zero) to the cent, at the final step, in exact integer arithmetic from the exact levy_before_rounding."
              }
            }
          },
          "advisory": {
            "type": "object",
            "properties": {
              "figure_type": {
                "type": "string"
              },
              "notes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "CalculatorListing": {
        "type": "array",
        "items": {
          "type": "object",
          "required": [
            "calc_uri",
            "module",
            "description",
            "selection",
            "supported_periods",
            "input_schema_ref",
            "invocation",
            "limits"
          ],
          "properties": {
            "calc_uri": {
              "type": "string"
            },
            "label": {
              "type": "string"
            },
            "method": {
              "type": "string"
            },
            "module": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "selection": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "fact",
                    "election",
                    "statutory_default"
                  ]
                }
              }
            },
            "invocation": {
              "type": "object",
              "properties": {
                "method": {
                  "type": "string",
                  "const": "POST"
                },
                "path": {
                  "type": "string"
                }
              }
            },
            "supported_periods": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "input_schema_ref": {
              "type": "string"
            },
            "jurisdiction": {
              "type": "string"
            },
            "limits": {
              "type": "object"
            },
            "refusal_classes": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "status": {
              "type": "string"
            },
            "attestation": {
              "type": "string"
            }
          }
        }
      },
      "ValidationError": {
        "type": "object",
        "required": [
          "error",
          "field",
          "code",
          "message"
        ],
        "properties": {
          "error": {
            "type": "string",
            "const": "validation_error"
          },
          "field": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "Refusal": {
        "type": "object",
        "required": [
          "refusal_class",
          "reason"
        ],
        "properties": {
          "refusal_class": {
            "type": "string",
            "enum": [
              "unsupported_period",
              "out_of_scope_employee",
              "insufficient_facts",
              "components_not_read_by_branch"
            ]
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "NotFound": {
        "type": "object",
        "required": [
          "error",
          "message"
        ],
        "properties": {
          "error": {
            "type": "string",
            "const": "not_found"
          },
          "message": {
            "type": "string"
          },
          "accepted": {
            "type": "object"
          }
        }
      }
    }
  }
}
