{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/aftership/main/json-schema/aftership-claim-item-schema.json",
  "title": "ClaimItem",
  "description": "A claim item resource.",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aftership-claim-items-api-openapi.yml#/components/schemas/Claim_item",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "source_id": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "product_title": {
      "type": "string"
    },
    "variant_title": {
      "type": "string"
    },
    "quantity": {
      "type": "integer"
    },
    "unit_price": {
      "type": "object",
      "properties": {
        "currency": {
          "type": "string"
        },
        "amount": {
          "type": "string"
        }
      }
    },
    "discounted_price": {
      "type": "object",
      "properties": {
        "currency": {
          "type": "string"
        },
        "amount": {
          "type": "string"
        }
      }
    },
    "tax": {
      "type": [
        "object",
        "null"
      ],
      "description": "Tax amount for the item. Only populated for order flow; null for non-order flows.",
      "properties": {
        "currency": {
          "type": "string"
        },
        "amount": {
          "type": "string"
        }
      }
    },
    "discounted_price_including_tax": {
      "type": [
        "object",
        "null"
      ],
      "description": "Discounted price including tax (presentment). Only populated for order flow; null for non-order flows.",
      "properties": {
        "currency": {
          "type": "string"
        },
        "amount": {
          "type": "string"
        }
      }
    },
    "product_tags": {
      "type": "array",
      "description": "Platform product tags. Populated for order and store product flows; empty array for CSV or no-source flows.",
      "items": {
        "type": "string"
      }
    },
    "image": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string"
        }
      }
    },
    "source_variant_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "sku": {
      "type": "string"
    },
    "issue_description": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        },
        "subreason": {
          "type": [
            "string",
            "null"
          ],
          "x-stoplight": {
            "id": "8mq63hp3hkoa1"
          }
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "files": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "x-stoplight": {
              "id": "jd8itav7wje17"
            },
            "type": "object"
          }
        }
      }
    },
    "process_item_resolution_method": {
      "type": "string",
      "enum": [
        "repair_item",
        "replace_item",
        "send_repair_kit",
        "issue_store_credit",
        "other"
      ]
    },
    "process_item_details": {
      "type": [
        "string",
        "null"
      ]
    },
    "store_credit": {
      "type": [
        "object",
        "null"
      ],
      "description": "The store credit created for this claim item.",
      "properties": {
        "value": {
          "$ref": "#/$defs/Money",
          "description": "The store credit value."
        }
      }
    },
    "replacement_order": {
      "type": [
        "object",
        "null"
      ],
      "description": "The replacement order created for this claim item.",
      "properties": {
        "order_name": {
          "type": "string",
          "description": "The replacement order name from the e-commerce platform."
        },
        "items": {
          "type": "array",
          "description": "Replacement order items.",
          "items": {
            "type": "object",
            "properties": {
              "external_id": {
                "type": "string",
                "description": "The identifier of the replacement order item on the e-commerce platform."
              },
              "product_title": {
                "type": "string",
                "description": "The product title of the replacement item."
              },
              "variant_title": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The variant title of the replacement item."
              },
              "sku": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The SKU of the replacement item."
              },
              "quantity": {
                "type": "integer",
                "description": "The quantity of the replacement item."
              },
              "unit_price": {
                "$ref": "#/$defs/Money",
                "description": "The unit price of the replacement item."
              }
            }
          }
        }
      }
    },
    "product_source": {
      "type": "string"
    },
    "shopper_notes": {
      "type": [
        "string",
        "null"
      ]
    },
    "item_tags": {
      "type": "array",
      "description": "Merchant item tags applied to this claim item.",
      "items": {
        "$ref": "#/$defs/ItemTag"
      }
    },
    "merchant_uploaded_image_urls": {
      "type": "array",
      "x-stoplight": {
        "id": "qa9ytrxgst8fg"
      },
      "items": {
        "x-stoplight": {
          "id": "k8itzg50h5wee"
        },
        "type": "string"
      },
      "description": "Merchant-uploaded image URLs attached to this claim item."
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time, formatted in ISO 8601, when the claim item was created."
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time, formatted in ISO 8601, when the claim item was last updated."
    }
  },
  "$defs": {
    "ItemTag": {
      "title": "ItemTag",
      "x-stoplight": {
        "id": "8wwwff48758hx"
      },
      "type": "object",
      "description": "A merchant-defined tag that can be added to claim items.",
      "properties": {
        "id": {
          "type": "string",
          "x-stoplight": {
            "id": "r4fbyaanpn8i9"
          },
          "description": "The unique identifier for the item tag."
        },
        "name": {
          "type": "string",
          "x-stoplight": {
            "id": "4r1fyg1jjzxon"
          },
          "description": "The name of the item tag."
        },
        "created_at": {
          "type": "string",
          "x-stoplight": {
            "id": "a41sqbbkajk6n"
          },
          "description": "The date and time, formatted in ISO 8601, when the item tag was created.",
          "format": "date-time"
        }
      }
    },
    "Money": {
      "description": "The store credit value.",
      "title": "Money",
      "type": "object",
      "properties": {
        "amount": {
          "type": "string",
          "description": "The amount represented with two decimal places."
        },
        "currency": {
          "type": "string",
          "description": "The currency code, using ISO 4217 standards."
        }
      }
    }
  }
}