{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/emporix/main/json-schema/emporix-new-customer-in-schema.json",
  "title": "newCustomerIn",
  "x-generated": "2026-10-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/emporix-reward-points-openapi.yml#/components/schemas/newCustomerIn",
  "type": "object",
  "properties": {
    "customerId": {
      "type": "string"
    },
    "startPoints": {
      "$ref": "#/$defs/addedPoints"
    }
  },
  "$defs": {
    "addedPoints": {
      "title": "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"
      ]
    }
  }
}