- listSeats - List Seats
- assignSeat - Assign Seat
- revokeSeat - Revoke Seat
- resendInvitation - Resend Invitation
- listClaimedSubscriptions - List Claimed Subscriptions
Scopes: customer_portal:read customer_portal:write
declare(strict_types=1);
require 'vendor/autoload.php';
use Polar;
use Polar\Models\Operations;
$sdk = Polar\Polar::builder()->build();
$requestSecurity = new Operations\CustomerPortalSeatsListSeatsSecurity(
customerSession: '<YOUR_BEARER_TOKEN_HERE>',
);
$response = $sdk->customerPortal->seats->listSeats(
security: $requestSecurity,
subscriptionId: '<id>'
);
if ($response->seatsList !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
security |
Operations\CustomerPortalSeatsListSeatsSecurity | ✔️ | The security requirements to use for the request. |
subscriptionId |
?string | ➖ | Subscription ID |
orderId |
?string | ➖ | Order ID |
?Operations\CustomerPortalSeatsListSeatsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\HTTPValidationError | 422 | application/json |
| Errors\APIException | 4XX, 5XX | */* |
Assign Seat
declare(strict_types=1);
require 'vendor/autoload.php';
use Polar;
use Polar\Models\Components;
use Polar\Models\Operations;
$sdk = Polar\Polar::builder()->build();
$request = new Components\SeatAssign();
$requestSecurity = new Operations\CustomerPortalSeatsAssignSeatSecurity(
customerSession: '<YOUR_BEARER_TOKEN_HERE>',
);
$response = $sdk->customerPortal->seats->assignSeat(
request: $request,
security: $requestSecurity
);
if ($response->customerSeat !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Components\SeatAssign | ✔️ | The request object to use for the request. |
security |
Operations\CustomerPortalSeatsAssignSeatSecurity | ✔️ | The security requirements to use for the request. |
?Operations\CustomerPortalSeatsAssignSeatResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\HTTPValidationError | 422 | application/json |
| Errors\APIException | 4XX, 5XX | */* |
Revoke Seat
declare(strict_types=1);
require 'vendor/autoload.php';
use Polar;
use Polar\Models\Operations;
$sdk = Polar\Polar::builder()->build();
$requestSecurity = new Operations\CustomerPortalSeatsRevokeSeatSecurity(
customerSession: '<YOUR_BEARER_TOKEN_HERE>',
);
$response = $sdk->customerPortal->seats->revokeSeat(
security: $requestSecurity,
seatId: '4b3d74b3-01ff-4aac-bd03-320535cd5ce4'
);
if ($response->customerSeat !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
security |
Operations\CustomerPortalSeatsRevokeSeatSecurity | ✔️ | The security requirements to use for the request. |
seatId |
string | ✔️ | N/A |
?Operations\CustomerPortalSeatsRevokeSeatResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\HTTPValidationError | 422 | application/json |
| Errors\APIException | 4XX, 5XX | */* |
Resend Invitation
declare(strict_types=1);
require 'vendor/autoload.php';
use Polar;
use Polar\Models\Operations;
$sdk = Polar\Polar::builder()->build();
$requestSecurity = new Operations\CustomerPortalSeatsResendInvitationSecurity(
customerSession: '<YOUR_BEARER_TOKEN_HERE>',
);
$response = $sdk->customerPortal->seats->resendInvitation(
security: $requestSecurity,
seatId: 'e3817437-8d53-4578-88d2-1dc256825965'
);
if ($response->customerSeat !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
security |
Operations\CustomerPortalSeatsResendInvitationSecurity | ✔️ | The security requirements to use for the request. |
seatId |
string | ✔️ | N/A |
?Operations\CustomerPortalSeatsResendInvitationResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\HTTPValidationError | 422 | application/json |
| Errors\APIException | 4XX, 5XX | */* |
List all subscriptions where the authenticated customer has claimed a seat.
Scopes: customer_portal:read customer_portal:write
declare(strict_types=1);
require 'vendor/autoload.php';
use Polar;
use Polar\Models\Operations;
$sdk = Polar\Polar::builder()->build();
$requestSecurity = new Operations\CustomerPortalSeatsListClaimedSubscriptionsSecurity(
customerSession: '<YOUR_BEARER_TOKEN_HERE>',
);
$responses = $sdk->customerPortal->seats->listClaimedSubscriptions(
security: $requestSecurity,
page: 1,
limit: 10
);
foreach ($responses as $response) {
if ($response->statusCode === 200) {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
security |
Operations\CustomerPortalSeatsListClaimedSubscriptionsSecurity | ✔️ | The security requirements to use for the request. |
page |
?int | ➖ | Page number, defaults to 1. |
limit |
?int | ➖ | Size of a page, defaults to 10. Maximum is 100. |
?Operations\CustomerPortalSeatsListClaimedSubscriptionsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\HTTPValidationError | 422 | application/json |
| Errors\APIException | 4XX, 5XX | */* |