(Crm.Users)
List Users
package main
import(
gosdk "github.com/panoratech/go-sdk"
"context"
"log"
)
func main() {
s := gosdk.New(
gosdk.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Crm.Users.List(ctx, "<value>", gosdk.Bool(true), gosdk.Float64(10), gosdk.String("1b8b05bb-5273-4012-b520-8657b0b90874"))
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
for {
// handle items
res, err = res.Next()
if err != nil {
// handle error
}
if res == nil {
break
}
}
}
}
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
xConnectionToken |
string | ✔️ | The connection token | |
remoteData |
*bool | ➖ | Set to true to include data from the original software. | true |
limit |
*float64 | ➖ | Set to get the number of records. | 10 |
cursor |
*string | ➖ | Set to get the number of records after this cursor. | 1b8b05bb-5273-4012-b520-8657b0b90874 |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.ListCrmUsersResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4XX, 5XX | */* |
Retrieve Users from any connected Crm software
package main
import(
gosdk "github.com/panoratech/go-sdk"
"context"
"log"
)
func main() {
s := gosdk.New(
gosdk.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Crm.Users.Retrieve(ctx, "<value>", "b008e199-eda9-4629-bd41-a01b6195864a", gosdk.Bool(true))
if err != nil {
log.Fatal(err)
}
if res.UnifiedCrmUserOutput != nil {
// handle response
}
}
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
xConnectionToken |
string | ✔️ | The connection token | |
id |
string | ✔️ | id of the user you want to retrieve. | b008e199-eda9-4629-bd41-a01b6195864a |
remoteData |
*bool | ➖ | Set to true to include data from the original Crm software. | true |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.RetrieveCrmUserResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4XX, 5XX | */* |