Update a custom object record
client.Object.Update(ctx, id, params) (*ObjectUpdateResponse, error)
POST/v1/objects/{entitySlug}/values/{id}
Updates an existing record by ID for the specified custom object type. Only included fields and relationships are modified.
Update a custom object record
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"),
)
objectUpdateResponse, err := client.Object.Update(
context.TODO(),
"id",
githubcomlightfldlightfieldgo.ObjectUpdateParams{
EntitySlug: "entitySlug",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", objectUpdateResponse.ID)
}
{
"id": "id",
"createdAt": "createdAt",
"fields": {
"foo": {
"value": "string",
"valueType": "ADDRESS"
}
},
"httpLink": "httpLink",
"relationships": {
"foo": {
"cardinality": "cardinality",
"objectType": "objectType",
"values": [
"string"
]
}
},
"updatedAt": "updatedAt",
"externalId": "externalId"
}Returns Examples
{
"id": "id",
"createdAt": "createdAt",
"fields": {
"foo": {
"value": "string",
"valueType": "ADDRESS"
}
},
"httpLink": "httpLink",
"relationships": {
"foo": {
"cardinality": "cardinality",
"objectType": "objectType",
"values": [
"string"
]
}
},
"updatedAt": "updatedAt",
"externalId": "externalId"
}