List organizations.
Scopes: organizations:read organizations:write
package main
import(
"context"
"os"
polargo "github.com/polarsource/polar-go"
"log"
)
func main() {
ctx := context.Background()
s := polargo.New(
polargo.WithSecurity(os.Getenv("POLAR_ACCESS_TOKEN")),
)
res, err := s.Organizations.List(ctx, nil, polargo.Pointer[int64](1), polargo.Pointer[int64](10), nil)
if err != nil {
log.Fatal(err)
}
if res.ListResourceOrganization != nil {
for {
// handle items
res, err = res.Next()
if err != nil {
// handle error
}
if res == nil {
break
}
}
}
}{
"items": [
{
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"avatar_url": "<string>",
"proration_behavior": "invoice",
"allow_customer_updates": true,
"email": "<string>",
"website": "<string>",
"socials": [
{
"platform": "x",
"url": "<string>"
}
],
"status": "created",
"details_submitted_at": "2023-11-07T05:31:56Z",
"feature_settings": {
"issue_funding_enabled": false,
"seat_based_pricing_enabled": false,
"revops_enabled": false,
"wallets_enabled": false
},
"subscription_settings": {
"allow_multiple_subscriptions": true,
"allow_customer_updates": true,
"proration_behavior": "invoice",
"benefit_revocation_grace_period": 123,
"prevent_trial_abuse": true
},
"notification_settings": {
"new_order": true,
"new_subscription": true
},
"customer_email_settings": {
"order_confirmation": true,
"subscription_cancellation": true,
"subscription_confirmation": true,
"subscription_cycled": true,
"subscription_past_due": true,
"subscription_revoked": true,
"subscription_uncanceled": true,
"subscription_updated": true
}
}
],
"pagination": {
"total_count": 123,
"max_page": 123
}
}You can generate an Organization Access Token from your organization's settings.
Filter by slug.
Page number, defaults to 1.
Size of a page, defaults to 10. Maximum is 100.
Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign - before the criteria name to sort by descending order.
created_at, -created_at, slug, -slug, name, -name, next_review_threshold, -next_review_threshold, days_in_status, -days_in_status Successful Response
Show child attributes
Creation timestamp of the object.
Last modification timestamp of the object.
The ID of the object.
Organization name shown in checkout, customer portal, emails etc.
Unique organization slug in checkout, customer portal and credit card statements.
Avatar URL shown in checkout, customer portal, emails etc.
Proration behavior applied when customer updates their subscription from the portal.
invoice, prorate Whether customers can update their subscriptions from the customer portal.
Public support email.
Official website of the organization.
Links to social profiles.
Current organization status
created, onboarding_started, initial_review, ongoing_review, denied, active When the business details were submitted.
Organization feature settings
Show child attributes
If this organization has issue funding enabled
If this organization has seat-based pricing enabled
If this organization has RevOps enabled
If this organization has Wallets enabled
Settings related to subscriptions management
Show child attributes
invoice, prorate Settings related to customer emails
Show child attributes
Was this page helpful?
package main
import(
"context"
"os"
polargo "github.com/polarsource/polar-go"
"log"
)
func main() {
ctx := context.Background()
s := polargo.New(
polargo.WithSecurity(os.Getenv("POLAR_ACCESS_TOKEN")),
)
res, err := s.Organizations.List(ctx, nil, polargo.Pointer[int64](1), polargo.Pointer[int64](10), nil)
if err != nil {
log.Fatal(err)
}
if res.ListResourceOrganization != nil {
for {
// handle items
res, err = res.Next()
if err != nil {
// handle error
}
if res == nil {
break
}
}
}
}{
"items": [
{
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"avatar_url": "<string>",
"proration_behavior": "invoice",
"allow_customer_updates": true,
"email": "<string>",
"website": "<string>",
"socials": [
{
"platform": "x",
"url": "<string>"
}
],
"status": "created",
"details_submitted_at": "2023-11-07T05:31:56Z",
"feature_settings": {
"issue_funding_enabled": false,
"seat_based_pricing_enabled": false,
"revops_enabled": false,
"wallets_enabled": false
},
"subscription_settings": {
"allow_multiple_subscriptions": true,
"allow_customer_updates": true,
"proration_behavior": "invoice",
"benefit_revocation_grace_period": 123,
"prevent_trial_abuse": true
},
"notification_settings": {
"new_order": true,
"new_subscription": true
},
"customer_email_settings": {
"order_confirmation": true,
"subscription_cancellation": true,
"subscription_confirmation": true,
"subscription_cycled": true,
"subscription_past_due": true,
"subscription_revoked": true,
"subscription_uncanceled": true,
"subscription_updated": true
}
}
],
"pagination": {
"total_count": 123,
"max_page": 123
}
}