Zum Hauptinhalt springen

Patch contributor

PATCH/v2/contributors/{contributorId}
API-Version
v2
Request-Methode
PATCH
Operation-ID
contributor-patch-contributor

Request​

  • contributorIdstringrequired

Responses​

Format
application/json
Beschreibung

Contributor has been patched.

  • contactPersonUserIdstring (uuid)required
  • contractOwnerobjectrequired
    • contactobjectrequired
      • firstNamestring
      • lastNamestring
      • titlestring
      • salutationstring (einer von: mr, ms, other)required
      • companystring
      • addressobjectrequired
        • streetstringrequired
        • houseNumberstringrequired
        • citystringrequired
        • zipstringrequired
        • countryCodestringrequired

          ISO 3166-1 alpha-2 country code

        • addressPrefixstring
      • emailAddressstring (email)
      • phoneNumbersArray von string
        • Array[
          • *string
          ]
      • useFormalTermboolean
    • inheritedbooleanrequired
  • contributorNumberstringrequired
  • customerIdstringrequired
  • descriptionstring
  • descriptionsobject

    A few words about the introduction as a contributor

    • destringrequired
    • enstring
  • emailstring (email)deprecatedrequired
  • homepagestring (uri)
  • idstringrequired
  • imprinteine von 2 Alternativen
    • Alternativeobject
      • textstring (≥ 1 Zeichen)required
    • Alternativeobject
      • urlstring (≥ 1 Zeichen, uri)required
  • logoInheritedboolean
  • logoRefIdstring (uuid)
  • namestringrequired
  • nameInheritedbooleanrequired
  • phonestringdeprecated
  • statestring (einer von: enabled, disabled)deprecatedrequired
  • supportInformationrequired
  • urlstringdeprecated
  • verificationRequestedbooleanrequired
  • verifiedbooleanrequired
Content-Type: application/json

{
"contactPersonUserId": "f0f86186-0a5a-45b2-aa33-502777496347",
"contractOwner": {
"contact": {
"firstName": "string",
"lastName": "string",
"title": "string",
"salutation": "mr",
"company": "string",
"address": {
"street": "Königsberger Straße",
"houseNumber": "4-6",
"city": "Espelkamp",
"zip": "32339",
"countryCode": "DE",
"addressPrefix": "c/o Ada Lovelace"
},
"emailAddress": "email@mittwald.example",
"phoneNumbers": [
"string"
],
"useFormalTerm": true
},
"inherited": true
},
"contributorNumber": "string",
"customerId": "string",
"description": "string",
"descriptions": {
"de": "Ich bin ein Contributor",
"en": "I am a contributor"
},
"homepage": "string",
"id": "string",
"imprint": {
"text": "string"
},
"logoInherited": true,
"logoRefId": "f0f86186-0a5a-45b2-aa33-502777496347",
"name": "string",
"nameInherited": true,
"supportInformation": null,
"verificationRequested": true,
"verified": true
}
{
"properties": {
"contactPersonUserId": {
"format": "uuid",
"type": "string"
},
"contractOwner": {
"properties": {
"contact": {
"type": "object",
"properties": {
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"title": {
"type": "string"
},
"salutation": {
"type": "string",
"enum": [
"mr",
"ms",
"other"
]
},
"company": {
"type": "string"
},
"address": {
"type": "object",
"properties": {
"street": {
"type": "string",
"example": "Königsberger Straße"
},
"houseNumber": {
"type": "string",
"example": "4-6"
},
"city": {
"type": "string",
"example": "Espelkamp"
},
"zip": {
"type": "string",
"example": "32339"
},
"countryCode": {
"type": "string",
"example": "DE",
"description": "ISO 3166-1 alpha-2 country code"
},
"addressPrefix": {
"type": "string",
"example": "c/o Ada Lovelace"
}
},
"required": [
"street",
"houseNumber",
"city",
"zip",
"countryCode"
]
},
"emailAddress": {
"type": "string",
"format": "email"
},
"phoneNumbers": {
"type": "array",
"items": {
"type": "string"
}
},
"useFormalTerm": {
"type": "boolean"
}
},
"required": [
"address",
"salutation"
]
},
"inherited": {
"type": "boolean"
}
},
"required": [
"contact",
"inherited"
],
"type": "object"
},
"contributorNumber": {
"type": "string"
},
"customerId": {
"type": "string"
},
"description": {
"type": "string"
},
"descriptions": {
"description": "A few words about the introduction as a contributor",
"properties": {
"de": {
"example": "Ich bin ein Contributor",
"type": "string"
},
"en": {
"example": "I am a contributor",
"type": "string"
}
},
"required": [
"de"
],
"type": "object"
},
"email": {
"deprecated": true,
"format": "email",
"type": "string"
},
"homepage": {
"format": "uri",
"type": "string"
},
"id": {
"type": "string"
},
"imprint": {
"oneOf": [
{
"properties": {
"text": {
"minLength": 1,
"type": "string"
}
},
"required": [
"text"
],
"type": "object"
},
{
"properties": {
"url": {
"format": "uri",
"minLength": 1,
"type": "string"
}
},
"required": [
"url"
],
"type": "object"
}
]
},
"logoInherited": {
"type": "boolean"
},
"logoRefId": {
"format": "uuid",
"type": "string"
},
"name": {
"type": "string"
},
"nameInherited": {
"type": "boolean"
},
"phone": {
"deprecated": true,
"type": "string"
},
"state": {
"deprecated": true,
"enum": [
"enabled",
"disabled"
],
"type": "string"
},
"supportInformation": {
"allOf": [
{
"properties": {
"email": {
"example": "a.lovelace@example.com",
"format": "email",
"type": "string"
},
"phone": {
"type": "string"
}
},
"required": [
"email"
],
"type": "object"
},
{
"properties": {
"inherited": {
"description": "Whether the support information is inherited from the customer.",
"type": "boolean"
}
},
"required": [
"inherited"
],
"type": "object"
}
]
},
"url": {
"deprecated": true,
"type": "string"
},
"verificationRequested": {
"type": "boolean"
},
"verified": {
"type": "boolean"
}
},
"required": [
"id",
"customerId",
"state",
"verified",
"verificationRequested",
"name",
"nameInherited",
"supportInformation",
"email",
"contactPersonUserId",
"contractOwner",
"contributorNumber"
],
"type": "object"
}

Nutzungsbeispiele​

$ curl \
--fail \
--location \
-X PATCH \
-d '{"contactPersonUserId":"string","descriptions":null,"deviatingContractOwner":null,"deviatingName":"string","deviatingSupportInformation":null,"homepage":"string","imprint":{"text":"string"}}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/contributors/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.marketplace.contributorPatchContributor({
"contributorId": "string",
"data": {
"contactPersonUserId": "string",
"descriptions": null,
"deviatingContractOwner": null,
"deviatingName": "string",
"deviatingSupportInformation": null,
"homepage": "string",
"imprint": {
"text": "string"
}
}
});

assertStatus(response, 200);

use \Mittwald\ApiClient\Generated\V2\Clients\Marketplace\ContributorPatchContributor\ContributorPatchContributorRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\Marketplace\ContributorPatchContributor\ContributorPatchContributorRequestBody;

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

// TODO: Please consult the properties and constructor signature of
// ContributorPatchContributorRequestBody to learn how to construct a valid instance
$body = new ContributorPatchContributorRequestBody(/* TODO: ... */);

$request = (new ContributorPatchContributorRequest(
contributorId: "string",
body: $body
));
$response = $client->marketplace()->contributorPatchContributor($request);

var_dump($response->getBody();

Auf dieser Seite