import requests
url = "https://api.paywise.de/partner/v2/companies/{company_id}/users/{membership_id}/cancel/"
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', Authorization: 'Bearer <token>'}
};
fetch('https://api.paywise.de/partner/v2/companies/{company_id}/users/{membership_id}/cancel/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.paywise.de/partner/v2/companies/{company_id}/users/{membership_id}/cancel/")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.paywise.de/partner/v2/companies/{company_id}/users/{membership_id}/cancel/");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Idempotency-Key", "<idempotency-key>");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
curl --request POST \
--url https://api.paywise.de/partner/v2/companies/{company_id}/users/{membership_id}/cancel/ \
--header 'Authorization: Bearer <token>' \
--header 'Idempotency-Key: <idempotency-key>'{
"created_at": "2023-11-07T05:31:56Z",
"email": "[email protected]",
"first_name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invite_expires_at": "2023-11-07T05:31:56Z",
"last_name": "<string>",
"revocation_reason": "<string>",
"revoked_at": "2023-11-07T05:31:56Z",
"revoked_by_token_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "admin",
"sandbox_origin": "production_mirror",
"status": "pending_setup",
"updated_at": "2023-11-07T05:31:56Z"
}{
"code": "validation_error",
"detail": "The request contains invalid data.",
"errors": [
{
"code": "invalid",
"field": "users[0].email",
"message": "Enter a valid email address."
}
]
}{
"code": "not_authenticated",
"detail": "Authentication credentials were not provided."
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"code": "not_found",
"detail": "The requested resource was not found."
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}Cancel a pending company membership
The memberships of one managed company: list, add, and revoke users.
import requests
url = "https://api.paywise.de/partner/v2/companies/{company_id}/users/{membership_id}/cancel/"
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', Authorization: 'Bearer <token>'}
};
fetch('https://api.paywise.de/partner/v2/companies/{company_id}/users/{membership_id}/cancel/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.paywise.de/partner/v2/companies/{company_id}/users/{membership_id}/cancel/")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.paywise.de/partner/v2/companies/{company_id}/users/{membership_id}/cancel/");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Idempotency-Key", "<idempotency-key>");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
curl --request POST \
--url https://api.paywise.de/partner/v2/companies/{company_id}/users/{membership_id}/cancel/ \
--header 'Authorization: Bearer <token>' \
--header 'Idempotency-Key: <idempotency-key>'{
"created_at": "2023-11-07T05:31:56Z",
"email": "[email protected]",
"first_name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invite_expires_at": "2023-11-07T05:31:56Z",
"last_name": "<string>",
"revocation_reason": "<string>",
"revoked_at": "2023-11-07T05:31:56Z",
"revoked_by_token_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "admin",
"sandbox_origin": "production_mirror",
"status": "pending_setup",
"updated_at": "2023-11-07T05:31:56Z"
}{
"code": "validation_error",
"detail": "The request contains invalid data.",
"errors": [
{
"code": "invalid",
"field": "users[0].email",
"message": "Enter a valid email address."
}
]
}{
"code": "not_authenticated",
"detail": "Authentication credentials were not provided."
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"code": "not_found",
"detail": "The requested resource was not found."
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}Authorizations
Partner API Bearer key: Authorization: Bearer <key>. Keys are created only through authorized portal or staff flows.
Headers
Required client-supplied key scoped to the Partner owner, method, operation and path. An exact retry replays the original response while it is retained, including after credential rotation or replacement. Current permissions are required.
Path Parameters
UUID of the managed company in this request.
UUID of the company membership in this request.
Response
A user's membership in a managed company.
Time at which the membership was created.
Email address submitted with the invitation while it is unaccepted; after acceptance, reflects the user's current profile.
128Given name submitted with the invitation while it is unaccepted; after acceptance, reflects the user's current profile.
128Stable identifier of this user's membership in the managed company. Use it as membership_id in the company users endpoints.
Expiry time of the setup invitation while the membership is pending_setup; null when no pending setup invitation is attached.
Family name submitted with the invitation while it is unaccepted; after acceptance, reflects the user's current profile.
128Reason recorded when the membership was revoked.
Time at which the membership was revoked.
Partner credential that revoked the membership, when applicable.
Permissions the user receives within the managed company.
admin- admintax_consultant- tax_consultantmember- memberreadonly- readonlydeveloper- developer
admin, tax_consultant, member, readonly, developer Provenance of the user behind this membership — sandbox_native for a subject created inside the sandbox (a test resource), production_mirror for a read-only copy of a production user, unclassified otherwise (always so in production).
production_mirror- Production mirrorsandbox_native- Sandbox nativeunclassified- Unclassified
production_mirror, sandbox_native, unclassified Membership lifecycle state: pending_setup awaits invitation acceptance; active grants access; cancelled ends a pending invitation; revoked removes an active membership's access.
pending_setup, active, cancelled, revoked Time at which the membership was last updated.
