Zum Hauptinhalt springen

Get a customer profile

GET/v2/customers/{customerId}
API-Version
v2
Request-Methode
GET
Operation-ID
customer-get-customer

Request​

  • customerIdstringrequired

    The uuid of the customer to be returned

Responses​

Format
application/json
Beschreibung

The customer object

  • activeSuspensionobject
    • createdAtstring (date-time)required
  • avatarRefIdstring
  • categoryIdstring
  • creationDatestring (date-time)required
  • customerIdstringrequired
  • customerNumberstringrequired
  • deletionProhibitedByArray von string (einer von: hasOpenInvoices, hasActiveContracts, hasActiveExtensionSubscriptions, isActiveContributor, hasOrdersInProgress)
    • Array[
      • *string (einer von: hasOpenInvoices, hasActiveContracts, hasActiveExtensionSubscriptions, isActiveContributor, hasOrdersInProgress)
      ]
  • executingUserRolesArray von string (einer von: owner, member, accountant)
    • Array[

      the role within a customer

      • *string (einer von: owner, member, accountant)

        the role within a customer

      ]
  • flagsArray von string (einer von: agency, employee)
    • Array[
      • *string (einer von: agency, employee)
      ]
  • isAllowedToPlaceOrdersboolean
  • isBannedboolean
  • isInDefaultOfPaymentboolean
  • isMailAddressInvalidboolean
  • levelOfUndeliverableDunningNoticestring (einer von: first, second)
  • memberCountinteger (≥ 0)required
  • namestringrequired
  • ownerobject
    • addressobjectrequired
      • streetstringrequired
      • houseNumberstringrequired
      • citystringrequired
      • zipstringrequired
      • countryCodestringrequired

        ISO 3166-1 alpha-2 country code

      • addressPrefixstring
    • companystring
    • emailAddressstring (email)
    • firstNamestring
    • lastNamestring
    • leitwegIdstring (≤ 46 Zeichen)

      German electronic invoicing routing ID (XRechnung). Only allowed for public authorities and requires a company.

    • phoneNumbersArray von string
      • Array[
        • *string
        ]
    • purchaseOrderReferencestring (≤ 200 Zeichen)

      Purchase order reference used on invoices for this customer. Not allowed together with a leitwegId.

    • salutationstring (einer von: mr, ms, other)required
    • titlestring
    • useFormalTermboolean
  • projectCountinteger (≥ 0)required
  • vatIdstring
  • vatIdValidationStatestring (einer von: valid, invalid, pending, unsupported, unspecified)
Content-Type: application/json

{
"activeSuspension": {
"createdAt": "1985-10-26T01:21:00.000Z"
},
"avatarRefId": "string",
"categoryId": "string",
"creationDate": "1985-10-26T01:21:00.000Z",
"customerId": "string",
"customerNumber": "string",
"deletionProhibitedBy": [
"hasOpenInvoices"
],
"executingUserRoles": [
"owner"
],
"flags": [
"agency"
],
"isAllowedToPlaceOrders": true,
"isBanned": true,
"isInDefaultOfPayment": true,
"isMailAddressInvalid": true,
"levelOfUndeliverableDunningNotice": "first",
"memberCount": 123,
"name": "string",
"owner": {
"address": {
"street": "Königsberger Straße",
"houseNumber": "4-6",
"city": "Espelkamp",
"zip": "32339",
"countryCode": "DE",
"addressPrefix": "c/o Ada Lovelace"
},
"company": "string",
"emailAddress": "email@mittwald.example",
"firstName": "string",
"lastName": "string",
"leitwegId": "string",
"phoneNumbers": [
"string"
],
"purchaseOrderReference": "string",
"salutation": "mr",
"title": "string",
"useFormalTerm": true
},
"projectCount": 123,
"vatId": "string",
"vatIdValidationState": "valid"
}
{
"properties": {
"activeSuspension": {
"properties": {
"createdAt": {
"format": "date-time",
"type": "string"
}
},
"required": [
"createdAt"
],
"type": "object"
},
"avatarRefId": {
"type": "string"
},
"categoryId": {
"type": "string"
},
"creationDate": {
"format": "date-time",
"type": "string"
},
"customerId": {
"type": "string"
},
"customerNumber": {
"type": "string"
},
"deletionProhibitedBy": {
"items": {
"enum": [
"hasOpenInvoices",
"hasActiveContracts",
"hasActiveExtensionSubscriptions",
"isActiveContributor",
"hasOrdersInProgress"
],
"type": "string"
},
"type": "array"
},
"executingUserRoles": {
"items": {
"description": "the role within a customer",
"enum": [
"owner",
"member",
"accountant"
],
"type": "string"
},
"type": "array"
},
"flags": {
"items": {
"enum": [
"agency",
"employee"
],
"type": "string"
},
"type": "array"
},
"isAllowedToPlaceOrders": {
"type": "boolean"
},
"isBanned": {
"type": "boolean"
},
"isInDefaultOfPayment": {
"type": "boolean"
},
"isMailAddressInvalid": {
"type": "boolean"
},
"levelOfUndeliverableDunningNotice": {
"enum": [
"first",
"second"
],
"type": "string"
},
"memberCount": {
"minimum": 0,
"type": "integer"
},
"name": {
"type": "string"
},
"owner": {
"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": {
"type": "string"
},
"emailAddress": {
"format": "email",
"type": "string"
},
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"leitwegId": {
"description": "German electronic invoicing routing ID (XRechnung). Only allowed for public authorities and requires a company.",
"maxLength": 46,
"type": "string"
},
"phoneNumbers": {
"items": {
"type": "string"
},
"type": "array"
},
"purchaseOrderReference": {
"description": "Purchase order reference used on invoices for this customer. Not allowed together with a leitwegId.",
"maxLength": 200,
"type": "string"
},
"salutation": {
"type": "string",
"enum": [
"mr",
"ms",
"other"
]
},
"title": {
"type": "string"
},
"useFormalTerm": {
"type": "boolean"
}
},
"required": [
"address",
"salutation"
],
"type": "object"
},
"projectCount": {
"minimum": 0,
"type": "integer"
},
"vatId": {
"type": "string"
},
"vatIdValidationState": {
"enum": [
"valid",
"invalid",
"pending",
"unsupported",
"unspecified"
],
"type": "string"
}
},
"required": [
"customerId",
"customerNumber",
"name",
"creationDate",
"memberCount",
"projectCount"
],
"type": "object"
}

Nutzungsbeispiele​

$ curl \
--fail \
--location \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/customers/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.customer.getCustomer({
"customerId": "string"
});

assertStatus(response, 200);

use \Mittwald\ApiClient\Generated\V2\Clients\Customer\GetCustomer\GetCustomerRequest;

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

$request = (new GetCustomerRequest(
customerId: "string"
));
$response = $client->customer()->getCustomer($request);

var_dump($response->getBody();

Auf dieser Seite