All URIs are relative to https://api.hubapi.com
Method | HTTP request | Description |
---|---|---|
CardsArchive | Delete /crm/v3/extensions/cards/{appId}/{cardId} | Delete a card |
CardsCreate | Post /crm/v3/extensions/cards/{appId} | Create a new card |
CardsGetAll | Get /crm/v3/extensions/cards/{appId} | Get all cards |
CardsGetByID | Get /crm/v3/extensions/cards/{appId}/{cardId} | Get a card. |
CardsUpdate | Patch /crm/v3/extensions/cards/{appId}/{cardId} | Update a card |
CardsArchive(ctx, appId, cardId).Execute()
Delete a card
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
appId := int32(56) // int32 | The ID of the target app.
cardId := "cardId_example" // string | The ID of the card to delete.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CardsApi.CardsArchive(context.Background(), appId, cardId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CardsApi.CardsArchive``: %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. | |
appId | int32 | The ID of the target app. | |
cardId | string | The ID of the card to delete. |
Other parameters are passed through a pointer to a apiCardsArchiveRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CardResponse CardsCreate(ctx, appId).CardCreateRequest(cardCreateRequest).Execute()
Create a new card
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
appId := int32(56) // int32 | The ID of the target app.
cardCreateRequest := *openapiclient.NewCardCreateRequest("Title_example", *openapiclient.NewCardFetchBody("TargetUrl_example", []openapiclient.CardObjectTypeBody{*openapiclient.NewCardObjectTypeBody("Name_example", []string{"PropertiesToSend_example"})}), *openapiclient.NewCardDisplayBody([]openapiclient.CardDisplayProperty{*openapiclient.NewCardDisplayProperty("Name_example", "Label_example", "DataType_example", []openapiclient.DisplayOption{*openapiclient.NewDisplayOption("Name_example", "Label_example", "Type_example")})}), *openapiclient.NewCardActions([]string{"BaseUrls_example"})) // CardCreateRequest | The new card definition.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CardsApi.CardsCreate(context.Background(), appId).CardCreateRequest(cardCreateRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CardsApi.CardsCreate``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CardsCreate`: CardResponse
fmt.Fprintf(os.Stdout, "Response from `CardsApi.CardsCreate`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
appId | int32 | The ID of the target app. |
Other parameters are passed through a pointer to a apiCardsCreateRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
cardCreateRequest | CardCreateRequest | The new card definition. |
- Content-Type: application/json
- Accept: application/json, /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CardListResponse CardsGetAll(ctx, appId).Execute()
Get all cards
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
appId := int32(56) // int32 | The ID of the target app.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CardsApi.CardsGetAll(context.Background(), appId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CardsApi.CardsGetAll``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CardsGetAll`: CardListResponse
fmt.Fprintf(os.Stdout, "Response from `CardsApi.CardsGetAll`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
appId | int32 | The ID of the target app. |
Other parameters are passed through a pointer to a apiCardsGetAllRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json, /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CardResponse CardsGetByID(ctx, appId, cardId).Execute()
Get a card.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
appId := int32(56) // int32 | The ID of the target app.
cardId := "cardId_example" // string | The ID of the target card.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CardsApi.CardsGetByID(context.Background(), appId, cardId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CardsApi.CardsGetByID``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CardsGetByID`: CardResponse
fmt.Fprintf(os.Stdout, "Response from `CardsApi.CardsGetByID`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
appId | int32 | The ID of the target app. | |
cardId | string | The ID of the target card. |
Other parameters are passed through a pointer to a apiCardsGetByIDRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json, /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CardResponse CardsUpdate(ctx, appId, cardId).CardPatchRequest(cardPatchRequest).Execute()
Update a card
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
appId := int32(56) // int32 | The ID of the target app.
cardId := "cardId_example" // string | The ID of the card to update.
cardPatchRequest := *openapiclient.NewCardPatchRequest() // CardPatchRequest | Card definition fields to be updated.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CardsApi.CardsUpdate(context.Background(), appId, cardId).CardPatchRequest(cardPatchRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CardsApi.CardsUpdate``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CardsUpdate`: CardResponse
fmt.Fprintf(os.Stdout, "Response from `CardsApi.CardsUpdate`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
appId | int32 | The ID of the target app. | |
cardId | string | The ID of the card to update. |
Other parameters are passed through a pointer to a apiCardsUpdateRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
cardPatchRequest | CardPatchRequest | Card definition fields to be updated. |
- Content-Type: application/json
- Accept: application/json, /
[Back to top] [Back to API list] [Back to Model list] [Back to README]