{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer"
    },
    "note": {
      "type": [
        "string",
        "null"
      ]
    },
    "email": {
      "type": "string",
      "format": "email"
    },
    "taxes_included": {
      "type": "boolean"
    },
    "currency": {
      "type": "string"
    },
    "invoice_sent_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    },
    "tax_exempt": {
      "type": "boolean"
    },
    "completed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "name": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "line_items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "variant_id": {
            "type": "integer"
          },
          "product_id": {
            "type": "integer"
          },
          "title": {
            "type": "string"
          },
          "variant_title": {
            "type": [
              "string",
              "null"
            ]
          },
          "sku": {
            "type": "string"
          },
          "vendor": {
            "type": "string"
          },
          "quantity": {
            "type": "integer"
          },
          "requires_shipping": {
            "type": "boolean"
          },
          "taxable": {
            "type": "boolean"
          },
          "gift_card": {
            "type": "boolean"
          },
          "fulfillment_service": {
            "type": "string"
          },
          "grams": {
            "type": "integer"
          },
          "tax_lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "price": {
                  "type": "string"
                },
                "rate": {
                  "type": "number"
                },
                "title": {
                  "type": "string"
                },
                "channel_liable": {
                  "type": "boolean"
                },
                "price_set": {
                  "type": "object",
                  "properties": {
                    "shop_money": {
                      "type": "object",
                      "properties": {
                        "amount": {
                          "type": "string"
                        },
                        "currency_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "amount",
                        "currency_code"
                      ]
                    },
                    "presentment_money": {
                      "type": "object",
                      "properties": {
                        "amount": {
                          "type": "string"
                        },
                        "currency_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "amount",
                        "currency_code"
                      ]
                    }
                  },
                  "required": [
                    "shop_money",
                    "presentment_money"
                  ]
                }
              },
              "required": [
                "price",
                "rate",
                "title"
              ]
            }
          },
          "name": {
            "type": "string"
          },
          "properties": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "value": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "value",
                "name"
              ]
            }
          },
          "price": {
            "type": "string"
          },
          "admin_graphql_api_id": {
            "type": "string",
            "format": "uri"
          },
          "duties": {
            "type": "array",
            "items": false
          },
          "discount_allocations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "amount": {
                  "type": "string"
                },
                "amount_set": {
                  "type": "object",
                  "properties": {
                    "presentment_money": {
                      "type": "object",
                      "properties": {
                        "currency_code": {
                          "type": "string"
                        },
                        "amount": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "currency_code",
                        "amount"
                      ]
                    },
                    "shop_money": {
                      "type": "object",
                      "properties": {
                        "currency_code": {
                          "type": "string"
                        },
                        "amount": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "currency_code",
                        "amount"
                      ]
                    }
                  },
                  "required": [
                    "presentment_money",
                    "shop_money"
                  ]
                },
                "discount_application_index": {
                  "type": "integer"
                }
              },
              "required": [
                "amount",
                "amount_set",
                "discount_application_index"
              ]
            }
          },
          "total_discount_set": {
            "type": "object",
            "properties": {
              "presentment_money": {
                "type": "object",
                "properties": {
                  "currency_code": {
                    "type": "string"
                  },
                  "amount": {
                    "type": "string"
                  }
                },
                "required": [
                  "currency_code",
                  "amount"
                ]
              },
              "shop_money": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "string"
                  },
                  "currency_code": {
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency_code"
                ]
              }
            },
            "required": [
              "presentment_money",
              "shop_money"
            ]
          },
          "fulfillment_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "product_exists": {
            "type": "boolean"
          },
          "price_set": {
            "type": "object",
            "properties": {
              "presentment_money": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "string"
                  },
                  "currency_code": {
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency_code"
                ]
              },
              "shop_money": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "string"
                  },
                  "currency_code": {
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency_code"
                ]
              }
            },
            "required": [
              "presentment_money",
              "shop_money"
            ]
          },
          "attributed_staffs": {
            "type": "array",
            "items": false
          },
          "fulfillable_quantity": {
            "type": "integer"
          },
          "total_discount": {
            "type": "string"
          },
          "variant_inventory_management": {
            "type": [
              "string",
              "null"
            ]
          },
          "pre_tax_price": {
            "type": "string"
          },
          "pre_tax_price_set": {
            "type": "object",
            "properties": {
              "presentment_money": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "string"
                  },
                  "currency_code": {
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency_code"
                ]
              },
              "shop_money": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "string"
                  },
                  "currency_code": {
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency_code"
                ]
              }
            },
            "required": [
              "presentment_money",
              "shop_money"
            ]
          },
          "current_quantity": {
            "type": "integer"
          },
          "applied_discount": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "value_type": {
                "type": "string"
              },
              "amount": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "value": {
                "type": "string"
              }
            },
            "required": [
              "value_type",
              "amount",
              "description",
              "title",
              "value"
            ]
          },
          "custom": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "variant_id",
          "product_id",
          "title",
          "variant_title",
          "sku",
          "vendor",
          "quantity",
          "requires_shipping",
          "taxable",
          "gift_card",
          "fulfillment_service",
          "grams",
          "tax_lines",
          "name",
          "properties",
          "price",
          "admin_graphql_api_id"
        ]
      }
    },
    "shipping_address": {
      "type": "object",
      "properties": {
        "first_name": {
          "type": "string"
        },
        "address1": {
          "type": "string"
        },
        "phone": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "zip": {
          "type": [
            "string",
            "null"
          ]
        },
        "province": {
          "type": [
            "string",
            "null"
          ]
        },
        "country": {
          "type": "string"
        },
        "last_name": {
          "type": "string"
        },
        "address2": {
          "type": [
            "string",
            "null"
          ]
        },
        "company": {
          "type": [
            "string",
            "null"
          ]
        },
        "latitude": {
          "type": [
            "number",
            "null"
          ]
        },
        "longitude": {
          "type": [
            "number",
            "null"
          ]
        },
        "name": {
          "type": "string"
        },
        "country_code": {
          "type": "string"
        },
        "province_code": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "first_name",
        "address1",
        "phone",
        "city",
        "zip",
        "province",
        "country",
        "last_name",
        "address2",
        "company",
        "latitude",
        "longitude",
        "name",
        "country_code",
        "province_code"
      ]
    },
    "billing_address": {
      "type": "object",
      "properties": {
        "first_name": {
          "type": "string"
        },
        "address1": {
          "type": "string"
        },
        "phone": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "zip": {
          "type": [
            "string",
            "null"
          ]
        },
        "province": {
          "type": [
            "string",
            "null"
          ]
        },
        "country": {
          "type": "string"
        },
        "last_name": {
          "type": "string"
        },
        "address2": {
          "type": [
            "string",
            "null"
          ]
        },
        "company": {
          "type": [
            "string",
            "null"
          ]
        },
        "latitude": {
          "type": [
            "number",
            "null"
          ]
        },
        "longitude": {
          "type": [
            "number",
            "null"
          ]
        },
        "name": {
          "type": "string"
        },
        "country_code": {
          "type": "string"
        },
        "province_code": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "first_name",
        "address1",
        "phone",
        "city",
        "zip",
        "province",
        "country",
        "last_name",
        "address2",
        "company",
        "latitude",
        "longitude",
        "name",
        "country_code",
        "province_code"
      ]
    },
    "invoice_url": {
      "type": "string",
      "format": "uri"
    },
    "applied_discount": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "description": {
          "type": "string"
        },
        "value": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "amount": {
          "type": "string"
        },
        "value_type": {
          "type": "string"
        }
      },
      "required": [
        "description",
        "value",
        "title",
        "amount",
        "value_type"
      ]
    },
    "order_id": {
      "type": [
        "integer",
        "null"
      ]
    },
    "shipping_line": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "title": {
          "type": "string"
        },
        "custom": {
          "type": "boolean"
        },
        "handle": {
          "type": [
            "string",
            "null"
          ]
        },
        "price": {
          "type": "string"
        }
      },
      "required": [
        "title",
        "custom",
        "handle",
        "price"
      ]
    },
    "tax_lines": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "rate": {
            "type": "number"
          },
          "title": {
            "type": "string"
          },
          "price": {
            "type": "string"
          },
          "price_set": {
            "type": "object",
            "properties": {
              "presentment_money": {
                "type": "object",
                "properties": {
                  "currency_code": {
                    "type": "string"
                  },
                  "amount": {
                    "type": "string"
                  }
                },
                "required": [
                  "currency_code",
                  "amount"
                ]
              },
              "shop_money": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "string"
                  },
                  "currency_code": {
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency_code"
                ]
              }
            },
            "required": [
              "presentment_money",
              "shop_money"
            ]
          },
          "channel_liable": {
            "type": "boolean"
          }
        },
        "required": [
          "rate",
          "title",
          "price"
        ]
      }
    },
    "tags": {
      "type": "string"
    },
    "note_attributes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ]
      }
    },
    "total_price": {
      "type": "string"
    },
    "subtotal_price": {
      "type": "string"
    },
    "total_tax": {
      "type": "string"
    },
    "payment_terms": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer"
            },
            "payment_terms_name": {
              "type": "string"
            },
            "payment_terms_type": {
              "type": "string"
            },
            "due_in_days": {
              "type": "integer"
            },
            "created_at": {
              "type": "string",
              "format": "date-time"
            },
            "updated_at": {
              "type": "string",
              "format": "date-time"
            },
            "payment_schedules": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updated_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "payment_terms_id": {
                    "type": "integer"
                  },
                  "issued_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "due_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "completed_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "amount": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "created_at",
                  "updated_at",
                  "payment_terms_id",
                  "issued_at",
                  "due_at",
                  "completed_at",
                  "amount",
                  "currency"
                ]
              }
            }
          },
          "required": [
            "id",
            "payment_terms_name",
            "payment_terms_type",
            "due_in_days",
            "created_at",
            "updated_at",
            "payment_schedules"
          ]
        },
        {
          "type": "string"
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer"
            },
            "payment_terms_name": {
              "type": "string"
            },
            "payment_terms_type": {
              "type": "string"
            },
            "due_in_days": {
              "type": "integer"
            },
            "created_at": {
              "type": "string",
              "format": "date-time"
            },
            "updated_at": {
              "type": "string",
              "format": "date-time"
            },
            "payment_schedules": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updated_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "payment_terms_id": {
                    "type": "integer"
                  },
                  "issued_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "due_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "completed_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "amount": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "created_at",
                  "updated_at",
                  "payment_terms_id",
                  "issued_at",
                  "due_at",
                  "completed_at",
                  "amount",
                  "currency"
                ]
              }
            }
          },
          "required": [
            "id",
            "payment_terms_name",
            "payment_terms_type",
            "due_in_days",
            "created_at",
            "updated_at",
            "payment_schedules"
          ]
        }
      ]
    },
    "admin_graphql_api_id": {
      "type": "string",
      "format": "uri"
    },
    "customer": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "email": {
          "type": "string",
          "format": "email"
        },
        "created_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "updated_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "first_name": {
          "type": "string"
        },
        "last_name": {
          "type": "string"
        },
        "orders_count": {
          "type": "integer"
        },
        "state": {
          "type": "string"
        },
        "total_spent": {
          "type": "string"
        },
        "last_order_id": {
          "type": [
            "integer",
            "null"
          ]
        },
        "note": {
          "type": [
            "string",
            "null"
          ]
        },
        "verified_email": {
          "type": "boolean"
        },
        "multipass_identifier": {
          "type": [
            "string",
            "null"
          ]
        },
        "tax_exempt": {
          "type": "boolean"
        },
        "tags": {
          "type": "string"
        },
        "last_order_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "currency": {
          "type": "string"
        },
        "phone": {
          "type": [
            "string",
            "null"
          ]
        },
        "accepts_marketing": {
          "type": "boolean"
        },
        "accepts_marketing_updated_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "marketing_opt_in_level": {
          "type": [
            "string",
            "null"
          ]
        },
        "tax_exemptions": {
          "type": "array",
          "items": false
        },
        "email_marketing_consent": {
          "type": "object",
          "properties": {
            "state": {
              "type": "string"
            },
            "opt_in_level": {
              "type": [
                "string",
                "null"
              ]
            },
            "consent_updated_at": {
              "type": [
                "string",
                "null"
              ],
              "format": "date-time"
            }
          },
          "required": [
            "state",
            "opt_in_level",
            "consent_updated_at"
          ]
        },
        "sms_marketing_consent": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "consent_collected_from": {
              "type": "string"
            },
            "consent_updated_at": {
              "type": [
                "string",
                "null"
              ],
              "format": "date-time"
            },
            "opt_in_level": {
              "type": "string"
            },
            "state": {
              "type": "string"
            }
          },
          "required": [
            "consent_collected_from",
            "consent_updated_at",
            "opt_in_level",
            "state"
          ]
        },
        "admin_graphql_api_id": {
          "type": "string",
          "format": "uri"
        },
        "default_address": {
          "type": "object",
          "properties": {
            "id": {
              "type": [
                "integer",
                "null"
              ]
            },
            "customer_id": {
              "type": "integer"
            },
            "first_name": {
              "type": [
                "string",
                "null"
              ]
            },
            "last_name": {
              "type": [
                "string",
                "null"
              ]
            },
            "company": {
              "type": [
                "string",
                "null"
              ]
            },
            "address1": {
              "type": "string"
            },
            "address2": {
              "type": [
                "string",
                "null"
              ]
            },
            "city": {
              "type": "string"
            },
            "province": {
              "type": [
                "string",
                "null"
              ]
            },
            "country": {
              "type": "string"
            },
            "zip": {
              "type": [
                "string",
                "null"
              ]
            },
            "phone": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "province_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "country_code": {
              "type": "string"
            },
            "country_name": {
              "type": "string"
            },
            "default": {
              "type": "boolean"
            }
          },
          "required": [
            "id",
            "customer_id",
            "first_name",
            "last_name",
            "company",
            "address1",
            "address2",
            "city",
            "province",
            "country",
            "zip",
            "phone",
            "name",
            "province_code",
            "country_code",
            "country_name",
            "default"
          ]
        },
        "metafields": {
          "type": "array",
          "items": false
        }
      },
      "required": [
        "id",
        "email",
        "created_at",
        "updated_at",
        "first_name",
        "last_name",
        "orders_count",
        "state",
        "total_spent",
        "last_order_id",
        "note",
        "verified_email",
        "multipass_identifier",
        "tax_exempt",
        "tags",
        "last_order_name",
        "currency",
        "phone",
        "accepts_marketing",
        "accepts_marketing_updated_at",
        "marketing_opt_in_level",
        "tax_exemptions",
        "email_marketing_consent",
        "sms_marketing_consent",
        "admin_graphql_api_id",
        "default_address"
      ]
    }
  },
  "required": [
    "id",
    "note",
    "email",
    "taxes_included",
    "currency",
    "invoice_sent_at",
    "created_at",
    "updated_at",
    "tax_exempt",
    "completed_at",
    "name",
    "status",
    "line_items",
    "shipping_address",
    "billing_address",
    "invoice_url",
    "applied_discount",
    "order_id",
    "shipping_line",
    "tax_lines",
    "tags",
    "note_attributes",
    "total_price",
    "subtotal_price",
    "total_tax",
    "payment_terms",
    "admin_graphql_api_id",
    "customer"
  ]
}