{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/emporix/main/json-schema/emporix-added-points-schema.json",
  "title": "addedPoints",
  "x-generated": "2026-10-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/emporix-reward-points-openapi.yml#/components/schemas/addedPoints",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "reference-id": {
      "type": [
        "string",
        "null"
      ],
      "description": "Order Id for which the points were created"
    },
    "description": {
      "type": "string",
      "description": "Auto-generated description"
    },
    "points": {
      "type": "integer",
      "description": "Number of points added in the operation"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "validUntil": {
      "format": "date-time",
      "type": "string",
      "description": "The date until when the points can be redeemed"
    },
    "allPointsAfterCreation": {
      "type": "integer",
      "description": "Number of points after creation"
    },
    "usedPoints": {
      "type": "integer",
      "description": "Number of points already used"
    },
    "usedWith": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "points"
  ]
}