{
  "openapi": "3.0.0",
  "info": {
    "version": "1.0-oas3",
    "title": "E.ON CRM Contract API ",
    "description": "Mit dieser Schnittstelle werden die Vertragsobjekt-Tabellen (UDO - User Defined Object) in SAP Business One gepflegt. Neue Verträge werden angelegt, existierende Verträg erhalten ein Update. Der Kunde muss in SAP Business One bereits vorhanden sein, dieser wird anhand der CRM-ID gesucht.",
    "contact": {
      "email": "t.schmitz@uniorg.de",
      "name": "Thorsten Schmitz"
     
    },
    "license": {
      "name": "(C) UNIORG Services GmbH",
      "url": "https://www.uniorg.de"
    }
  },
  "servers": [
    {
      "url": "https://xs-eon.rz4u.de/uniorg/eon/crm/contract/v1",
      "description": "productive"
    },
    {
      "url": "https://xs-test-eon.rz4u.de/uniorg/eon/crm/contract/v1",
      "description": "development"
    }
  ],
  "security": [
    {
      "basicAuth": []
    }
  ],
  "paths": {
    "/setcontract.xsjs": {
      "post": {
        "tags": [
          "Contract"
        ],
        "summary": "Pflege Verträge",
        "operationId": "setContract",
        "description": "Hinzufügen oder Aktualisieren eines Vertrags in SAP Business One.",
        "responses": {
          "200": {
            "description": "successfully received data"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Contract"
              }
            }
          },
          "description": "Contract object"
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Contract": {
        "type": "object",
        "properties": {
          "begin_date": {
            "type": "string",
            "example": "2021-09-06T00:00:00.0000000"
          },
          "bp_crm": {
            "type": "string",
            "example": "10077777"
          },
          "contract_id": {
            "type": "string",
            "example": "40022222"
          },
          "end_date": {
            "type": "string",
            "example": ""
          },
          "ev_drivers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "c_id": {
                  "type": "string",
                  "example": ""
                },
                "email": {
                  "type": "string",
                  "example": "foo@foo.com"
                },
                "eoperate_ID": {
                  "type": "string",
                  "example": ""
                },
                "eoperate_valid_from": {
                  "type": "string",
                  "example": ""
                },
                "eoperate_valid_to": {
                  "type": "string",
                  "example": ""
                },
                "ev_driver": {
                  "type": "string",
                  "example": "20099999"
                },
                "ev_driverid": {
                  "type": "string",
                  "example": "38f56277-a20e-0000-0000-000d3ad88589",
                  "maxLength": 36,
                  "minLength": 36
                },
                "firstname": {
                  "type": "string",
                  "example": "Foo"
                },
                "lastname": {
                  "type": "string",
                  "example": "Foo"
                },
                "license_plate": {
                  "type": "string",
                  "example": ""
                },
                "nice_valid_from": {
                  "type": "string",
                  "example": ""
                },
                "nice_valid_to": {
                  "type": "string",
                  "example": ""
                },
                "parameters": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "component": {
                        "type": "string",
                        "example": "RFID_CARD"
                      },
                      "numeric1": {
                        "type": "integer",
                        "format": "int32",
                        "example": "0"
                      },
                      "numeric2": {
                        "type": "integer",
                        "format": "int32",
                        "example": "0"
                      },
                      "text1": {
                        "type": "string",
                        "example": "n/a"
                      },
                      "text2": {
                        "type": "string",
                        "example": ""
                      },
                      "valid_from": {
                        "type": "string",
                        "example": ""
                      },
                      "valid_to": {
                        "type": "string",
                        "example": ""
                      }
                    }
                  }
                },
                "virta_id": {
                  "type": "string",
                  "example": "1509999"
                },
                "virta_valid_from": {
                  "type": "string",
                  "example": "2021-09-05T00:00:00.0000000"
                },
                "virta_valid_to": {
                  "type": "string",
                  "example": ""
                }
              }
            }
          },
          "orderid": {
            "type": "string",
            "example": ""
          },
          "prices": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "object",
              "properties": {
                "factor": {
                  "type": "number",
                  "example": "0.1"
                },
                "item": {
                  "type": "string",
                  "example": "BV_COMPENSATION_AC"
                },
                "price": {
                  "type": "integer",
                  "format": "int32",
                  "example": "0"
                },
                "valid_from": {
                  "type": "string",
                  "example": "2021-11-14T23:00:00.0000000"
                },
                "valid_to": {
                  "type": "string",
                  "example": "9999-12-31T00:00:00.000Z"
                }
              }
            }
          },
          "product": {
            "type": "string",
            "example": "E.ON Drive Easy"
          },
          "projectid": {
            "type": "string",
            "example": ""
          },
          "signature_date": {
            "type": "string",
            "example": "2021-09-06T00:00:00.0000000"
          }
        }
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  }
}