{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/argus-town/json-schema/argus-town-negotiated-pricing-schema.json",
  "title": "NegotiatedPricing",
  "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/NegotiatedPricing",
  "type": "object",
  "required": [
    "object",
    "provider",
    "rates",
    "plan",
    "updated_at"
  ],
  "properties": {
    "object": {
      "type": "string",
      "enum": [
        "negotiated_pricing"
      ]
    },
    "provider": {
      "type": "string"
    },
    "rates": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/NegotiatedRate"
      }
    },
    "plan": {
      "anyOf": [
        {
          "$ref": "#/$defs/NegotiatedPlan"
        },
        {
          "type": "null"
        }
      ]
    },
    "updated_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "list_rates": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ListRate"
      },
      "description": "Argus's list rate for each `sku` and `unit` the provider is priced by, so you can see what a negotiated rate replaces. Present only with `expand[]=list_rates`."
    }
  },
  "additionalProperties": true,
  "$defs": {
    "ListRate": {
      "type": "object",
      "required": [
        "sku",
        "unit",
        "nano_usd_per_unit",
        "source"
      ],
      "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
        },
        "source": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "NegotiatedPlan": {
      "type": "object",
      "required": [
        "price_usd_micros",
        "included_amount",
        "included_meter_id",
        "overage_nano_usd_per_unit"
      ],
      "properties": {
        "price_usd_micros": {
          "anyOf": [
            {
              "type": "integer",
              "description": "a number between 0 and 1000000000000",
              "title": "between(0, 1000000000000)",
              "minimum": 0,
              "maximum": 1000000000000
            },
            {
              "type": "null"
            }
          ]
        },
        "included_amount": {
          "anyOf": [
            {
              "type": "integer",
              "description": "a number between 0 and 1000000000000000",
              "title": "between(0, 1000000000000000)",
              "minimum": 0,
              "maximum": 1000000000000000
            },
            {
              "type": "null"
            }
          ]
        },
        "included_meter_id": {
          "anyOf": [
            {
              "type": "string",
              "description": "a string at most 120 character(s) long",
              "title": "maxLength(120)",
              "minLength": 1,
              "maxLength": 120
            },
            {
              "type": "null"
            }
          ]
        },
        "overage_nano_usd_per_unit": {
          "anyOf": [
            {
              "type": "integer",
              "description": "a number between 0 and 1000000000000",
              "title": "between(0, 1000000000000)",
              "minimum": 0,
              "maximum": 1000000000000
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": true
    },
    "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
    }
  }
}