Skip to main content

Return the Contract for the given Mail Address

GET/v2/mail-addresses/{mailAddressId}/contract
API version
v2
Request method
GET
Operation ID
contract-get-detail-of-contract-by-mail-address

Request​

  • mailAddressIdstring (uuid)required
    Example:"d3fe766e-1d34-40f0-9c27-611e3b654fca"

Responses​

Format
application/json
Description

Returns an active Contract for the given Mail Address.

  • additionalItemsarray of object
    • Array[
      • *object
        • activationDatestring (date-time)
        • aggregateReferenceobject
          • aggregatestringrequired
          • domainstringrequired
          • idstringrequired
        • articlesarray of objectrequired
          • Array[
            • *object
              • amountinteger (≥ 1)required
              • articleTemplateIdstringrequired
              • descriptionstring
              • idstringrequired
              • namestringrequired
              • unitPriceobjectrequired
                • currency"EUR"required
                • valueintegerrequired

                  The value of the price in the smallest currency unit (e.g. cents)

            ]
        • contractPeriodnumber (≥ 0)required
        • descriptionstringrequired
        • freeTrialDaysnumber
        • groupByProjectIdstring (uuid)
        • invoiceStopstring (date-time)

          If this attribute is set, the contract item will currently only be invoiced until this date.

        • invoicingPeriodnumber
        • isActivatedbooleanrequired
        • isBaseItembooleanrequired
        • isInFreeTrialboolean
        • isInclusiveboolean
        • itemIdstring (uuid)required
        • nextPossibleDowngradeDatestring (date-time)

          If this attribute is not set, termination is not allowed.

        • nextPossibleTerminationDatestring (date-time)

          If this attribute is not set, a tariff change is not allowed.

        • nextPossibleUpgradeDatestring (date-time)

          If this attribute is not set, a tariff change is not allowed.

        • orderDatestring (date-time)
        • orderIdstring (uuid)
        • replacedByItemstring (uuid)
        • tariffChangeobject
          • isForcedboolean
          • newArticlesarray of objectrequired
            • Array[
              • *object
                • amountinteger (≥ 1)required
                • articleTemplateIdstringrequired
                • descriptionstring
                • idstringrequired
                • namestringrequired
                • unitPriceobjectrequired
                  • currency"EUR"required
                  • valueintegerrequired

                    The value of the price in the smallest currency unit (e.g. cents)

              ]
          • scheduledAtDatestring (date-time)required
          • scheduledByUserIdstring
          • targetDatestring (date-time)required
        • terminationobject
          • cancellationForbiddenboolean

            Indicates whether the User is allowed to cancel the Termination.

          • explanationstring
          • reasonstring
          • scheduledAtDatestring (date-time)required
          • scheduledByUserIdstring
          • targetDatestring (date-time)required
        • totalPriceobjectrequired
          • currency"EUR"required
          • valueintegerrequired

            The value of the price in the smallest currency unit (e.g. cents)

      ]
  • baseItemobjectrequired
    • activationDatestring (date-time)
    • aggregateReferenceobject
      • aggregatestringrequired
      • domainstringrequired
      • idstringrequired
    • articlesarray of objectrequired
      • Array[
        • *object
          • amountinteger (≥ 1)required
          • articleTemplateIdstringrequired
          • descriptionstring
          • idstringrequired
          • namestringrequired
          • unitPriceobjectrequired
            • currency"EUR"required
            • valueintegerrequired

              The value of the price in the smallest currency unit (e.g. cents)

        ]
    • contractPeriodnumber (≥ 0)required
    • descriptionstringrequired
    • freeTrialDaysnumber
    • groupByProjectIdstring (uuid)
    • invoiceStopstring (date-time)

      If this attribute is set, the contract item will currently only be invoiced until this date.

    • invoicingPeriodnumber
    • isActivatedbooleanrequired
    • isBaseItembooleanrequired
    • isInFreeTrialboolean
    • isInclusiveboolean
    • itemIdstring (uuid)required
    • nextPossibleDowngradeDatestring (date-time)

      If this attribute is not set, termination is not allowed.

    • nextPossibleTerminationDatestring (date-time)

      If this attribute is not set, a tariff change is not allowed.

    • nextPossibleUpgradeDatestring (date-time)

      If this attribute is not set, a tariff change is not allowed.

    • orderDatestring (date-time)
    • orderIdstring (uuid)
    • replacedByItemstring (uuid)
    • tariffChangeobject
      • isForcedboolean
      • newArticlesarray of objectrequired
        • Array[
          • *object
            • amountinteger (≥ 1)required
            • articleTemplateIdstringrequired
            • descriptionstring
            • idstringrequired
            • namestringrequired
            • unitPriceobjectrequired
              • currency"EUR"required
              • valueintegerrequired

                The value of the price in the smallest currency unit (e.g. cents)

          ]
      • scheduledAtDatestring (date-time)required
      • scheduledByUserIdstring
      • targetDatestring (date-time)required
    • terminationobject
      • cancellationForbiddenboolean

        Indicates whether the User is allowed to cancel the Termination.

      • explanationstring
      • reasonstring
      • scheduledAtDatestring (date-time)required
      • scheduledByUserIdstring
      • targetDatestring (date-time)required
    • totalPriceobjectrequired
      • currency"EUR"required
      • valueintegerrequired

        The value of the price in the smallest currency unit (e.g. cents)

  • contractIdstring (uuid)required
  • contractNumberstringrequired
  • customerIdstringrequired
  • terminationobject
    • cancellationForbiddenboolean

      Indicates whether the User is allowed to cancel the Termination.

    • explanationstring
    • reasonstring
    • scheduledAtDatestring (date-time)required
    • scheduledByUserIdstring
    • targetDatestring (date-time)required
Content-Type: application/json

{
"additionalItems": [
{
"activationDate": "1985-10-26T01:21:00.000Z",
"aggregateReference": {
"aggregate": "project",
"domain": "project",
"id": "a1b8f0e9-904f-4716-a1c0-81ccf5342a56"
},
"articles": [
{
"amount": 1,
"articleTemplateId": "a1b8f0e9-904f-4716-a1c0-81ccf5342a56",
"description": "Musterbeschreibung",
"id": "a1b8f0e9-904f-4716-a1c0-81ccf5342a56",
"name": "Musterartikel",
"unitPrice": {
"currency": "EUR",
"value": 100
}
}
],
"contractPeriod": 1,
"description": "Space-Server: \"Mein Space-Server\"",
"freeTrialDays": 10,
"groupByProjectId": "f0f86186-0a5a-45b2-aa33-502777496347",
"invoiceStop": "1985-10-26T01:21:00.000Z",
"invoicingPeriod": 1,
"isActivated": true,
"isBaseItem": true,
"isInFreeTrial": true,
"isInclusive": true,
"itemId": "f0f86186-0a5a-45b2-aa33-502777496347",
"nextPossibleDowngradeDate": "1985-10-26T01:21:00.000Z",
"nextPossibleTerminationDate": "1985-10-26T01:21:00.000Z",
"nextPossibleUpgradeDate": "1985-10-26T01:21:00.000Z",
"orderDate": "1985-10-26T01:21:00.000Z",
"orderId": "f0f86186-0a5a-45b2-aa33-502777496347",
"replacedByItem": "f0f86186-0a5a-45b2-aa33-502777496347",
"tariffChange": {
"isForced": true,
"newArticles": [
{
"amount": 1,
"articleTemplateId": "a1b8f0e9-904f-4716-a1c0-81ccf5342a56",
"description": "Musterbeschreibung",
"id": "a1b8f0e9-904f-4716-a1c0-81ccf5342a56",
"name": "Musterartikel",
"unitPrice": {
"currency": "EUR",
"value": 100
}
}
],
"scheduledAtDate": "1985-10-26T01:21:00.000Z",
"scheduledByUserId": "string",
"targetDate": "1985-10-26T01:21:00.000Z"
},
"termination": {
"cancellationForbidden": true,
"explanation": "Not needed anymore",
"reason": "Not needed anymore",
"scheduledAtDate": "1985-10-26T01:21:00.000Z",
"scheduledByUserId": "string",
"targetDate": "1985-10-26T01:21:00.000Z"
},
"totalPrice": {
"currency": "EUR",
"value": 100
}
}
],
"baseItem": {
"activationDate": "1985-10-26T01:21:00.000Z",
"aggregateReference": {
"aggregate": "project",
"domain": "project",
"id": "a1b8f0e9-904f-4716-a1c0-81ccf5342a56"
},
"articles": [
{
"amount": 1,
"articleTemplateId": "a1b8f0e9-904f-4716-a1c0-81ccf5342a56",
"description": "Musterbeschreibung",
"id": "a1b8f0e9-904f-4716-a1c0-81ccf5342a56",
"name": "Musterartikel",
"unitPrice": {
"currency": "EUR",
"value": 100
}
}
],
"contractPeriod": 1,
"description": "Space-Server: \"Mein Space-Server\"",
"freeTrialDays": 10,
"groupByProjectId": "f0f86186-0a5a-45b2-aa33-502777496347",
"invoiceStop": "1985-10-26T01:21:00.000Z",
"invoicingPeriod": 1,
"isActivated": true,
"isBaseItem": true,
"isInFreeTrial": true,
"isInclusive": true,
"itemId": "f0f86186-0a5a-45b2-aa33-502777496347",
"nextPossibleDowngradeDate": "1985-10-26T01:21:00.000Z",
"nextPossibleTerminationDate": "1985-10-26T01:21:00.000Z",
"nextPossibleUpgradeDate": "1985-10-26T01:21:00.000Z",
"orderDate": "1985-10-26T01:21:00.000Z",
"orderId": "f0f86186-0a5a-45b2-aa33-502777496347",
"replacedByItem": "f0f86186-0a5a-45b2-aa33-502777496347",
"tariffChange": {
"isForced": true,
"newArticles": [
{
"amount": 1,
"articleTemplateId": "a1b8f0e9-904f-4716-a1c0-81ccf5342a56",
"description": "Musterbeschreibung",
"id": "a1b8f0e9-904f-4716-a1c0-81ccf5342a56",
"name": "Musterartikel",
"unitPrice": {
"currency": "EUR",
"value": 100
}
}
],
"scheduledAtDate": "1985-10-26T01:21:00.000Z",
"scheduledByUserId": "string",
"targetDate": "1985-10-26T01:21:00.000Z"
},
"termination": {
"cancellationForbidden": true,
"explanation": "Not needed anymore",
"reason": "Not needed anymore",
"scheduledAtDate": "1985-10-26T01:21:00.000Z",
"scheduledByUserId": "string",
"targetDate": "1985-10-26T01:21:00.000Z"
},
"totalPrice": {
"currency": "EUR",
"value": 100
}
},
"contractId": "f0f86186-0a5a-45b2-aa33-502777496347",
"contractNumber": "V1234567",
"customerId": "3a201faa-5160-47e0-a758-325ba794b543",
"termination": {
"cancellationForbidden": true,
"explanation": "Not needed anymore",
"reason": "Not needed anymore",
"scheduledAtDate": "1985-10-26T01:21:00.000Z",
"scheduledByUserId": "string",
"targetDate": "1985-10-26T01:21:00.000Z"
}
}
{
"properties": {
"additionalItems": {
"items": {
"properties": {
"activationDate": {
"format": "date-time",
"type": "string"
},
"aggregateReference": {
"properties": {
"aggregate": {
"example": "project",
"type": "string"
},
"domain": {
"example": "project",
"type": "string"
},
"id": {
"example": "a1b8f0e9-904f-4716-a1c0-81ccf5342a56",
"type": "string"
}
},
"required": [
"id",
"domain",
"aggregate"
],
"type": "object"
},
"articles": {
"items": {
"properties": {
"amount": {
"example": 1,
"minimum": 1,
"type": "integer"
},
"articleTemplateId": {
"example": "a1b8f0e9-904f-4716-a1c0-81ccf5342a56",
"type": "string"
},
"description": {
"example": "Musterbeschreibung",
"type": "string"
},
"id": {
"example": "a1b8f0e9-904f-4716-a1c0-81ccf5342a56",
"type": "string"
},
"name": {
"example": "Musterartikel",
"type": "string"
},
"unitPrice": {
"properties": {
"currency": {
"enum": [
"EUR"
],
"type": "string"
},
"value": {
"description": "The value of the price in the smallest currency unit (e.g. cents)",
"example": 100,
"type": "integer"
}
},
"required": [
"value",
"currency"
],
"type": "object"
}
},
"required": [
"id",
"name",
"articleTemplateId",
"amount",
"unitPrice"
],
"type": "object"
},
"type": "array"
},
"contractPeriod": {
"example": 1,
"minimum": 0,
"type": "number"
},
"description": {
"example": "Space-Server: \"Mein Space-Server\"",
"type": "string"
},
"freeTrialDays": {
"example": 10,
"type": "number"
},
"groupByProjectId": {
"format": "uuid",
"type": "string"
},
"invoiceStop": {
"description": "If this attribute is set, the contract item will currently only be invoiced until this date.",
"format": "date-time",
"type": "string"
},
"invoicingPeriod": {
"example": 1,
"type": "number"
},
"isActivated": {
"type": "boolean"
},
"isBaseItem": {
"type": "boolean"
},
"isInFreeTrial": {
"type": "boolean"
},
"isInclusive": {
"type": "boolean"
},
"itemId": {
"format": "uuid",
"type": "string"
},
"nextPossibleDowngradeDate": {
"description": "If this attribute is not set, termination is not allowed.",
"format": "date-time",
"type": "string"
},
"nextPossibleTerminationDate": {
"description": "If this attribute is not set, a tariff change is not allowed.",
"format": "date-time",
"type": "string"
},
"nextPossibleUpgradeDate": {
"description": "If this attribute is not set, a tariff change is not allowed.",
"format": "date-time",
"type": "string"
},
"orderDate": {
"format": "date-time",
"type": "string"
},
"orderId": {
"format": "uuid",
"type": "string"
},
"replacedByItem": {
"format": "uuid",
"type": "string"
},
"tariffChange": {
"properties": {
"isForced": {
"type": "boolean"
},
"newArticles": {
"items": {
"properties": {
"amount": {
"example": 1,
"minimum": 1,
"type": "integer"
},
"articleTemplateId": {
"example": "a1b8f0e9-904f-4716-a1c0-81ccf5342a56",
"type": "string"
},
"description": {
"example": "Musterbeschreibung",
"type": "string"
},
"id": {
"example": "a1b8f0e9-904f-4716-a1c0-81ccf5342a56",
"type": "string"
},
"name": {
"example": "Musterartikel",
"type": "string"
},
"unitPrice": {
"properties": {
"currency": {
"enum": [
"EUR"
],
"type": "string"
},
"value": {
"description": "The value of the price in the smallest currency unit (e.g. cents)",
"example": 100,
"type": "integer"
}
},
"required": [
"value",
"currency"
],
"type": "object"
}
},
"required": [
"id",
"name",
"articleTemplateId",
"amount",
"unitPrice"
],
"type": "object"
},
"type": "array"
},
"scheduledAtDate": {
"format": "date-time",
"type": "string"
},
"scheduledByUserId": {
"type": "string"
},
"targetDate": {
"format": "date-time",
"type": "string"
}
},
"required": [
"scheduledAtDate",
"targetDate",
"newArticles"
],
"type": "object"
},
"termination": {
"properties": {
"cancellationForbidden": {
"description": "Indicates whether the User is allowed to cancel the Termination.",
"type": "boolean"
},
"explanation": {
"example": "Not needed anymore",
"type": "string"
},
"reason": {
"example": "Not needed anymore",
"type": "string"
},
"scheduledAtDate": {
"format": "date-time",
"type": "string"
},
"scheduledByUserId": {
"type": "string"
},
"targetDate": {
"format": "date-time",
"type": "string"
}
},
"required": [
"scheduledAtDate",
"targetDate"
],
"type": "object"
},
"totalPrice": {
"properties": {
"currency": {
"enum": [
"EUR"
],
"type": "string"
},
"value": {
"description": "The value of the price in the smallest currency unit (e.g. cents)",
"example": 100,
"type": "integer"
}
},
"required": [
"value",
"currency"
],
"type": "object"
}
},
"required": [
"itemId",
"isActivated",
"contractPeriod",
"articles",
"totalPrice",
"description",
"isBaseItem"
],
"type": "object"
},
"type": "array"
},
"baseItem": {
"properties": {
"activationDate": {
"format": "date-time",
"type": "string"
},
"aggregateReference": {
"properties": {
"aggregate": {
"example": "project",
"type": "string"
},
"domain": {
"example": "project",
"type": "string"
},
"id": {
"example": "a1b8f0e9-904f-4716-a1c0-81ccf5342a56",
"type": "string"
}
},
"required": [
"id",
"domain",
"aggregate"
],
"type": "object"
},
"articles": {
"items": {
"properties": {
"amount": {
"example": 1,
"minimum": 1,
"type": "integer"
},
"articleTemplateId": {
"example": "a1b8f0e9-904f-4716-a1c0-81ccf5342a56",
"type": "string"
},
"description": {
"example": "Musterbeschreibung",
"type": "string"
},
"id": {
"example": "a1b8f0e9-904f-4716-a1c0-81ccf5342a56",
"type": "string"
},
"name": {
"example": "Musterartikel",
"type": "string"
},
"unitPrice": {
"properties": {
"currency": {
"enum": [
"EUR"
],
"type": "string"
},
"value": {
"description": "The value of the price in the smallest currency unit (e.g. cents)",
"example": 100,
"type": "integer"
}
},
"required": [
"value",
"currency"
],
"type": "object"
}
},
"required": [
"id",
"name",
"articleTemplateId",
"amount",
"unitPrice"
],
"type": "object"
},
"type": "array"
},
"contractPeriod": {
"example": 1,
"minimum": 0,
"type": "number"
},
"description": {
"example": "Space-Server: \"Mein Space-Server\"",
"type": "string"
},
"freeTrialDays": {
"example": 10,
"type": "number"
},
"groupByProjectId": {
"format": "uuid",
"type": "string"
},
"invoiceStop": {
"description": "If this attribute is set, the contract item will currently only be invoiced until this date.",
"format": "date-time",
"type": "string"
},
"invoicingPeriod": {
"example": 1,
"type": "number"
},
"isActivated": {
"type": "boolean"
},
"isBaseItem": {
"type": "boolean"
},
"isInFreeTrial": {
"type": "boolean"
},
"isInclusive": {
"type": "boolean"
},
"itemId": {
"format": "uuid",
"type": "string"
},
"nextPossibleDowngradeDate": {
"description": "If this attribute is not set, termination is not allowed.",
"format": "date-time",
"type": "string"
},
"nextPossibleTerminationDate": {
"description": "If this attribute is not set, a tariff change is not allowed.",
"format": "date-time",
"type": "string"
},
"nextPossibleUpgradeDate": {
"description": "If this attribute is not set, a tariff change is not allowed.",
"format": "date-time",
"type": "string"
},
"orderDate": {
"format": "date-time",
"type": "string"
},
"orderId": {
"format": "uuid",
"type": "string"
},
"replacedByItem": {
"format": "uuid",
"type": "string"
},
"tariffChange": {
"properties": {
"isForced": {
"type": "boolean"
},
"newArticles": {
"items": {
"properties": {
"amount": {
"example": 1,
"minimum": 1,
"type": "integer"
},
"articleTemplateId": {
"example": "a1b8f0e9-904f-4716-a1c0-81ccf5342a56",
"type": "string"
},
"description": {
"example": "Musterbeschreibung",
"type": "string"
},
"id": {
"example": "a1b8f0e9-904f-4716-a1c0-81ccf5342a56",
"type": "string"
},
"name": {
"example": "Musterartikel",
"type": "string"
},
"unitPrice": {
"properties": {
"currency": {
"enum": [
"EUR"
],
"type": "string"
},
"value": {
"description": "The value of the price in the smallest currency unit (e.g. cents)",
"example": 100,
"type": "integer"
}
},
"required": [
"value",
"currency"
],
"type": "object"
}
},
"required": [
"id",
"name",
"articleTemplateId",
"amount",
"unitPrice"
],
"type": "object"
},
"type": "array"
},
"scheduledAtDate": {
"format": "date-time",
"type": "string"
},
"scheduledByUserId": {
"type": "string"
},
"targetDate": {
"format": "date-time",
"type": "string"
}
},
"required": [
"scheduledAtDate",
"targetDate",
"newArticles"
],
"type": "object"
},
"termination": {
"properties": {
"cancellationForbidden": {
"description": "Indicates whether the User is allowed to cancel the Termination.",
"type": "boolean"
},
"explanation": {
"example": "Not needed anymore",
"type": "string"
},
"reason": {
"example": "Not needed anymore",
"type": "string"
},
"scheduledAtDate": {
"format": "date-time",
"type": "string"
},
"scheduledByUserId": {
"type": "string"
},
"targetDate": {
"format": "date-time",
"type": "string"
}
},
"required": [
"scheduledAtDate",
"targetDate"
],
"type": "object"
},
"totalPrice": {
"properties": {
"currency": {
"enum": [
"EUR"
],
"type": "string"
},
"value": {
"description": "The value of the price in the smallest currency unit (e.g. cents)",
"example": 100,
"type": "integer"
}
},
"required": [
"value",
"currency"
],
"type": "object"
}
},
"required": [
"itemId",
"isActivated",
"contractPeriod",
"articles",
"totalPrice",
"description",
"isBaseItem"
],
"type": "object"
},
"contractId": {
"format": "uuid",
"type": "string"
},
"contractNumber": {
"example": "V1234567",
"type": "string"
},
"customerId": {
"example": "3a201faa-5160-47e0-a758-325ba794b543",
"type": "string"
},
"termination": {
"properties": {
"cancellationForbidden": {
"description": "Indicates whether the User is allowed to cancel the Termination.",
"type": "boolean"
},
"explanation": {
"example": "Not needed anymore",
"type": "string"
},
"reason": {
"example": "Not needed anymore",
"type": "string"
},
"scheduledAtDate": {
"format": "date-time",
"type": "string"
},
"scheduledByUserId": {
"type": "string"
},
"targetDate": {
"format": "date-time",
"type": "string"
}
},
"required": [
"scheduledAtDate",
"targetDate"
],
"type": "object"
}
},
"required": [
"contractId",
"contractNumber",
"customerId",
"baseItem"
],
"type": "object"
}

Usage examples​

$ curl \
--fail \
--location \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/mail-addresses/f0f86186-0a5a-45b2-aa33-502777496347/contract
import { MittwaldAPIV2Client } from "@mittwald/api-client";
import { assertStatus } from "@mittwald/api-client-commons";

const client = MittwaldAPIClient.newWithToken(process.env.MITTWALD_API_TOKEN);
const response = await client.contract.getDetailOfContractByMailAddress({
"mailAddressId": "f0f86186-0a5a-45b2-aa33-502777496347"
});

assertStatus(response, 200);

use \Mittwald\ApiClient\Generated\V2\Clients\Contract\GetDetailOfContractByMailAddress\GetDetailOfContractByMailAddressRequest;

$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));

$request = (new GetDetailOfContractByMailAddressRequest(
mailAddressId: "f0f86186-0a5a-45b2-aa33-502777496347"
));
$response = $client->contract()->getDetailOfContractByMailAddress($request);

var_dump($response->getBody();

On this page