(CustomerPortal.Organizations)
- Get - Get Organization
Get a customer portal's organization by slug.
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.CustomerPortal.Organizations.Get(ctx, "<value>")
if err != nil {
log.Fatal(err)
}
if res.Organization != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
slug |
string | ✔️ | The organization slug. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.CustomerPortalOrganizationsGetResponse, error
Error Type | Status Code | Content Type |
---|---|---|
apierrors.ResourceNotFound | 404 | application/json |
apierrors.HTTPValidationError | 422 | application/json |
apierrors.APIError | 4XX, 5XX | */* |