Zum Hauptinhalt springen

List customer invites belonging to the executing user

GET/v2/customer-invites
API-Version
v2
Request-Methode
GET
Operation-ID
customer-list-customer-invites

Request​

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

OK

  • Array[
    • *object
      • avatarRefIdstring (uuid)

        Reference to the Customer's avatar.

      • customerIdstring (uuid)required

        ID of the Customer the invite is for.

      • customerNamestringrequired

        Name of the Customer the user is invited to.

      • idstring (uuid)required

        ID of the CustomerInvite.

      • informationobjectrequired
        • invitationTokenstring

          Token for authentication purposes.

        • invitedBystring (uuid)required

          ID of the user that created the invite.

      • mailAddressstring (email)required

        Mail-address of the user the invite is for.

      • membershipExpiresAtstring (date-time)

        Time the CustomerMembership should expire at.

      • messagestring

        Message contained in the CustomerInvite.

      • rolestring (einer von: notset, owner, member, accountant)required
    ]
Content-Type: application/json

[
{
"avatarRefId": "f0f86186-0a5a-45b2-aa33-502777496347",
"customerId": "f0f86186-0a5a-45b2-aa33-502777496347",
"customerName": "string",
"id": "f0f86186-0a5a-45b2-aa33-502777496347",
"information": {
"invitationToken": "string",
"invitedBy": "f0f86186-0a5a-45b2-aa33-502777496347"
},
"mailAddress": "email@mittwald.example",
"membershipExpiresAt": "1985-10-26T01:21:00.000Z",
"message": "string",
"role": "notset"
}
]
{
"items": {
"properties": {
"avatarRefId": {
"description": "Reference to the Customer's avatar.",
"format": "uuid",
"type": "string"
},
"customerId": {
"description": "ID of the Customer the invite is for.",
"format": "uuid",
"type": "string"
},
"customerName": {
"description": "Name of the Customer the user is invited to.",
"type": "string"
},
"id": {
"description": "ID of the CustomerInvite.",
"format": "uuid",
"type": "string"
},
"information": {
"properties": {
"invitationToken": {
"description": "Token for authentication purposes.",
"type": "string"
},
"invitedBy": {
"description": "ID of the user that created the invite.",
"format": "uuid",
"type": "string"
}
},
"required": [
"invitedBy"
],
"type": "object"
},
"mailAddress": {
"description": "Mail-address of the user the invite is for.",
"format": "email",
"type": "string"
},
"membershipExpiresAt": {
"description": "Time the CustomerMembership should expire at.",
"format": "date-time",
"type": "string"
},
"message": {
"description": "Message contained in the CustomerInvite.",
"type": "string"
},
"role": {
"enum": [
"notset",
"owner",
"member",
"accountant"
],
"type": "string"
}
},
"required": [
"id",
"customerId",
"mailAddress",
"role",
"information",
"customerName"
],
"type": "object"
},
"type": "array"
}

Nutzungsbeispiele​

$ curl \
--fail \
--location \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/customer-invites?limit=50&page=1
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.listCustomerInvites({
"queryParameters": {
"limit": 50,
"page": 1
}
});

assertStatus(response, 200);

use \Mittwald\ApiClient\Generated\V2\Clients\Customer\ListCustomerInvites\ListCustomerInvitesRequest;

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

$request = (new ListCustomerInvitesRequest())
->withLimit(50)
->withPage(1);
$response = $client->customer()->listCustomerInvites($request);

var_dump($response->getBody();

Auf dieser Seite