{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rutter/json-schema/rutter-create-order-body-schema.json",
  "title": "CreateOrderBody",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rutter-orders-api-openapi.yml#/components/schemas/CreateOrderBody",
  "type": "object",
  "properties": {
    "order": {
      "$ref": "#/$defs/CreateOrder"
    }
  },
  "required": [
    "order"
  ],
  "$defs": {
    "CreateOrder": {
      "type": "object",
      "properties": {
        "currency_code": {
          "type": "string",
          "description": "The [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) currency code for the line item."
        },
        "line_items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "variant_id": {
                "type": "string",
                "description": "The variant id associated with the line item.",
                "x-rutter-platforms": {
                  "SHOPIFY": {}
                }
              },
              "quantity": {
                "type": "number",
                "description": "The quantity of the variant.",
                "x-rutter-platforms": {
                  "SHOPIFY": {}
                }
              }
            },
            "required": [
              "variant_id"
            ],
            "additionalProperties": false
          },
          "description": "An array of product variants included in the order and their quantities.",
          "x-rutter-platforms": {
            "SHOPIFY": {}
          }
        },
        "customer": {
          "type": "object",
          "properties": {
            "email": {
              "type": "string",
              "description": "The email of the customer associated with the order.",
              "x-rutter-platforms": {
                "SHOPIFY": {}
              }
            },
            "first_name": {
              "type": "string",
              "description": "The first name of the customer associated with the order.",
              "x-rutter-platforms": {
                "SHOPIFY": {}
              }
            },
            "last_name": {
              "type": "string",
              "description": "The last name of the customer associated with the order.",
              "x-rutter-platforms": {
                "SHOPIFY": {}
              }
            }
          },
          "required": [
            "email"
          ],
          "additionalProperties": false,
          "description": "Information about the customer.",
          "x-rutter-platforms": {
            "SHOPIFY": {}
          }
        },
        "billing_address": {
          "type": "object",
          "properties": {
            "address1": {
              "type": "string",
              "description": "The first address line of the address.",
              "x-rutter-platforms": {
                "SHOPIFY": {}
              }
            },
            "city": {
              "type": "string",
              "description": "The city, town, or village of the address.",
              "x-rutter-platforms": {
                "SHOPIFY": {}
              }
            },
            "country_code": {
              "type": "string",
              "description": "The [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) country code for the country of the address.",
              "x-rutter-platforms": {
                "SHOPIFY": {}
              }
            },
            "first_name": {
              "type": "string",
              "description": "The first name of the person associated with the address.",
              "x-rutter-platforms": {
                "SHOPIFY": {}
              }
            },
            "last_name": {
              "type": "string",
              "description": "The last name of the person associated with the address.",
              "x-rutter-platforms": {
                "SHOPIFY": {}
              }
            },
            "postal_code": {
              "type": "string",
              "description": "The postal code (ZIP, Eircode, etc) of the address.",
              "x-rutter-platforms": {
                "SHOPIFY": {}
              }
            },
            "region": {
              "type": "string",
              "description": "The abbreviation of the region of the address. For the US, this would be states, for other places, it would be provinces or equivalent.",
              "x-rutter-platforms": {
                "SHOPIFY": {}
              }
            },
            "address2": {
              "type": "string",
              "description": "An optional second address line of the address.",
              "x-rutter-platforms": {
                "SHOPIFY": {}
              }
            },
            "email": {
              "type": [
                "string",
                "null"
              ],
              "description": "The email for the customer at the address."
            },
            "phone": {
              "type": [
                "string",
                "null"
              ],
              "description": "The phone number at the address.",
              "x-rutter-platforms": {
                "SHOPIFY": {}
              }
            }
          },
          "required": [
            "address1",
            "city",
            "country_code",
            "first_name",
            "last_name",
            "postal_code",
            "region"
          ],
          "additionalProperties": false,
          "description": "The billing address of the order.",
          "x-rutter-platforms": {
            "SHOPIFY": {}
          }
        },
        "shipping_address": {
          "type": "object",
          "properties": {
            "address1": {
              "type": "string",
              "description": "The first address line of the address.",
              "x-rutter-platforms": {
                "SHOPIFY": {}
              }
            },
            "city": {
              "type": "string",
              "description": "The city, town, or village of the address.",
              "x-rutter-platforms": {
                "SHOPIFY": {}
              }
            },
            "country_code": {
              "type": "string",
              "description": "The [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) country code for the country of the address.",
              "x-rutter-platforms": {
                "SHOPIFY": {}
              }
            },
            "first_name": {
              "type": "string",
              "description": "The first name of the person associated with the address.",
              "x-rutter-platforms": {
                "SHOPIFY": {}
              }
            },
            "last_name": {
              "type": "string",
              "description": "The last name of the person associated with the address.",
              "x-rutter-platforms": {
                "SHOPIFY": {}
              }
            },
            "postal_code": {
              "type": "string",
              "description": "The postal code (ZIP, Eircode, etc) of the address.",
              "x-rutter-platforms": {
                "SHOPIFY": {}
              }
            },
            "region": {
              "type": "string",
              "description": "The abbreviation of the region of the address. For the US, this would be states, for other places, it would be provinces or equivalent.",
              "x-rutter-platforms": {
                "SHOPIFY": {}
              }
            },
            "address2": {
              "type": "string",
              "description": "An optional second address line of the address."
            },
            "email": {
              "type": [
                "string",
                "null"
              ],
              "description": "The email for the customer at the address."
            },
            "phone": {
              "type": [
                "string",
                "null"
              ],
              "description": "The phone number at the address."
            }
          },
          "required": [
            "address1",
            "city",
            "country_code",
            "first_name",
            "last_name",
            "postal_code",
            "region"
          ],
          "additionalProperties": false,
          "description": "The shipping address of the order.",
          "x-rutter-platforms": {
            "SHOPIFY": {}
          }
        },
        "additional_fields": {
          "type": "object",
          "properties": {
            "tags": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Tags associated with the order. Shopify Only",
              "x-rutter-platforms": {
                "SHOPIFY": {}
              }
            }
          },
          "additionalProperties": false,
          "x-rutter-platforms": {
            "SHOPIFY": {}
          }
        }
      },
      "required": [
        "currency_code",
        "line_items",
        "customer",
        "billing_address"
      ],
      "description": "The order to create."
    }
  }
}