{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/klarna/main/json-schema/klarna-distribution-request-v1-schema.json",
  "title": "DistributionRequestV1",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/klarna-hpp-api-openapi.yml#/components/schemas/DistributionRequestV1",
  "type": "object",
  "required": [
    "contact_information",
    "method"
  ],
  "properties": {
    "contact_information": {
      "$ref": "#/$defs/DistributionContactV1"
    },
    "method": {
      "type": "string",
      "description": "Method used for distribution",
      "enum": [
        "sms",
        "email",
        "token"
      ]
    },
    "template": {
      "type": "string",
      "description": "Template to use for distribution. In the current version this value is not used and might be removed in the future.",
      "enum": [
        "INSTORE_PURCHASE"
      ]
    }
  },
  "$defs": {
    "DistributionContactV1": {
      "type": "object",
      "properties": {
        "access_id": {
          "type": "string",
          "description": "Access Id for connection to HPP session. Only required if distribution method is 'token'",
          "enum": [
            "klarna:09f4a78d-d096-47d4-a0f6-abcf680c70fe",
            "467521087419",
            "278352"
          ]
        },
        "email": {
          "type": "string",
          "description": "Email where to send the email with the HPP link. Only required if distribution method is 'email'"
        },
        "phone": {
          "type": "string",
          "description": "Phone number where to send the sms with the HPP link. Only required if distribution method is 'sms'"
        },
        "phone_country": {
          "type": "string",
          "description": "ISO 3166 alpha-2 phone country. Only required if distribution method is 'sms'"
        }
      }
    }
  }
}