Skip to content

Latest commit

 

History

History
70 lines (52 loc) · 8.88 KB

README.md

File metadata and controls

70 lines (52 loc) · 8.88 KB

CustomFields

(Vault.CustomFields)

Overview

Available Operations

  • List - Get resource custom fields

List

This endpoint returns an custom fields on a connection resource.

Example Usage

package main

import(
	"context"
	"os"
	sdkgo "github.com/apideck-libraries/sdk-go"
	"log"
)

func main() {
    ctx := context.Background()
    
    s := sdkgo.New(
        sdkgo.WithSecurity(os.Getenv("APIDECK_API_KEY")),
        sdkgo.WithConsumerID("test-consumer"),
        sdkgo.WithAppID("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX"),
    )

    res, err := s.Vault.CustomFields.List(ctx, "crm", "pipedrive", "leads", sdkgo.String("1234"))
    if err != nil {
        log.Fatal(err)
    }
    if res.GetCustomFieldsResponse != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description Example
ctx context.Context ✔️ The context to use for the request.
unifiedAPI string ✔️ Unified API crm
serviceID string ✔️ Service ID of the resource to return pipedrive
resource string ✔️ Name of the resource (plural) leads
resourceID *string This is the id of the resource you want to fetch when listing custom fields. For example, if you want to fetch custom fields for a specific contact, you would use the contact id. 1234
opts []operations.Option The options for this request.

Response

*operations.VaultCustomFieldsAllResponse, error

Errors

Error Type Status Code Content Type
apierrors.BadRequestResponse 400 application/json
apierrors.UnauthorizedResponse 401 application/json
apierrors.PaymentRequiredResponse 402 application/json
apierrors.NotFoundResponse 404 application/json
apierrors.UnprocessableResponse 422 application/json
apierrors.APIError 4XX, 5XX */*