{
  "$defs": {
    "AppliesTo": {
      "properties": {
        "category_external_ids": {
          "default": [],
          "items": {
            "type": "string"
          },
          "title": "Category External Ids",
          "type": "array"
        },
        "product_external_ids": {
          "default": [],
          "items": {
            "type": "string"
          },
          "title": "Product External Ids",
          "type": "array"
        }
      },
      "title": "AppliesTo",
      "type": "object"
    },
    "Article": {
      "properties": {
        "author": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Author"
        },
        "category_external_ids": {
          "default": [],
          "items": {
            "type": "string"
          },
          "title": "Category External Ids",
          "type": "array"
        },
        "content_html": {
          "default": "",
          "title": "Content Html",
          "type": "string"
        },
        "excerpt": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Excerpt"
        },
        "external_id": {
          "title": "External Id",
          "type": "string"
        },
        "image_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Image Url"
        },
        "old_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Old Url"
        },
        "published_at": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Published At"
        },
        "seo": {
          "$ref": "#/$defs/Seo",
          "default": {
            "description": null,
            "title": null
          }
        },
        "slug": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Slug"
        },
        "tags": {
          "default": [],
          "items": {
            "type": "string"
          },
          "title": "Tags",
          "type": "array"
        },
        "title": {
          "title": "Title",
          "type": "string"
        }
      },
      "required": [
        "external_id",
        "title"
      ],
      "title": "Article",
      "type": "object"
    },
    "ArticleCategory": {
      "properties": {
        "external_id": {
          "title": "External Id",
          "type": "string"
        },
        "name": {
          "title": "Name",
          "type": "string"
        },
        "slug": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Slug"
        }
      },
      "required": [
        "external_id",
        "name"
      ],
      "title": "ArticleCategory",
      "type": "object"
    },
    "Brand": {
      "properties": {
        "external_id": {
          "title": "External Id",
          "type": "string"
        },
        "logo_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Logo Url"
        },
        "name": {
          "title": "Name",
          "type": "string"
        },
        "slug": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Slug"
        }
      },
      "required": [
        "external_id",
        "name"
      ],
      "title": "Brand",
      "type": "object"
    },
    "Category": {
      "properties": {
        "description_html": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Description Html"
        },
        "external_id": {
          "title": "External Id",
          "type": "string"
        },
        "image_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Image Url"
        },
        "name": {
          "title": "Name",
          "type": "string"
        },
        "parent_external_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Parent External Id"
        },
        "slug": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Slug"
        }
      },
      "required": [
        "external_id",
        "name"
      ],
      "title": "Category",
      "type": "object"
    },
    "Collection": {
      "properties": {
        "description_html": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Description Html"
        },
        "external_id": {
          "title": "External Id",
          "type": "string"
        },
        "image_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Image Url"
        },
        "slug": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Slug"
        },
        "title": {
          "title": "Title",
          "type": "string"
        }
      },
      "required": [
        "external_id",
        "title"
      ],
      "title": "Collection",
      "type": "object"
    },
    "Coupon": {
      "properties": {
        "code": {
          "title": "Code",
          "type": "string"
        },
        "ends_at": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Ends At"
        },
        "promotion_external_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Promotion External Id"
        },
        "starts_at": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Starts At"
        },
        "usage_limit": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Usage Limit"
        }
      },
      "required": [
        "code"
      ],
      "title": "Coupon",
      "type": "object"
    },
    "Image": {
      "properties": {
        "alt": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Alt"
        },
        "position": {
          "default": 0,
          "title": "Position",
          "type": "integer"
        },
        "url": {
          "title": "Url",
          "type": "string"
        }
      },
      "required": [
        "url"
      ],
      "title": "Image",
      "type": "object"
    },
    "Inventory": {
      "description": "Stock of one variant at one location (warehouse). Absolute quantity.",
      "properties": {
        "external_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "External Id"
        },
        "location_code": {
          "anyOf": [
            {
              "maxLength": 50,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Location Code"
        },
        "quantity": {
          "minimum": 0,
          "title": "Quantity",
          "type": "integer"
        },
        "sku": {
          "anyOf": [
            {
              "maxLength": 100,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Sku"
        },
        "variant_external_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Variant External Id"
        }
      },
      "required": [
        "quantity"
      ],
      "title": "Inventory",
      "type": "object"
    },
    "OptionDef": {
      "properties": {
        "name": {
          "title": "Name",
          "type": "string"
        },
        "values": {
          "items": {
            "type": "string"
          },
          "title": "Values",
          "type": "array"
        }
      },
      "required": [
        "name",
        "values"
      ],
      "title": "OptionDef",
      "type": "object"
    },
    "Page": {
      "properties": {
        "content_html": {
          "default": "",
          "title": "Content Html",
          "type": "string"
        },
        "external_id": {
          "title": "External Id",
          "type": "string"
        },
        "old_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Old Url"
        },
        "seo": {
          "$ref": "#/$defs/Seo",
          "default": {
            "description": null,
            "title": null
          }
        },
        "slug": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Slug"
        },
        "title": {
          "title": "Title",
          "type": "string"
        }
      },
      "required": [
        "external_id",
        "title"
      ],
      "title": "Page",
      "type": "object"
    },
    "Product": {
      "properties": {
        "attributes": {
          "additionalProperties": {
            "type": "string"
          },
          "default": {},
          "title": "Attributes",
          "type": "object"
        },
        "brand_external_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Brand External Id"
        },
        "category_external_ids": {
          "default": [],
          "items": {
            "type": "string"
          },
          "title": "Category External Ids",
          "type": "array"
        },
        "collection_external_ids": {
          "default": [],
          "items": {
            "type": "string"
          },
          "title": "Collection External Ids",
          "type": "array"
        },
        "description_html": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Description Html"
        },
        "external_id": {
          "title": "External Id",
          "type": "string"
        },
        "images": {
          "default": [],
          "items": {
            "$ref": "#/$defs/Image"
          },
          "title": "Images",
          "type": "array"
        },
        "old_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Old Url"
        },
        "options": {
          "default": [],
          "items": {
            "$ref": "#/$defs/OptionDef"
          },
          "title": "Options",
          "type": "array"
        },
        "seo": {
          "$ref": "#/$defs/Seo",
          "default": {
            "description": null,
            "title": null
          }
        },
        "slug": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Slug"
        },
        "status": {
          "default": "draft",
          "enum": [
            "active",
            "draft"
          ],
          "title": "Status",
          "type": "string"
        },
        "title": {
          "title": "Title",
          "type": "string"
        },
        "variants": {
          "default": [],
          "items": {
            "$ref": "#/$defs/Variant"
          },
          "title": "Variants",
          "type": "array"
        }
      },
      "required": [
        "external_id",
        "title"
      ],
      "title": "Product",
      "type": "object"
    },
    "Promotion": {
      "properties": {
        "applies_to": {
          "$ref": "#/$defs/AppliesTo",
          "default": {
            "category_external_ids": [],
            "product_external_ids": []
          }
        },
        "ends_at": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Ends At"
        },
        "external_id": {
          "title": "External Id",
          "type": "string"
        },
        "min_order_amount": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Min Order Amount"
        },
        "name": {
          "title": "Name",
          "type": "string"
        },
        "starts_at": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Starts At"
        },
        "type": {
          "enum": [
            "percent",
            "fixed",
            "free_shipping",
            "buy_x_get_y"
          ],
          "title": "Type",
          "type": "string"
        },
        "value": {
          "default": 0,
          "title": "Value",
          "type": "integer"
        }
      },
      "required": [
        "external_id",
        "name",
        "type"
      ],
      "title": "Promotion",
      "type": "object"
    },
    "Redirect": {
      "properties": {
        "from_path": {
          "title": "From Path",
          "type": "string"
        },
        "to_path": {
          "title": "To Path",
          "type": "string"
        }
      },
      "required": [
        "from_path",
        "to_path"
      ],
      "title": "Redirect",
      "type": "object"
    },
    "Seo": {
      "properties": {
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Description"
        },
        "title": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Title"
        }
      },
      "title": "Seo",
      "type": "object"
    },
    "Source": {
      "properties": {
        "currency": {
          "default": "VND",
          "title": "Currency",
          "type": "string"
        },
        "platform": {
          "title": "Platform",
          "type": "string"
        },
        "url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Url"
        }
      },
      "required": [
        "platform"
      ],
      "title": "Source",
      "type": "object"
    },
    "Variant": {
      "properties": {
        "barcode": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Barcode"
        },
        "compare_at_price": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Compare At Price"
        },
        "external_id": {
          "title": "External Id",
          "type": "string"
        },
        "option_values": {
          "default": [],
          "items": {
            "type": "string"
          },
          "title": "Option Values",
          "type": "array"
        },
        "price": {
          "default": 0,
          "title": "Price",
          "type": "integer"
        },
        "sku": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Sku"
        },
        "stock": {
          "anyOf": [
            {
              "minimum": 0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Stock"
        },
        "weight_grams": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Weight Grams"
        }
      },
      "required": [
        "external_id"
      ],
      "title": "Variant",
      "type": "object"
    }
  },
  "$id": "urn:import-feed:v1",
  "properties": {
    "article_categories": {
      "default": [],
      "items": {
        "$ref": "#/$defs/ArticleCategory"
      },
      "title": "Article Categories",
      "type": "array"
    },
    "articles": {
      "default": [],
      "items": {
        "$ref": "#/$defs/Article"
      },
      "title": "Articles",
      "type": "array"
    },
    "brands": {
      "default": [],
      "items": {
        "$ref": "#/$defs/Brand"
      },
      "title": "Brands",
      "type": "array"
    },
    "collections": {
      "default": [],
      "items": {
        "$ref": "#/$defs/Collection"
      },
      "title": "Collections",
      "type": "array"
    },
    "coupons": {
      "default": [],
      "items": {
        "$ref": "#/$defs/Coupon"
      },
      "title": "Coupons",
      "type": "array"
    },
    "inventory": {
      "default": [],
      "items": {
        "$ref": "#/$defs/Inventory"
      },
      "title": "Inventory",
      "type": "array"
    },
    "next": {
      "anyOf": [
        {
          "maxLength": 2048,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Next"
    },
    "pages": {
      "default": [],
      "items": {
        "$ref": "#/$defs/Page"
      },
      "title": "Pages",
      "type": "array"
    },
    "product_categories": {
      "default": [],
      "items": {
        "$ref": "#/$defs/Category"
      },
      "title": "Product Categories",
      "type": "array"
    },
    "products": {
      "default": [],
      "items": {
        "$ref": "#/$defs/Product"
      },
      "title": "Products",
      "type": "array"
    },
    "promotions": {
      "default": [],
      "items": {
        "$ref": "#/$defs/Promotion"
      },
      "title": "Promotions",
      "type": "array"
    },
    "redirects": {
      "default": [],
      "items": {
        "$ref": "#/$defs/Redirect"
      },
      "title": "Redirects",
      "type": "array"
    },
    "source": {
      "$ref": "#/$defs/Source"
    },
    "version": {
      "const": "1",
      "title": "Version",
      "type": "string"
    }
  },
  "required": [
    "version",
    "source"
  ],
  "title": "Canonical import feed v1",
  "type": "object"
}
