{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://smklog.com/developers/schemas/billable-weight.schema.json",
  "title": "BillableWeight",
  "type": "object",
  "description": "How USPS, UPS and FedEx bill one box, and the limits it meets.",
  "required": [
    "box_in",
    "actual_weight_lb",
    "rounded_weight_lb",
    "length_plus_girth_in",
    "carriers",
    "limits",
    "hint",
    "note"
  ],
  "properties": {
    "box_in": {
      "type": "array",
      "items": {
        "type": "integer"
      },
      "minItems": 3,
      "maxItems": 3,
      "description": "Sides rounded up to whole inches, longest first"
    },
    "actual_weight_lb": {
      "type": "number",
      "description": "Packed weight sent, pounds"
    },
    "rounded_weight_lb": {
      "type": "integer",
      "description": "Packed weight rounded up to a whole pound, at least 1"
    },
    "length_plus_girth_in": {
      "type": "integer",
      "description": "Longest side plus twice the other two, sides rounded up"
    },
    "carriers": {
      "type": "array",
      "description": "USPS, UPS and FedEx, in that order",
      "items": {
        "type": "object",
        "required": [
          "carrier",
          "side_rounding",
          "cubic_inches",
          "dimensional_weight_lb",
          "billable_weight_lb",
          "billed_by_size",
          "rule"
        ],
        "properties": {
          "carrier": {
            "type": "string",
            "enum": [
              "USPS",
              "UPS",
              "FedEx"
            ]
          },
          "side_rounding": {
            "type": "string",
            "enum": [
              "up",
              "nearest"
            ],
            "description": "Per-side rounding before multiplying"
          },
          "cubic_inches": {
            "type": "integer",
            "description": "L x W x H after that rounding"
          },
          "dimensional_weight_lb": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Cubic inches / 139, rounded up; null when USPS bills by weight alone (1728 cubic inches or less)"
          },
          "billable_weight_lb": {
            "type": "integer",
            "description": "The larger of the rounded actual and dimensional weights"
          },
          "billed_by_size": {
            "type": "boolean",
            "description": "True when the dimensional weight is larger"
          },
          "rule": {
            "type": "string",
            "description": "The rule applied, in a sentence"
          },
          "note": {
            "type": "string",
            "description": "USPS under 1 lb: priced by the ounce"
          }
        }
      }
    },
    "limits": {
      "type": "object",
      "required": [
        "within_parcel_limits",
        "parcel_rule",
        "usps_ground_advantage",
        "usps_priority_mail"
      ],
      "properties": {
        "within_parcel_limits": {
          "type": "boolean",
          "description": "Fits the parcel limits in parcel_rule"
        },
        "parcel_rule": {
          "type": "string",
          "description": "The parcel limits in a sentence"
        },
        "usps_ground_advantage": {
          "type": "boolean",
          "description": "At most 70 lb and 130 in of length plus girth"
        },
        "usps_priority_mail": {
          "type": "boolean",
          "description": "At most 70 lb and 108 in of length plus girth"
        }
      }
    },
    "hint": {
      "type": [
        "string",
        "null"
      ],
      "description": "Box-size advice when the box bills 2 lb or more above its weight; else null"
    },
    "note": {
      "type": "string",
      "description": "What decides: the carrier’s own measurement at acceptance"
    }
  },
  "x-provenance": {
    "method": "published",
    "publisher": "SMKlog (SMKLOG-2022 LLC)",
    "source": "https://quote-api.smklog.com/openapi.json",
    "published": "2026-11-26"
  }
}
