Skip to content

Latest commit

 

History

History
234 lines (149 loc) · 7.71 KB

BatchApi.md

File metadata and controls

234 lines (149 loc) · 7.71 KB

\BatchApi

All URIs are relative to https://api.hubapi.com

Method HTTP request Description
BatchArchive Post /crm/v3/associations/{fromObjectType}/{toObjectType}/batch/archive Archive a batch of associations
BatchCreate Post /crm/v3/associations/{fromObjectType}/{toObjectType}/batch/create Create a batch of associations
BatchRead Post /crm/v3/associations/{fromObjectType}/{toObjectType}/batch/read Read a batch of associations

BatchArchive

BatchArchive(ctx, fromObjectType, toObjectType).BatchInputPublicAssociation(batchInputPublicAssociation).Execute()

Archive a batch of associations

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    fromObjectType := "fromObjectType_example" // string | 
    toObjectType := "toObjectType_example" // string | 
    batchInputPublicAssociation := *openapiclient.NewBatchInputPublicAssociation([]openapiclient.PublicAssociation{*openapiclient.NewPublicAssociation(*openapiclient.NewPublicObjectId("Id_example"), *openapiclient.NewPublicObjectId("Id_example"), "Type_example")}) // BatchInputPublicAssociation | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.BatchApi.BatchArchive(context.Background(), fromObjectType, toObjectType).BatchInputPublicAssociation(batchInputPublicAssociation).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `BatchApi.BatchArchive``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
fromObjectType string
toObjectType string

Other Parameters

Other parameters are passed through a pointer to a apiBatchArchiveRequest struct via the builder pattern

Name Type Description Notes

batchInputPublicAssociation | BatchInputPublicAssociation | |

Return type

(empty response body)

Authorization

oauth2, oauth2_legacy, private_apps, private_apps_legacy

HTTP request headers

  • Content-Type: application/json
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]

BatchCreate

BatchResponsePublicAssociation BatchCreate(ctx, fromObjectType, toObjectType).BatchInputPublicAssociation(batchInputPublicAssociation).Execute()

Create a batch of associations

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    fromObjectType := "fromObjectType_example" // string | 
    toObjectType := "toObjectType_example" // string | 
    batchInputPublicAssociation := *openapiclient.NewBatchInputPublicAssociation([]openapiclient.PublicAssociation{*openapiclient.NewPublicAssociation(*openapiclient.NewPublicObjectId("Id_example"), *openapiclient.NewPublicObjectId("Id_example"), "Type_example")}) // BatchInputPublicAssociation | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.BatchApi.BatchCreate(context.Background(), fromObjectType, toObjectType).BatchInputPublicAssociation(batchInputPublicAssociation).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `BatchApi.BatchCreate``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `BatchCreate`: BatchResponsePublicAssociation
    fmt.Fprintf(os.Stdout, "Response from `BatchApi.BatchCreate`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
fromObjectType string
toObjectType string

Other Parameters

Other parameters are passed through a pointer to a apiBatchCreateRequest struct via the builder pattern

Name Type Description Notes

batchInputPublicAssociation | BatchInputPublicAssociation | |

Return type

BatchResponsePublicAssociation

Authorization

oauth2, oauth2_legacy, private_apps, private_apps_legacy

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, /

[Back to top] [Back to API list] [Back to Model list] [Back to README]

BatchRead

BatchResponsePublicAssociationMulti BatchRead(ctx, fromObjectType, toObjectType).BatchInputPublicObjectId(batchInputPublicObjectId).Execute()

Read a batch of associations

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    fromObjectType := "fromObjectType_example" // string | 
    toObjectType := "toObjectType_example" // string | 
    batchInputPublicObjectId := *openapiclient.NewBatchInputPublicObjectId([]openapiclient.PublicObjectId{*openapiclient.NewPublicObjectId("Id_example")}) // BatchInputPublicObjectId | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.BatchApi.BatchRead(context.Background(), fromObjectType, toObjectType).BatchInputPublicObjectId(batchInputPublicObjectId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `BatchApi.BatchRead``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `BatchRead`: BatchResponsePublicAssociationMulti
    fmt.Fprintf(os.Stdout, "Response from `BatchApi.BatchRead`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
fromObjectType string
toObjectType string

Other Parameters

Other parameters are passed through a pointer to a apiBatchReadRequest struct via the builder pattern

Name Type Description Notes

batchInputPublicObjectId | BatchInputPublicObjectId | |

Return type

BatchResponsePublicAssociationMulti

Authorization

oauth2, oauth2_legacy, private_apps, private_apps_legacy

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, /

[Back to top] [Back to API list] [Back to Model list] [Back to README]