Skip to main content
POST
/
v1
/
customer-portal
/
seats
Go (SDK)
package main

import(
	"context"
	polargo "github.com/polarsource/polar-go"
	"github.com/polarsource/polar-go/models/components"
	"os"
	"github.com/polarsource/polar-go/models/operations"
	"log"
)

func main() {
    ctx := context.Background()

    s := polargo.New()

    res, err := s.CustomerPortal.Seats.AssignSeat(ctx, components.SeatAssign{}, operations.CustomerPortalSeatsAssignSeatSecurity{
        CustomerSession: os.Getenv("POLAR_CUSTOMER_SESSION"),
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.CustomerSeat != nil {
        // handle response
    }
}
{
  "created_at": "2023-11-07T05:31:56Z",
  "modified_at": "2023-11-07T05:31:56Z",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "subscription_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "pending",
  "customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "customer_email": "<string>",
  "invitation_token_expires_at": "2023-11-07T05:31:56Z",
  "claimed_at": "2023-11-07T05:31:56Z",
  "revoked_at": "2023-11-07T05:31:56Z",
  "seat_metadata": {}
}

Authorizations

Authorization
string
header
required

Body

application/json
subscription_id
string<uuid> | null
checkout_id
string<uuid> | null
order_id
string<uuid> | null
email
string<email> | null
external_customer_id
string | null
customer_id
string<uuid> | null
metadata
object | null
immediate_claim
boolean
default:false

Response

created_at
string<date-time>
required
modified_at
string<date-time> | null
required
id
string<uuid>
required
status
enum<string>
required
Available options:
pending,
claimed,
revoked
subscription_id
string<uuid> | null
order_id
string<uuid> | null
customer_id
string<uuid> | null
customer_email
string | null
invitation_token_expires_at
string<date-time> | null
claimed_at
string<date-time> | null
revoked_at
string<date-time> | null
seat_metadata
object | null