- API Reference
- Organization/Customer
- Get all customer profiles the authenticated user has access to
Get all customer profiles the authenticated user has access to
Request
- rolestring
filter to list only customers where the authenticated user has the specified role (accountant, owner, member). Can be a comma seperated list.
- searchstring
text search for customer number, customer name and id. Simple regular expressions are allowed.
- limitinteger (≥ 0)
The max count of resources to return in the list response.
- skipinteger
Number of items to skip. Should be multiple of
limit. - pageinteger (≥ 0)
Page to display.
skipandpageend up doing the same. If bothpageandskipare set, skip is used.
Responses
- 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.
The list of customers the authenticated user is a member for
- Array[
- *object
- activeSuspensionobject
- createdAtstring (date-time)required
- avatarRefIdstring
- categoryIdstring
- creationDatestring (date-time)required
- customerIdstringrequired
- customerNumberstringrequired
- deletionProhibitedByarray of string (one of: hasOpenInvoices, hasActiveContracts, hasActiveExtensionSubscriptions, isActiveContributor, hasOrdersInProgress)
- Array[
- *string (one of: hasOpenInvoices, hasActiveContracts, hasActiveExtensionSubscriptions, isActiveContributor, hasOrdersInProgress)
]
- executingUserRolesarray of string (one of: owner, member, accountant)
- Array[
the role within a customer
- *string (one of: owner, member, accountant)
the role within a customer
]
- flagsarray of string (one of: agency, employee)
- Array[
- *string (one of: agency, employee)
]
- isAllowedToPlaceOrdersboolean
- isBannedboolean
- isInDefaultOfPaymentboolean
- isMailAddressInvalidboolean
- levelOfUndeliverableDunningNoticestring (one of: 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 characters)
German electronic invoicing routing ID (XRechnung). Only allowed for public authorities and requires a company.
- phoneNumbersarray of string
- Array[
- *string
]
- purchaseOrderReferencestring (≤ 200 characters)
Purchase order reference used on invoices for this customer. Not allowed together with a leitwegId.
- salutationstring (one of: mr, ms, other)required
- titlestring
- useFormalTermboolean
- projectCountinteger (≥ 0)required
- vatIdstring
- vatIdValidationStatestring (one of: 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"
}
]
{
"items": {
"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"
},
"type": "array"
}
An unexpected Error that occurred while handling the request
- messagestringrequired
- typestringrequired
Content-Type: application/json
{
"message": "Something went wrong",
"type": "InternalServerError"
}
{
"type": "object",
"required": [
"type",
"message"
],
"properties": {
"message": {
"type": "string",
"example": "Something went wrong"
},
"type": {
"type": "string",
"example": "InternalServerError"
}
}
}
Your request ran into a rate limit. You have to wait until rate limit expires
- messagestring
- typestring
Content-Type: application/json
{
"message": "too many requests",
"type": "RateLimitError"
}
{
"type": "object",
"properties": {
"message": {
"type": "string",
"example": "too many requests"
},
"type": {
"type": "string",
"example": "RateLimitError"
}
}
}
An unexpected Error that occurred while handling the request
- messagestringrequired
- typestringrequired
Content-Type: application/json
{
"message": "Something went wrong",
"type": "InternalServerError"
}
{
"type": "object",
"required": [
"type",
"message"
],
"properties": {
"message": {
"type": "string",
"example": "Something went wrong"
},
"type": {
"type": "string",
"example": "InternalServerError"
}
}
}
Usage examples
$ curl \
--fail \
--location \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/customers?role=string&search=string&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.listCustomers({
"queryParameters": {
"role": "string",
"search": "string",
"limit": 50,
"page": 1
}
});
assertStatus(response, 200);
use \Mittwald\ApiClient\Generated\V2\Clients\Customer\ListCustomers\ListCustomersRequest;
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
$request = (new ListCustomersRequest())
->withRole("string")
->withSearch("string")
->withLimit(50)
->withPage(1);
$response = $client->customer()->listCustomers($request);
var_dump($response->getBody();