Zum Hauptinhalt springen

List ContractPartners of the contributor

GET/v2/contributors/{contributorId}/contract-partners
API-Version
v2
Request-Methode
GET
Operation-ID
contributor-list-contract-partners-of-contributor

Request​

  • contributorIdstringrequired

Responses​

Response-Header
  • X-Pagination-Limitinteger

    The limit used to select the resources for the response

  • X-Pagination-Skipinteger

    The number of skipped items

  • X-Pagination-Pagenumber

    The calculate page of the list response. Refer to parameters to learn more.

  • X-Pagination-TotalCountinteger

    The total amount of items available in the remote ressource. Use this value in combination with the limit to calculate the available pages.

Format
application/json
Beschreibung

A list of contract partners.

  • Array[
    • *object
      • contractPartnerrequired
        • addressobjectrequired
          • streetstringrequired
          • houseNumberstringrequired
          • citystringrequired
          • zipstringrequired
          • countryCodestringrequired

            ISO 3166-1 alpha-2 country code

          • addressPrefixstring
        • companystring
        • emailstringrequired
        • firstNamestringrequired
        • lastNamestringrequired
      • createdAtstring (date-time)required
      • extensionIdstring (uuid)required
      • extensionInstanceIdstring (uuid)required
      • parentCustomerIdstringrequired
    ]
Content-Type: application/json

[
{
"contractPartner": {
"address": {
"street": "Königsberger Straße",
"houseNumber": "4-6",
"city": "Espelkamp",
"zip": "32339",
"countryCode": "DE",
"addressPrefix": "c/o Ada Lovelace"
},
"company": "mittwald",
"email": "a.lovelace@example.com",
"firstName": "Ada",
"lastName": "Lovelace"
},
"createdAt": "1985-10-26T01:21:00.000Z",
"extensionId": "f0f86186-0a5a-45b2-aa33-502777496347",
"extensionInstanceId": "f0f86186-0a5a-45b2-aa33-502777496347",
"parentCustomerId": "string"
}
]
{
"items": {
"properties": {
"contractPartner": {
"properties": {
"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"
]
},
"company": {
"example": "mittwald",
"type": "string"
},
"email": {
"example": "a.lovelace@example.com",
"type": "string"
},
"firstName": {
"example": "Ada",
"type": "string"
},
"lastName": {
"example": "Lovelace",
"type": "string"
}
},
"required": [
"firstName",
"lastName",
"email",
"address"
]
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"extensionId": {
"format": "uuid",
"type": "string"
},
"extensionInstanceId": {
"format": "uuid",
"type": "string"
},
"parentCustomerId": {
"type": "string"
}
},
"required": [
"extensionInstanceId",
"extensionId",
"createdAt",
"parentCustomerId",
"contractPartner"
],
"type": "object"
},
"type": "array"
}

Nutzungsbeispiele​

$ curl \
--fail \
--location \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/contributors/string/contract-partners?extensionId=f0f86186-0a5a-45b2-aa33-502777496347&extensionInstanceId=f0f86186-0a5a-45b2-aa33-502777496347&limit=50&page=1&sort=createdAt&order=asc
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.contributorListContractPartnersOfContributor({
"contributorId": "string",
"queryParameters": {
"extensionId": "f0f86186-0a5a-45b2-aa33-502777496347",
"extensionInstanceId": "f0f86186-0a5a-45b2-aa33-502777496347",
"limit": 50,
"page": 1,
"sort": [
"createdAt"
],
"order": [
"asc"
]
}
});

assertStatus(response, 200);

use \Mittwald\ApiClient\Generated\V2\Clients\Marketplace\ContributorListContractPartnersOfContributor\ContributorListContractPartnersOfContributorRequest;

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

$request = (new ContributorListContractPartnersOfContributorRequest(
contributorId: "string"
))
->withExtensionId("f0f86186-0a5a-45b2-aa33-502777496347")
->withExtensionInstanceId("f0f86186-0a5a-45b2-aa33-502777496347")
->withLimit(50)
->withPage(1)
->withSort(["createdAt"])
->withOrder(["asc"]);
$response = $client->marketplace()->contributorListContractPartnersOfContributor($request);

var_dump($response->getBody();

Auf dieser Seite