{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/plugsurfing/json-schema/plugsurfing-charging-key-order-request-schema.json",
  "title": "ChargingKeyOrderRequest",
  "description": "This endpoint allows you to order a charging key for a specific user. To prevent duplicate orders, ordering charging keys for a single user is throttled to 1 order every 5 minutes. This is a safety measure to avoid accidental double-clicks on the order button, preventing the user from being charged twice. If the user exceeds this limit, a `429 - Too Many Requests` HTTP response will be returned.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/plugsurfing-charging-key-orders-api-openapi.yml#/components/schemas/ChargingKeyOrderRequest",
  "type": "object",
  "required": [
    "address",
    "taxationCountry"
  ],
  "properties": {
    "address": {
      "$ref": "#/$defs/ChargingKeyOrderAddressRequest",
      "description": "Shipping address for the ordered charging key."
    },
    "taxationCountry": {
      "type": "string",
      "maxLength": 2,
      "description": "Two-letter taxation country code"
    },
    "paymentOptionId": {
      "type": "string",
      "description": "Stripe payment option id. If not passed, a default one is used."
    }
  },
  "$defs": {
    "ChargingKeyOrderAddressRequest": {
      "title": "ChargingKeyOrderAddressRequest",
      "type": "object",
      "required": [
        "addressLine1",
        "postalCode",
        "city",
        "country"
      ],
      "properties": {
        "companyName": {
          "type": "string",
          "maxLength": 130,
          "description": "Company name for business delivery addresses."
        },
        "firstName": {
          "type": "string",
          "maxLength": 130,
          "description": "Recipient first name."
        },
        "lastName": {
          "type": "string",
          "maxLength": 130,
          "description": "Recipient last name."
        },
        "addressLine1": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "description": "Primary street address line."
        },
        "addressLine2": {
          "type": "string",
          "description": "Secondary address line such as apartment or suite."
        },
        "postalCode": {
          "type": "string",
          "minLength": 1,
          "maxLength": 10,
          "description": "Postal or ZIP code."
        },
        "city": {
          "type": "string",
          "minLength": 1,
          "maxLength": 50,
          "description": "City name."
        },
        "country": {
          "type": "string",
          "minLength": 1,
          "maxLength": 41,
          "description": "Country code in ISO 3166-1 alpha-2 format."
        }
      },
      "description": "Shipping address used when placing a charging key order."
    }
  }
}