Zum Hauptinhalt springen

Get an Article

GET/v2/articles/{articleId}
API-Version
v2
Request-Methode
GET
Operation-ID
article-get-article

Request​

  • articleIdstringrequired
    Beispiel:"WH25-0007"

Responses​

Format
application/json
Beschreibung

The Article object

  • addonsArray von object
    • Array[
      • *object
        • hiddenboolean

          Defines if the Addon should not be shown.

        • keystring (≥ 1 Zeichen)required

          Unique key of the Addon.

        • typestring

          The type/category of the addon.

        • valuestringrequired

          Value of the Addon, e.g. configuration details, status, or modifier properties.

        • valueMergeTypestring (einer von: add, set)

          Used if Articles are ordered as a batch.

      ]
  • articleIdstring (≥ 3 Zeichen)required
  • attributesArray von object
    • Array[
      • *object
        • customerEditableboolean

          Used if there are custom configurations needed for an Order like a Server name.

        • keystring (≥ 1 Zeichen)required
        • mergeTypestring (einer von: add, set)

          Used if Articles are ordered as a batch.

        • readonlyboolean

          Used if not need for an Order.

        • requiredboolean
        • unitstring

          Used if Articles are ordered as a batch.

        • valuestring

          Will be ignored if customerEditable is set.

      ]
  • balanceAddonKeystringdeprecated
  • contractDurationInMonthnumber (≥ 0)required
  • descriptionstring
  • forcedInvoicingPeriodInMonthnumber (≥ 0)

    If set, the Article will always be invoiced for the given months.

  • hasIndependentContractPeriodboolean

    Article has a contract period which is not dependent on the Contract Base Item.

  • hideOnInvoiceboolean

    Free Article that is not showing on Invoices.

  • machineTypeobject

    Resources for hosting Articles.

    • cpustringrequired
    • memorystringrequired

      Memory in GiB

    • namestringrequired
  • modifierArticlesArray von object
    • Array[
      • *object
        • articleIdstring (≥ 1 Zeichen)required
        • infoobject
          • articleNamestring
          • articleTemplateNamestring
          • fromArticleTemplateboolean
        • maxArticleCountnumber (≥ 1)required
      ]
  • namestring (≥ 3 Zeichen)required
  • orderablestring (einer von: full, forbidden, internal, beta_testing, deprecated)required

    Only Articles with the value 'full' can be ordered by everyone. Forbidden Articles are not allowed to be ordered. Internal Articles have to be ordered by a mittwald employee. Beta testing Articles can be ordered but maybe feature incomplete. Deprecated Articles are not orderable anymore.

  • possibleArticleChangesArray von object
    • Array[
      • *object
        • articleIdstring (≥ 1 Zeichen)required
        • infoobject
          • articleNamestring
          • articleTemplateNamestring
          • fromArticleTemplateboolean
      ]
  • pricenumber

    Monthly price in Eurocent

  • tagsArray von object
    • Array[
      • *object
        • descriptionstring (≥ 1 Zeichen)
        • hexColorstring (≥ 1 Zeichen)
        • idstring (≥ 1 Zeichen)required
        • namestring (≥ 1 Zeichen)
      ]
  • templateobjectrequired
    • additionalArticlesArray von object
      • Array[
        • *object
          • articleIdstring (≥ 1 Zeichen)required
          • infoobject
            • articleNamestring
            • articleTemplateNamestring
            • fromArticleTemplateboolean
          • maxArticleCountnumber
        ]
    • addonsArray von object
      • Array[
        • *object
          • hiddenboolean

            Defines if the Addon should not be shown.

          • keystring (≥ 1 Zeichen)required

            Unique key of the Addon.

          • typestring

            The type/category of the addon.

          • valuestringrequired

            Value of the Addon, e.g. configuration details, status, or modifier properties.

          • valueMergeTypestring (einer von: add, set)

            Used if Articles are ordered as a batch.

        ]
    • attributesArray von object
      • Array[
        • *object
          • customerEditableboolean

            Used if there are custom configurations needed for an Order like a Server name.

          • keystring (≥ 1 Zeichen)required
          • mergeTypestring (einer von: add, set)

            Used if Articles are ordered as a batch.

          • readonlyboolean

            Used if not need for an Order.

          • requiredboolean
          • unitstring

            Used if Articles are ordered as a batch.

          • valuestring

            Will be ignored if customerEditable is set.

        ]
    • descriptionstring
    • idstring (≥ 1 Zeichen)required
    • isManagedByDomainbooleanrequired
    • isRecurringbooleanrequired
    • modifierArticlesArray von object
      • Array[
        • *object
          • articleIdstring (≥ 1 Zeichen)required
          • infoobject
            • articleNamestring
            • articleTemplateNamestring
            • fromArticleTemplateboolean
          • maxArticleCountnumber (≥ 1)required
        ]
    • namestring (≥ 3 Zeichen)required
    • typestring (einer von: miscellaneous, base, additional, modifier, setup_fee)required
Content-Type: application/json

{
"addons": [
{
"hidden": true,
"key": "Varnish",
"type": "config",
"value": "noway",
"valueMergeType": "add"
}
],
"articleId": "WH25-0007",
"attributes": [
{
"customerEditable": true,
"key": "cpu",
"mergeType": "add",
"readonly": true,
"required": true,
"unit": "GHz",
"value": "4"
}
],
"contractDurationInMonth": 123,
"description": "Configure your perfect hosting",
"forcedInvoicingPeriodInMonth": 123,
"hasIndependentContractPeriod": true,
"hideOnInvoice": true,
"machineType": {
"cpu": "1",
"memory": "10",
"name": "psplus-shared"
},
"modifierArticles": [
{
"articleId": "string",
"info": {
"articleName": "Webhosting Speicherplatz",
"articleTemplateName": "Speicher für Hosting aller Art",
"fromArticleTemplate": true
},
"maxArticleCount": 123
}
],
"name": "Webhosting",
"orderable": "full",
"possibleArticleChanges": [
{
"articleId": "string",
"info": {
"articleName": "Webhosting",
"articleTemplateName": "Webhosting",
"fromArticleTemplate": true
}
}
],
"price": 1300,
"tags": [
{
"description": "CPU optimized",
"hexColor": "#ff0000",
"id": "58e39bbe-fcd1-4fde-887c-f49ff85b9df5",
"name": "cpu-optimized"
}
],
"template": {
"additionalArticles": [
{
"articleId": "WH25-0007",
"info": {
"articleName": "Webhosting",
"articleTemplateName": "Webhosting",
"fromArticleTemplate": true
},
"maxArticleCount": 10
}
],
"addons": [
{
"hidden": true,
"key": "Varnish",
"type": "config",
"value": "noway",
"valueMergeType": "add"
}
],
"attributes": [
{
"customerEditable": true,
"key": "cpu",
"mergeType": "add",
"readonly": true,
"required": true,
"unit": "GHz",
"value": "4"
}
],
"description": "Space-Storage",
"id": "054e27e4-d3ed-4ffc-a472-fbb74a6a2ec1",
"isManagedByDomain": true,
"isRecurring": true,
"modifierArticles": [
{
"articleId": "string",
"info": {
"articleName": "Webhosting Speicherplatz",
"articleTemplateName": "Speicher für Hosting aller Art",
"fromArticleTemplate": true
},
"maxArticleCount": 123
}
],
"name": "Speicher für Hosting aller Art",
"type": "miscellaneous"
}
}
{
"properties": {
"addons": {
"items": {
"properties": {
"hidden": {
"description": "Defines if the Addon should not be shown.",
"type": "boolean"
},
"key": {
"description": "Unique key of the Addon.",
"example": "Varnish",
"minLength": 1,
"type": "string"
},
"type": {
"description": "The type/category of the addon.",
"example": "config",
"type": "string"
},
"value": {
"description": "Value of the Addon, e.g. configuration details, status, or modifier properties.",
"example": "noway",
"type": "string"
},
"valueMergeType": {
"description": "Used if Articles are ordered as a batch.",
"enum": [
"add",
"set"
],
"type": "string"
}
},
"required": [
"key",
"value"
],
"type": "object"
},
"type": "array"
},
"articleId": {
"example": "WH25-0007",
"minLength": 3,
"type": "string"
},
"attributes": {
"items": {
"properties": {
"customerEditable": {
"description": "Used if there are custom configurations needed for an Order like a Server name.",
"type": "boolean"
},
"key": {
"example": "cpu",
"minLength": 1,
"type": "string"
},
"mergeType": {
"description": "Used if Articles are ordered as a batch.",
"enum": [
"add",
"set"
],
"type": "string"
},
"readonly": {
"description": "Used if not need for an Order.",
"type": "boolean"
},
"required": {
"type": "boolean"
},
"unit": {
"description": "Used if Articles are ordered as a batch.",
"example": "GHz",
"type": "string"
},
"value": {
"description": "Will be ignored if customerEditable is set.",
"example": "4",
"type": "string"
}
},
"required": [
"key"
],
"type": "object"
},
"type": "array"
},
"balanceAddonKey": {
"deprecated": true,
"example": "inclusive_domains",
"type": "string"
},
"contractDurationInMonth": {
"example": 0,
"maximum": 42,
"minimum": 0,
"type": "number"
},
"description": {
"example": "Configure your perfect hosting",
"type": "string"
},
"forcedInvoicingPeriodInMonth": {
"description": "If set, the Article will always be invoiced for the given months.",
"example": 0,
"minimum": 0,
"type": "number"
},
"hasIndependentContractPeriod": {
"description": "Article has a contract period which is not dependent on the Contract Base Item.",
"type": "boolean"
},
"hideOnInvoice": {
"description": "Free Article that is not showing on Invoices.",
"type": "boolean"
},
"machineType": {
"description": "Resources for hosting Articles.",
"properties": {
"cpu": {
"example": "1",
"type": "string"
},
"memory": {
"description": "Memory in GiB",
"example": "10",
"type": "string"
},
"name": {
"example": "psplus-shared",
"type": "string"
}
},
"required": [
"name",
"cpu",
"memory"
],
"type": "object"
},
"modifierArticles": {
"items": {
"properties": {
"articleId": {
"minLength": 1,
"type": "string"
},
"info": {
"properties": {
"articleName": {
"example": "Webhosting Speicherplatz",
"type": "string"
},
"articleTemplateName": {
"example": "Speicher für Hosting aller Art",
"type": "string"
},
"fromArticleTemplate": {
"type": "boolean"
}
},
"type": "object"
},
"maxArticleCount": {
"minimum": 1,
"type": "number"
}
},
"required": [
"articleId",
"maxArticleCount"
],
"type": "object"
},
"type": "array"
},
"name": {
"example": "Webhosting",
"minLength": 3,
"type": "string"
},
"orderable": {
"description": "Only Articles with the value 'full' can be ordered by everyone. Forbidden Articles are not allowed to be ordered. Internal Articles have to be ordered by a mittwald employee. Beta testing Articles can be ordered but maybe feature incomplete. Deprecated Articles are not orderable anymore.",
"enum": [
"full",
"forbidden",
"internal",
"beta_testing",
"deprecated"
],
"type": "string"
},
"possibleArticleChanges": {
"items": {
"properties": {
"articleId": {
"minLength": 1,
"type": "string"
},
"info": {
"properties": {
"articleName": {
"example": "Webhosting",
"type": "string"
},
"articleTemplateName": {
"example": "Webhosting",
"type": "string"
},
"fromArticleTemplate": {
"type": "boolean"
}
},
"type": "object"
}
},
"required": [
"articleId"
],
"type": "object"
},
"type": "array"
},
"price": {
"description": "Monthly price in Eurocent",
"example": 1300,
"type": "number"
},
"tags": {
"items": {
"properties": {
"description": {
"example": "CPU optimized",
"minLength": 1,
"type": "string"
},
"hexColor": {
"example": "#ff0000",
"minLength": 1,
"type": "string"
},
"id": {
"example": "58e39bbe-fcd1-4fde-887c-f49ff85b9df5",
"minLength": 1,
"type": "string"
},
"name": {
"example": "cpu-optimized",
"minLength": 1,
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
},
"type": "array"
},
"template": {
"properties": {
"additionalArticles": {
"items": {
"properties": {
"articleId": {
"example": "WH25-0007",
"minLength": 1,
"type": "string"
},
"info": {
"properties": {
"articleName": {
"example": "Webhosting",
"type": "string"
},
"articleTemplateName": {
"example": "Webhosting",
"type": "string"
},
"fromArticleTemplate": {
"type": "boolean"
}
},
"type": "object"
},
"maxArticleCount": {
"example": 10,
"type": "number"
}
},
"required": [
"articleId"
],
"type": "object"
},
"type": "array"
},
"addons": {
"items": {
"properties": {
"hidden": {
"description": "Defines if the Addon should not be shown.",
"type": "boolean"
},
"key": {
"description": "Unique key of the Addon.",
"example": "Varnish",
"minLength": 1,
"type": "string"
},
"type": {
"description": "The type/category of the addon.",
"example": "config",
"type": "string"
},
"value": {
"description": "Value of the Addon, e.g. configuration details, status, or modifier properties.",
"example": "noway",
"type": "string"
},
"valueMergeType": {
"description": "Used if Articles are ordered as a batch.",
"enum": [
"add",
"set"
],
"type": "string"
}
},
"required": [
"key",
"value"
],
"type": "object"
},
"type": "array"
},
"attributes": {
"items": {
"properties": {
"customerEditable": {
"description": "Used if there are custom configurations needed for an Order like a Server name.",
"type": "boolean"
},
"key": {
"example": "cpu",
"minLength": 1,
"type": "string"
},
"mergeType": {
"description": "Used if Articles are ordered as a batch.",
"enum": [
"add",
"set"
],
"type": "string"
},
"readonly": {
"description": "Used if not need for an Order.",
"type": "boolean"
},
"required": {
"type": "boolean"
},
"unit": {
"description": "Used if Articles are ordered as a batch.",
"example": "GHz",
"type": "string"
},
"value": {
"description": "Will be ignored if customerEditable is set.",
"example": "4",
"type": "string"
}
},
"required": [
"key"
],
"type": "object"
},
"type": "array"
},
"description": {
"example": "Space-Storage",
"type": "string"
},
"id": {
"example": "054e27e4-d3ed-4ffc-a472-fbb74a6a2ec1",
"minLength": 1,
"type": "string"
},
"isManagedByDomain": {
"type": "boolean"
},
"isRecurring": {
"type": "boolean"
},
"modifierArticles": {
"items": {
"properties": {
"articleId": {
"minLength": 1,
"type": "string"
},
"info": {
"properties": {
"articleName": {
"example": "Webhosting Speicherplatz",
"type": "string"
},
"articleTemplateName": {
"example": "Speicher für Hosting aller Art",
"type": "string"
},
"fromArticleTemplate": {
"type": "boolean"
}
},
"type": "object"
},
"maxArticleCount": {
"minimum": 1,
"type": "number"
}
},
"required": [
"articleId",
"maxArticleCount"
],
"type": "object"
},
"type": "array"
},
"name": {
"example": "Speicher für Hosting aller Art",
"minLength": 3,
"type": "string"
},
"type": {
"enum": [
"miscellaneous",
"base",
"additional",
"modifier",
"setup_fee"
],
"type": "string"
}
},
"required": [
"id",
"name",
"isRecurring",
"type",
"isManagedByDomain"
],
"type": "object"
}
},
"required": [
"articleId",
"name",
"contractDurationInMonth",
"orderable",
"template"
],
"type": "object"
}

Nutzungsbeispiele​

$ curl \
--fail \
--location \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/articles/string?customerId=string
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.article.getArticle({
"articleId": "string",
"queryParameters": {
"customerId": "string"
}
});

assertStatus(response, 200);

use \Mittwald\ApiClient\Generated\V2\Clients\Article\GetArticle\GetArticleRequest;

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

$request = (new GetArticleRequest(
articleId: "string"
))
->withCustomerId("string");
$response = $client->article()->getArticle($request);

var_dump($response->getBody();

Auf dieser Seite