{
  "openapi": "3.0.3",
  "info": {
    "title": "meter-check-on-number",
    "description": "### ServiceId: BSCMF0100\n\n# API Version - 1.0.0\n#### Generated by ECDM Toolkit version 2.10.1\nService to check if a meter is connected to a given AllocationPoint.\n# Release History\n\n## 1.0.0 (2024-05-15)\nTer vaststelling CBM\n\n## 0.8.0 (2024-04-10)\nReview voorleggen MFFBAS, Bouwteam\n\n## 0.6.0 (2024-04-03)\nReview WG-API\n\n## 0.3.0 (2024-02-13)\nInternal review\n\n## 0.1.0 (2024-02-07)\nDraft version\n",
    "contact": {},
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "/energy-grid/energy-grid/meter/meter-isrelated-retrieval/meter-check-on-number/v1",
      "description": "Default host only has API context, name and version,"
    }
  ],
  "tags": [
    {
      "name": "AccountingPoints"
    }
  ],
  "paths": {
    "/meters": {
      "post": {
        "summary": "Check if a Meter is related to given AccountingPoint",
        "description": "With this service a Meternumber (last 6 digits) can be checked on a related AllocationPoint.",
        "deprecated": false,
        "operationId": "meterIsRelatedRetrieval",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestMeter"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Meter"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Rfc7807ProblemResultType"
                },
                "examples": {
                  "Error400_SFn8Z0G81c": {
                    "$ref": "#/components/examples/Error400_SFn8Z0G81c"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Rfc7807ProblemResultType"
                },
                "examples": {
                  "Error401_PL9bRR7hNj": {
                    "$ref": "#/components/examples/Error401_PL9bRR7hNj"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Rfc7807ProblemResultType"
                },
                "examples": {
                  "Error403_E8cVV7vTpd": {
                    "$ref": "#/components/examples/Error403_E8cVV7vTpd"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Rfc7807ProblemResultType"
                },
                "examples": {
                  "Error404_S3zYo4x5Yh": {
                    "$ref": "#/components/examples/Error404_S3zYo4x5Yh"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Rfc7807ProblemResultType"
                },
                "examples": {
                  "Error500_XISYCPQuI7": {
                    "$ref": "#/components/examples/Error500_XISYCPQuI7"
                  }
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Rfc7807ProblemResultType"
                },
                "examples": {
                  "Error503_XYCGd7baT2": {
                    "$ref": "#/components/examples/Error503_XYCGd7baT2"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "examples": {
      "Error400_SFn8Z0G81c": {
        "value": {
          "type": "https://datatracker.ietf.org/doc/html/rfc7231#section-6.5.1",
          "title": "Bad Request",
          "status": 400
        }
      },
      "Error401_PL9bRR7hNj": {
        "value": {
          "type": "https://datatracker.ietf.org/doc/html/rfc7235#section-3.1",
          "title": "Unauthorized",
          "status": 401
        }
      },
      "Error403_E8cVV7vTpd": {
        "value": {
          "type": "https://datatracker.ietf.org/doc/html/rfc7231#section-6.5.3",
          "title": "Forbidden",
          "status": 403
        }
      },
      "Error404_S3zYo4x5Yh": {
        "value": {
          "type": "https://datatracker.ietf.org/doc/html/rfc7231#section-6.5.4",
          "title": "Not Found",
          "status": 404
        }
      },
      "Error500_XISYCPQuI7": {
        "value": {
          "type": "https://datatracker.ietf.org/doc/html/rfc7231#section-6.6.1",
          "title": "Internal Server Error",
          "status": 500
        }
      },
      "Error503_XYCGd7baT2": {
        "value": {
          "type": "https://datatracker.ietf.org/doc/html/rfc7231#section-6.6.4",
          "title": "Service Unavailable",
          "status": 503
        }
      }
    },
    "schemas": {
      "Meter": {
        "title": "Meter",
        "description": "An ELEK meter device.",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "isRelated": {
            "title": "TrueFalseType",
            "description": "Indication if the relation with the AccountingPoint exists",
            "type": "boolean"
          }
        },
        "required": [
          "isRelated"
        ]
      },
      "ReferencedAccountingPoint": {
        "title": "ReferencedAccountingPoint",
        "description": "Referenced AccountingPoint",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "mrid": {
            "title": "Ean18Type",
            "description": "Indentification of Referenced_AccountingPoint\n\nExample:",
            "example": "871687120060458579",
            "type": "string",
            "pattern": "^[0-9]{18}$"
          }
        },
        "required": [
          "mrid"
        ]
      },
      "RequestMeter": {
        "title": "RequestMeter",
        "description": "The last 6 digits of an energy meter can be used to check if the meter is used at the given AccountingPoint (EAN18).",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "meterShortCode": {
            "title": "6charactersType",
            "description": "Last 6 digits of a meternumber",
            "type": "string",
            "minLength": 6,
            "maxLength": 6
          },
          "referencedAccountingPoint": {
            "$ref": "#/components/schemas/ReferencedAccountingPoint"
          }
        },
        "required": [
          "meterShortCode",
          "referencedAccountingPoint"
        ]
      },
      "Rfc7807ProblemResultType": {
        "title": "Rfc7807ProblemResultType",
        "description": "English descriptions",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "title": {
            "title": "NameType",
            "description": "HTTP Status code error containing information (based on RFC7807).",
            "type": "string"
          },
          "type": {
            "title": "TextType",
            "description": "A URI reference [RFC3986] that identifies the problem type. This specification encourages that, when dereferenced, it provide human-readable documentation for the problem type. When this member is not present, its value is assumed to be about:blank.",
            "type": "string"
          },
          "detail": {
            "title": "TextType",
            "description": "A human-readable explanation specific to this occurrence of the problem.",
            "type": "string"
          },
          "status": {
            "title": "IntegerType",
            "description": "The HTTP status code generated by the origin server for this occurrence of the problem.",
            "type": "integer"
          },
          "instance": {
            "title": "TextType",
            "description": "A URI reference that identifies the specific occurrence of the problem.",
            "type": "string"
          }
        },
        "required": [
          "title",
          "type",
          "status"
        ]
      }
    }
  }
}