Skip to content

Latest commit

 

History

History
382 lines (293 loc) · 12.3 KB

File metadata and controls

382 lines (293 loc) · 12.3 KB

HubSpot.NET.Api.GroupsApi

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

Method HTTP request Description
DeleteCrmV3PropertiesObjectTypeGroupsGroupNameArchive DELETE /crm/v3/properties/{objectType}/groups/{groupName} Archive a property group
GetCrmV3PropertiesObjectTypeGroupsGetAll GET /crm/v3/properties/{objectType}/groups Read all property groups
GetCrmV3PropertiesObjectTypeGroupsGroupNameGetByName GET /crm/v3/properties/{objectType}/groups/{groupName} Read a property group
PatchCrmV3PropertiesObjectTypeGroupsGroupNameUpdate PATCH /crm/v3/properties/{objectType}/groups/{groupName} Update a property group
PostCrmV3PropertiesObjectTypeGroupsCreate POST /crm/v3/properties/{objectType}/groups Create a property group

DeleteCrmV3PropertiesObjectTypeGroupsGroupNameArchive

void DeleteCrmV3PropertiesObjectTypeGroupsGroupNameArchive (string objectType, string groupName)

Archive a property group

Move a property group identified by {groupName} to the recycling bin.

Example

using System.Collections.Generic;
using System.Diagnostics;
using HubSpot.NET.Api;
using HubSpot.NET.Client;
using HubSpot.NET.Model;

namespace Example
{
    public class DeleteCrmV3PropertiesObjectTypeGroupsGroupNameArchiveExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.hubapi.com";
            var apiInstance = new GroupsApi(config);
            var objectType = "objectType_example";  // string | 
            var groupName = "groupName_example";  // string | 

            try
            {
                // Archive a property group
                apiInstance.DeleteCrmV3PropertiesObjectTypeGroupsGroupNameArchive(objectType, groupName);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling GroupsApi.DeleteCrmV3PropertiesObjectTypeGroupsGroupNameArchive: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
objectType string
groupName string

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
204 No content -
0 An error occurred. -

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

GetCrmV3PropertiesObjectTypeGroupsGetAll

CollectionResponsePropertyGroup GetCrmV3PropertiesObjectTypeGroupsGetAll (string objectType)

Read all property groups

Read all existing property groups for the specified object type and HubSpot account.

Example

using System.Collections.Generic;
using System.Diagnostics;
using HubSpot.NET.Api;
using HubSpot.NET.Client;
using HubSpot.NET.Model;

namespace Example
{
    public class GetCrmV3PropertiesObjectTypeGroupsGetAllExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.hubapi.com";
            var apiInstance = new GroupsApi(config);
            var objectType = "objectType_example";  // string | 

            try
            {
                // Read all property groups
                CollectionResponsePropertyGroup result = apiInstance.GetCrmV3PropertiesObjectTypeGroupsGetAll(objectType);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling GroupsApi.GetCrmV3PropertiesObjectTypeGroupsGetAll: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
objectType string

Return type

CollectionResponsePropertyGroup

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 successful operation -
0 An error occurred. -

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

GetCrmV3PropertiesObjectTypeGroupsGroupNameGetByName

PropertyGroup GetCrmV3PropertiesObjectTypeGroupsGroupNameGetByName (string objectType, string groupName)

Read a property group

Read a property group identified by {groupName}.

Example

using System.Collections.Generic;
using System.Diagnostics;
using HubSpot.NET.Api;
using HubSpot.NET.Client;
using HubSpot.NET.Model;

namespace Example
{
    public class GetCrmV3PropertiesObjectTypeGroupsGroupNameGetByNameExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.hubapi.com";
            var apiInstance = new GroupsApi(config);
            var objectType = "objectType_example";  // string | 
            var groupName = "groupName_example";  // string | 

            try
            {
                // Read a property group
                PropertyGroup result = apiInstance.GetCrmV3PropertiesObjectTypeGroupsGroupNameGetByName(objectType, groupName);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling GroupsApi.GetCrmV3PropertiesObjectTypeGroupsGroupNameGetByName: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
objectType string
groupName string

Return type

PropertyGroup

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 successful operation -
0 An error occurred. -

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

PatchCrmV3PropertiesObjectTypeGroupsGroupNameUpdate

PropertyGroup PatchCrmV3PropertiesObjectTypeGroupsGroupNameUpdate (string objectType, string groupName, PropertyGroupUpdate propertyGroupUpdate)

Update a property group

Perform a partial update of a property group identified by {groupName}. Provided fields will be overwritten.

Example

using System.Collections.Generic;
using System.Diagnostics;
using HubSpot.NET.Api;
using HubSpot.NET.Client;
using HubSpot.NET.Model;

namespace Example
{
    public class PatchCrmV3PropertiesObjectTypeGroupsGroupNameUpdateExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.hubapi.com";
            var apiInstance = new GroupsApi(config);
            var objectType = "objectType_example";  // string | 
            var groupName = "groupName_example";  // string | 
            var propertyGroupUpdate = new PropertyGroupUpdate(); // PropertyGroupUpdate | 

            try
            {
                // Update a property group
                PropertyGroup result = apiInstance.PatchCrmV3PropertiesObjectTypeGroupsGroupNameUpdate(objectType, groupName, propertyGroupUpdate);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling GroupsApi.PatchCrmV3PropertiesObjectTypeGroupsGroupNameUpdate: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
objectType string
groupName string
propertyGroupUpdate PropertyGroupUpdate

Return type

PropertyGroup

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 successful operation -
0 An error occurred. -

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

PostCrmV3PropertiesObjectTypeGroupsCreate

PropertyGroup PostCrmV3PropertiesObjectTypeGroupsCreate (string objectType, PropertyGroupCreate propertyGroupCreate)

Create a property group

Create and return a copy of a new property group.

Example

using System.Collections.Generic;
using System.Diagnostics;
using HubSpot.NET.Api;
using HubSpot.NET.Client;
using HubSpot.NET.Model;

namespace Example
{
    public class PostCrmV3PropertiesObjectTypeGroupsCreateExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.hubapi.com";
            var apiInstance = new GroupsApi(config);
            var objectType = "objectType_example";  // string | 
            var propertyGroupCreate = new PropertyGroupCreate(); // PropertyGroupCreate | 

            try
            {
                // Create a property group
                PropertyGroup result = apiInstance.PostCrmV3PropertiesObjectTypeGroupsCreate(objectType, propertyGroupCreate);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling GroupsApi.PostCrmV3PropertiesObjectTypeGroupsCreate: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
objectType string
propertyGroupCreate PropertyGroupCreate

Return type

PropertyGroup

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 successful operation -
0 An error occurred. -

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