All URIs are relative to https://api.hubapi.com
Method | HTTP request | Description |
---|---|---|
Archive | Delete /crm/v3/properties/{objectType}/{propertyName} | Archive a property |
Create | Post /crm/v3/properties/{objectType} | Create a property |
GetAll | Get /crm/v3/properties/{objectType} | Read all properties |
GetByName | Get /crm/v3/properties/{objectType}/{propertyName} | Read a property |
Update | Patch /crm/v3/properties/{objectType}/{propertyName} | Update a property |
Archive(ctx, objectType, propertyName).Execute()
Archive a property
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
objectType := "objectType_example" // string |
propertyName := "propertyName_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CoreApi.Archive(context.Background(), objectType, propertyName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CoreApi.Archive``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
objectType | string | ||
propertyName | string |
Other parameters are passed through a pointer to a apiArchiveRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
oauth2, oauth2_legacy, private_apps, private_apps_legacy
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Property Create(ctx, objectType).PropertyCreate(propertyCreate).Execute()
Create a property
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
objectType := "objectType_example" // string |
propertyCreate := *openapiclient.NewPropertyCreate("My Contact Property", "enumeration", "contactinformation", "Name_example", "select") // PropertyCreate |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CoreApi.Create(context.Background(), objectType).PropertyCreate(propertyCreate).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CoreApi.Create``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Create`: Property
fmt.Fprintf(os.Stdout, "Response from `CoreApi.Create`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
objectType | string |
Other parameters are passed through a pointer to a apiCreateRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
propertyCreate | PropertyCreate | |
oauth2, oauth2_legacy, private_apps, private_apps_legacy
- Content-Type: application/json
- Accept: application/json, /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CollectionResponsePropertyNoPaging GetAll(ctx, objectType).Archived(archived).Properties(properties).Execute()
Read all properties
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
objectType := "objectType_example" // string |
archived := true // bool | Whether to return only results that have been archived. (optional) (default to false)
properties := "properties_example" // string | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CoreApi.GetAll(context.Background(), objectType).Archived(archived).Properties(properties).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CoreApi.GetAll``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAll`: CollectionResponsePropertyNoPaging
fmt.Fprintf(os.Stdout, "Response from `CoreApi.GetAll`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
objectType | string |
Other parameters are passed through a pointer to a apiGetAllRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
archived | bool | Whether to return only results that have been archived. | [default to false] properties | string | |
CollectionResponsePropertyNoPaging
oauth2, oauth2_legacy, private_apps, private_apps_legacy
- Content-Type: Not defined
- Accept: application/json, /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Property GetByName(ctx, objectType, propertyName).Archived(archived).Properties(properties).Execute()
Read a property
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
objectType := "objectType_example" // string |
propertyName := "propertyName_example" // string |
archived := true // bool | Whether to return only results that have been archived. (optional) (default to false)
properties := "properties_example" // string | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CoreApi.GetByName(context.Background(), objectType, propertyName).Archived(archived).Properties(properties).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CoreApi.GetByName``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetByName`: Property
fmt.Fprintf(os.Stdout, "Response from `CoreApi.GetByName`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
objectType | string | ||
propertyName | string |
Other parameters are passed through a pointer to a apiGetByNameRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
archived | bool | Whether to return only results that have been archived. | [default to false] properties | string | |
oauth2, oauth2_legacy, private_apps, private_apps_legacy
- Content-Type: Not defined
- Accept: application/json, /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Property Update(ctx, objectType, propertyName).PropertyUpdate(propertyUpdate).Execute()
Update a property
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
objectType := "objectType_example" // string |
propertyName := "propertyName_example" // string |
propertyUpdate := *openapiclient.NewPropertyUpdate() // PropertyUpdate |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CoreApi.Update(context.Background(), objectType, propertyName).PropertyUpdate(propertyUpdate).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CoreApi.Update``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Update`: Property
fmt.Fprintf(os.Stdout, "Response from `CoreApi.Update`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
objectType | string | ||
propertyName | string |
Other parameters are passed through a pointer to a apiUpdateRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
propertyUpdate | PropertyUpdate | |
oauth2, oauth2_legacy, private_apps, private_apps_legacy
- Content-Type: application/json
- Accept: application/json, /
[Back to top] [Back to API list] [Back to Model list] [Back to README]