Moves a list to the trash. The list is soft-deleted and may be restored from the Lightfield UI. Member entities (accounts, contacts, or opportunities) are not affected.
Calling delete on an already-trashed list is a no-op and returns the existing record.
Required scope: lists:delete
Rate limit category: Write
Delete a list
package main
import (
"context"
"fmt"
"github.com/Lightfld/lightfield-go"
"github.com/Lightfld/lightfield-go/option"
)
func main() {
client := githubcomlightfldlightfieldgo.NewClient(
option.WithAPIKey("My API Key"),
)
listDeleteResponse, err := client.List.Delete(
context.TODO(),
"id",
githubcomlightfldlightfieldgo.ListDeleteParams{
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", listDeleteResponse.ID)
}
{
"id": "id",
"createdAt": "createdAt",
"fields": {
"foo": {
"value": "string",
"valueType": "ADDRESS"
}
},
"httpLink": "httpLink"
}Returns Examples
{
"id": "id",
"createdAt": "createdAt",
"fields": {
"foo": {
"value": "string",
"valueType": "ADDRESS"
}
},
"httpLink": "httpLink"
}