{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/purple-dot/json-schema/purple-dot-get-admin-api-v1-pre-orders-response-schema.json",
  "title": "GetAdminApiV1PreOrdersResponse",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_ae-authored/purple-dot-openapi-generated.yml#/components/schemas/GetAdminApiV1PreOrdersResponse",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "reference": {
      "type": "string"
    },
    "cancel_reason": {
      "type": [
        "string",
        "null"
      ]
    },
    "cancelled_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "currency": {
      "type": "string"
    },
    "email": {
      "type": "string"
    },
    "customer": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string"
        },
        "external_id": {
          "type": "string"
        }
      }
    },
    "line_items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "total": {
            "type": "number"
          },
          "price": {
            "type": "number"
          },
          "product_id": {
            "type": "string"
          },
          "quantity": {
            "type": "integer"
          },
          "sku": {
            "type": "string"
          },
          "variant_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "earliest_ship_date": {
            "type": "string",
            "format": "date-time"
          },
          "latest_ship_date": {
            "type": "string",
            "format": "date-time"
          },
          "taxable": {
            "type": "boolean"
          },
          "tax_lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "price": {
                  "type": "number"
                },
                "rate": {
                  "type": "number"
                },
                "title": {
                  "type": "string"
                },
                "inclusive": {
                  "type": "boolean"
                }
              }
            }
          },
          "total_discount": {
            "type": "number"
          },
          "cancelled_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "cancelled": {
            "type": "boolean"
          }
        }
      }
    },
    "shipping_address": {
      "type": "object",
      "properties": {
        "address1": {
          "type": "string"
        },
        "address2": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "country_code": {
          "type": "string"
        },
        "first_name": {
          "type": "string"
        },
        "last_name": {
          "type": "string"
        },
        "phone": {
          "type": "string"
        },
        "province_code": {
          "type": "string"
        },
        "postal_code": {
          "type": "string"
        }
      }
    },
    "shipping_lines": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "total": {
            "type": "number"
          },
          "price": {
            "type": "number"
          },
          "title": {
            "type": "string"
          },
          "tax_lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "price": {
                  "type": "number"
                },
                "rate": {
                  "type": "number"
                },
                "title": {
                  "type": "string"
                },
                "inclusive": {
                  "type": "boolean"
                }
              }
            }
          },
          "line_items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "line_item_id": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "subtotal_price": {
      "type": "number"
    },
    "tax_lines": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "price": {
            "type": "number"
          },
          "rate": {
            "type": "number"
          },
          "title": {
            "type": "string"
          }
        }
      }
    },
    "tax_included": {
      "type": "boolean"
    },
    "total_discounts": {
      "type": "number"
    },
    "total_price": {
      "type": "number"
    },
    "total_tax": {
      "type": "number"
    },
    "total_refunded": {
      "type": "number"
    },
    "exported_orders": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "order_number": {
            "type": "string"
          },
          "line_items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "line_item_id": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "sales_channel": {
      "type": "string"
    },
    "pos_sale": {
      "type": [
        "string",
        "null"
      ]
    }
  }
}