{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/argus-town/json-schema/argus-town-negotiated-pricing-body-schema.json",
  "title": "NegotiatedPricingBody",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/argus-town-negotiated-pricing-api-openapi.yml#/components/schemas/NegotiatedPricingBody",
  "type": "object",
  "required": [],
  "properties": {
    "rates": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/NegotiatedRate"
      },
      "description": "Rates to set, one per `sku` and `unit`; rates already set and not listed are kept. One bad entry rejects the whole request.",
      "title": "maxItems(100)",
      "minItems": 1,
      "maxItems": 100
    },
    "plan": {
      "$ref": "#/$defs/NegotiatedPlanInput"
    }
  },
  "additionalProperties": true,
  "$defs": {
    "NegotiatedPlanInput": {
      "type": "object",
      "required": [],
      "properties": {
        "price_usd_micros": {
          "type": "integer",
          "description": "a number between 0 and 1000000000000",
          "title": "between(0, 1000000000000)",
          "minimum": 0,
          "maximum": 1000000000000
        },
        "included_amount": {
          "type": "integer",
          "description": "a number between 0 and 1000000000000000",
          "title": "between(0, 1000000000000000)",
          "minimum": 0,
          "maximum": 1000000000000000
        },
        "included_meter_id": {
          "type": "string",
          "description": "a string at most 120 character(s) long",
          "title": "maxLength(120)",
          "minLength": 1,
          "maxLength": 120
        },
        "overage_nano_usd_per_unit": {
          "type": "integer",
          "description": "a number between 0 and 1000000000000",
          "title": "between(0, 1000000000000)",
          "minimum": 0,
          "maximum": 1000000000000
        }
      },
      "additionalProperties": true,
      "description": "The negotiated subscription. Fields you omit are cleared."
    },
    "NegotiatedRate": {
      "type": "object",
      "required": [
        "sku",
        "unit",
        "nano_usd_per_unit"
      ],
      "properties": {
        "sku": {
          "type": "string",
          "description": "a string at most 120 character(s) long",
          "title": "maxLength(120)",
          "minLength": 1,
          "maxLength": 120
        },
        "unit": {
          "type": "string",
          "description": "a string at most 60 character(s) long",
          "title": "maxLength(60)",
          "minLength": 1,
          "maxLength": 60
        },
        "nano_usd_per_unit": {
          "type": "integer",
          "description": "a number between 0 and 1000000000000",
          "title": "between(0, 1000000000000)",
          "minimum": 0,
          "maximum": 1000000000000
        }
      },
      "additionalProperties": true
    }
  }
}