{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fusehealth-com/json-schema/fusehealth-com-order-brand-view-schema.json",
  "title": "OrderBrandView",
  "description": "Sanitized brand-facing order (whitelisted fields only).",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fusehealth-com-openapi.json#/components/schemas/OrderBrandView",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "orderNumber": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "totalAmount": {
      "type": "number"
    },
    "subtotalAmount": {
      "type": "number"
    },
    "discountAmount": {
      "type": "number"
    },
    "taxAmount": {
      "type": "number"
    },
    "shippingAmount": {
      "type": "number"
    },
    "brandAmount": {
      "type": "number"
    },
    "billingInterval": {
      "type": "string"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "shippedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "deliveredAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "fulfillmentType": {
      "type": "string"
    },
    "approvedByDoctor": {
      "type": "boolean"
    },
    "feeBreakdown": {
      "type": "object",
      "additionalProperties": true,
      "description": "Per-order fee waterfall."
    },
    "user": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "firstName": {
          "type": "string"
        },
        "lastName": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "phoneNumber": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "orderItems": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "quantity": {
            "type": "integer"
          },
          "unitPrice": {
            "type": "number"
          },
          "totalPrice": {
            "type": "number"
          },
          "product": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "payment": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string"
        },
        "paymentMethod": {
          "type": "string"
        }
      }
    },
    "shippingAddress": {
      "type": "object",
      "properties": {
        "address": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "state": {
          "type": "string"
        },
        "zipCode": {
          "type": "string"
        },
        "country": {
          "type": "string"
        }
      }
    },
    "shippingOrders": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string"
          },
          "trackingNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "trackingUrl": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    }
  }
}