{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rutter/json-schema/rutter-create-order-fulfillment-body-schema.json",
  "title": "CreateOrderFulfillmentBody",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rutter-orders-api-openapi.yml#/components/schemas/CreateOrderFulfillmentBody",
  "type": "object",
  "properties": {
    "fulfillment": {
      "type": "object",
      "properties": {
        "location_id": {
          "type": "string",
          "description": "(Shopify only) The Shopify location id."
        },
        "carrier": {
          "type": "string",
          "maxLength": 50,
          "pattern": ".*[a-zA-Z0-9].*",
          "description": "Carrier company, ex \"USPS\", \"Fedex\", \"UPS\", \"Canada Post\", etc. Can be any string."
        },
        "tracking_number": {
          "type": "string",
          "maxLength": 100,
          "description": "Tracking number associated with this parcel. \n  Usually buyers can track tracking info using this number at carrier's website."
        },
        "service": {
          "type": "string",
          "maxLength": 50,
          "description": "Carrier shipping service, e.g. \"Priority Mail\", \"2 Day Delivery\", etc. Can be any string."
        },
        "tracking_url": {
          "type": "string",
          "maxLength": 2000,
          "description": "The tracking URL string that buyers can click to look up tracking information."
        },
        "line_items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "line_item_id": {
                "type": "string",
                "description": "The ID of the line item."
              },
              "quantity": {
                "type": "number",
                "minimum": 1,
                "description": "The number of the variants sold for this line_item."
              }
            },
            "required": [
              "line_item_id"
            ],
            "additionalProperties": false
          },
          "description": "The product variants and quantities associated as part of this fulfillment. If the line_items array is empty, Rutter will attempt to mark all line items part of the order as fulfilled."
        },
        "additional_fields": {
          "type": "object",
          "properties": {
            "notify_customer": {
              "type": "boolean",
              "description": "(Shopify only) Whether the customer should be notified. If set to true, then an email will be sent when the fulfillment is created or updated."
            }
          },
          "additionalProperties": false,
          "description": "Additional fields required only for a narrow set of use cases."
        }
      },
      "required": [
        "carrier",
        "tracking_number",
        "line_items"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "fulfillment"
  ]
}