Zum Hauptinhalt springen

Get a customer membership

GET/v2/customer-memberships/{customerMembershipId}
API-Version
v2
Request-Methode
GET
Operation-ID
customer-get-customer-membership

Request​

  • customerMembershipIdstringrequired

    ID of the CustomerMembership to retrieve.

Responses​

Format
application/json
Beschreibung

OK

  • avatarRefstring (uuid)

    Avatar file reference id of the user.

  • customerIdstring (uuid)required

    ID of the Customer the CustomerMembership is for.

  • emailstring (email)required

    Email used by the invited user.

  • expiresAtstring (date-time)

    Time the CustomerMembership should expire at.

  • firstNamestringrequired

    First name of the user.

  • idstring (uuid)required

    ID of the CustomerMembership.

  • inviteIdstring (uuid)

    ID of the CustomerInvite the membership was created from.

  • lastNamestringrequired

    Last name of the user.

  • memberSincestring (date-time)

    Date the CustomerMembership was created at.

  • mfabooleanrequired

    MFA activated by the user.

  • rolestring (einer von: notset, owner, member, accountant)required
  • userIdstring (uuid)required

    ID of the user the CustomerMembership is for.

Content-Type: application/json

{
"avatarRef": "f0f86186-0a5a-45b2-aa33-502777496347",
"customerId": "f0f86186-0a5a-45b2-aa33-502777496347",
"email": "email@mittwald.example",
"expiresAt": "1985-10-26T01:21:00.000Z",
"firstName": "string",
"id": "f0f86186-0a5a-45b2-aa33-502777496347",
"inviteId": "f0f86186-0a5a-45b2-aa33-502777496347",
"lastName": "string",
"memberSince": "1985-10-26T01:21:00.000Z",
"mfa": true,
"role": "notset",
"userId": "f0f86186-0a5a-45b2-aa33-502777496347"
}
{
"properties": {
"avatarRef": {
"description": "Avatar file reference id of the user.",
"format": "uuid",
"type": "string"
},
"customerId": {
"description": "ID of the Customer the CustomerMembership is for.",
"format": "uuid",
"type": "string"
},
"email": {
"description": "Email used by the invited user.",
"format": "email",
"type": "string"
},
"expiresAt": {
"description": "Time the CustomerMembership should expire at.",
"format": "date-time",
"type": "string"
},
"firstName": {
"description": "First name of the user.",
"type": "string"
},
"id": {
"description": "ID of the CustomerMembership.",
"format": "uuid",
"type": "string"
},
"inviteId": {
"description": "ID of the CustomerInvite the membership was created from.",
"format": "uuid",
"type": "string"
},
"lastName": {
"description": "Last name of the user.",
"type": "string"
},
"memberSince": {
"description": "Date the CustomerMembership was created at.",
"format": "date-time",
"type": "string"
},
"mfa": {
"description": "MFA activated by the user.",
"type": "boolean"
},
"role": {
"enum": [
"notset",
"owner",
"member",
"accountant"
],
"type": "string"
},
"userId": {
"description": "ID of the user the CustomerMembership is for.",
"format": "uuid",
"type": "string"
}
},
"required": [
"id",
"customerId",
"userId",
"role",
"email",
"mfa",
"firstName",
"lastName"
],
"type": "object"
}

Nutzungsbeispiele​

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

assertStatus(response, 200);

use \Mittwald\ApiClient\Generated\V2\Clients\Customer\GetCustomerMembership\GetCustomerMembershipRequest;

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

$request = (new GetCustomerMembershipRequest(
customerMembershipId: "string"
));
$response = $client->customer()->getCustomerMembership($request);

var_dump($response->getBody();

Auf dieser Seite