{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/companydata-dk/json-schema/companydata-dk-ean-search-response-schema.json",
  "title": "EanSearchResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/companydata-dk-e-invoicing-api-openapi.yml#/components/schemas/EanSearchResponse",
  "properties": {
    "total": {
      "type": "integer",
      "title": "Total"
    },
    "limit": {
      "type": "integer",
      "title": "Limit"
    },
    "offset": {
      "type": "integer",
      "title": "Offset"
    },
    "endpoints": {
      "items": {
        "$ref": "#/$defs/EInvoicingEndpoint"
      },
      "type": "array",
      "title": "Endpoints"
    }
  },
  "type": "object",
  "required": [
    "total",
    "limit",
    "offset",
    "endpoints"
  ],
  "$defs": {
    "EInvoicingEndpoint": {
      "properties": {
        "endpoint_id": {
          "type": "string",
          "title": "Endpoint Id",
          "description": "Scheme and value, e.g. 0088:5790000000000"
        },
        "participant_id": {
          "type": "string",
          "title": "Participant Id",
          "description": "Full Peppol participant identifier"
        },
        "scheme": {
          "type": "string",
          "title": "Scheme",
          "description": "ISO 6523 scheme code: 0088 EAN/GLN, 0184 CVR, 0096 P-number, 0198 SE-number"
        },
        "scheme_name": {
          "type": "string",
          "title": "Scheme Name",
          "description": "gln, cvr, p_number, se_number or other"
        },
        "ean": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Ean",
          "description": "The EAN (GLN) number when the endpoint is an EAN address"
        },
        "cvr": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Cvr",
          "description": "CVR number of the receiving company, when stated or derivable"
        },
        "cvr_source": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Cvr Source",
          "description": "Where the CVR came from: participant, identifier, vat, p_number or se_number"
        },
        "p_number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "P Number"
        },
        "se_number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Se Number"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Name",
          "description": "Name on the business card"
        },
        "names": {
          "items": {
            "$ref": "#/$defs/EndpointName"
          },
          "type": "array",
          "title": "Names"
        },
        "country_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Country Code"
        },
        "geo_info": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Geo Info"
        },
        "identifiers": {
          "items": {
            "$ref": "#/$defs/EndpointIdentifier"
          },
          "type": "array",
          "title": "Identifiers"
        },
        "websites": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Websites"
        },
        "contacts": {
          "items": {
            "$ref": "#/$defs/EndpointContact"
          },
          "type": "array",
          "title": "Contacts",
          "description": "Contacts on the card, often the access point provider"
        },
        "additional_info": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Additional Info"
        },
        "registration_date": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Registration Date",
          "description": "Business card registration date (YYYY-MM-DD)"
        },
        "can_receive_invoice": {
          "type": "boolean",
          "title": "Can Receive Invoice",
          "description": "True when the endpoint accepts at least one invoice format"
        },
        "accepts": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Accepts",
          "description": "Document kinds accepted: invoice, credit_note, reminder, order, order_response, ..."
        },
        "invoice_formats": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Invoice Formats",
          "description": "Invoice formats accepted: oioubl_2.1, oioubl_2.02, peppol_bis_3_ubl, peppol_bis_3_cii, peppol_pint, peppol_selfbilling, en16931"
        },
        "document_types": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Document Types",
          "description": "Raw Peppol document type identifiers (only with include=document_types)"
        },
        "active": {
          "type": "boolean",
          "title": "Active",
          "description": "False when the endpoint has disappeared from the Peppol Directory",
          "default": true
        },
        "first_seen_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "First Seen At"
        },
        "last_seen_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Last Seen At"
        },
        "removed_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Removed At"
        }
      },
      "type": "object",
      "required": [
        "endpoint_id",
        "participant_id",
        "scheme",
        "scheme_name",
        "can_receive_invoice"
      ],
      "title": "EInvoicingEndpoint",
      "description": "One electronic address (Peppol participant) that can receive documents."
    },
    "EndpointContact": {
      "properties": {
        "type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Type"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Name"
        },
        "phone": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Phone"
        },
        "email": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Email"
        }
      },
      "type": "object",
      "title": "EndpointContact"
    },
    "EndpointIdentifier": {
      "properties": {
        "scheme": {
          "type": "string",
          "title": "Scheme",
          "description": "Identifier scheme as published, e.g. OrgNr or VAT"
        },
        "value": {
          "type": "string",
          "title": "Value"
        }
      },
      "type": "object",
      "required": [
        "scheme",
        "value"
      ],
      "title": "EndpointIdentifier"
    },
    "EndpointName": {
      "properties": {
        "name": {
          "type": "string",
          "title": "Name"
        },
        "lang": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Lang",
          "description": "Language code when the card states one"
        }
      },
      "type": "object",
      "required": [
        "name"
      ],
      "title": "EndpointName"
    }
  }
}