Spec - Custom Objects

Table Of Contents

Get Custom Object Definitions List

This API retrieves the list of custom object definitions under the user account. This only returns a summary for each custom object definitions. To get the full definition for each custom object definitions use the GetObjectDefinitionRequest API below.

Input

Output

Success or failure. List of custom object definitions under the user account.

Example Request

<GetCustomObjectDefinitionsListRequest/>

Example Request (Shared Access)

<GetCustomObjectDefinitionsListRequest account_id="12345" group_id="1"/>

Example Response

<GetCustomObjectDefinitionsListResponse>
    <Result>Success</Result>
    <CustomObjectDefinitions>
        <CustomObjectDefinition>
            <ObjectDefinitionID>1</ObjectDefinitionID>
            <ObjectName>Test Object</ObjectName>
            <MaxObjectsPerEntity>0</MaxObjectsPerEntity>
        </CustomObjectDefinition>
        <CustomObjectDefinition>
            <ObjectDefinitionID>2</ObjectDefinitionID>
            <ObjectName>Test Object 2</ObjectName>
            <MaxObjectsPerEntity>5</MaxObjectsPerEntity>
        </CustomObjectDefinition>
    </CustomObjectDefinitions>
</GetCustomObjectDefinitionsListResponse>

Get Object Definition

This API retrieves the full definition along with the attributes for a custom object definition under the user account. Use the DefinitionJSON as a schema on how generate the input for CreateNewCustomObjectRequest and UpdateCustomObjectRequest.

Input

Output

Success or failure. Returns the object definition for the specified custom object.

Example Request

<GetObjectDefinitionRequest object_definition_id="1"/>

Example Request (Shared Access)

<GetObjectDefinitionRequest account_id="12345" group_id="1" object_definition_id="1"/>

Example Response

<GetObjectDefinitionResponse>
    <Result>Success</Result>
    <ObjectDefinition>
        <ObjectDefinitionID>1</ObjectDefinitionID>
        <EntityAttachments>
            <EntityAttachment>Company</EntityAttachment>
            <EntityAttachment>Contact</EntityAttachment>
        </EntityAttachments>
        <DefinitionJSON>
            <Name>Test Object</Name>
            <SortByAttribute>Text Attribute</SortByAttribute>
            <SortDirection>asc</SortDirection>
            <MaxObjectsPerEntity>0</MaxObjectsPerEntity>
            <Description>This is a description of the test object</Description>
            <Attributes>
                <Attribute>
                    <ShowOnInitialLoad>No</ShowOnInitialLoad>
                    <PseudoName>attr1</PseudoName>
                    <MaxLength></MaxLength>
                    <Name>Text Attribute</Name>
                    <Default></Default>
                    <Type>text</Type>
                    <Placeholder></Placeholder>
                </Attribute>
            </Attributes>
        </DefinitionJSON>
    </ObjectDefinition>
</GetObjectDefinitionResponse>

List Custom Objects

This API retrieves the list of custom objects for an entity (contact/company).

Input

Output

Success or failure. List of custom objects for an entity specified. The DefinitionJSON is the definition for ObjectJSON data for the entity.

For image type and file type attributes, the data are returned in Base64 Data URI format.

Example Request (Contact entity)

<ListCustomObjectsRequest entity="Contact123"/>

Example Request (Company entity)

<ListCustomObjectsRequest entity="Company123"/>

Example Request (Shared Access)

<ListCustomObjectsRequest account_id="12345" group_id="1" entity="Contact123"/>

Example Response

<ListCustomObjectsResponse>
    <Result>Success</Result>
    <CustomObjects>
        <CustomObject>
            <ObjectID>1</ObjectID>
            <ObjectName>Test Object</ObjectName>
            <ObjectJSON>
                <Object>
                    <PseudoName>attr1</PseudoName>
                    <AttributeValue>text attribute value</AttributeValue>
                </Object>
                <Object>
                    <PseudoName>attr2</PseudoName>
                    <AttributeValue>1</AttributeValue>
                    <MIMEType>image/png</MIMEType>
                    <ImageBase64>data:image/png;base64,iVBORw0KGgoAAAANSUhEUg...</ImageBase64>
                </Object>
                <Object>
                    <PseudoName>attr3</PseudoName>
                    <AttributeValue>2</AttributeValue>
                    <MIMEType>text/plain</MIMEType>
                    <FileBase64>data:text/plain;base64,dGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZw==</FileBase64>
                </Object>
            </ObjectJSON>
            <ObjectDefinitionID>1</ObjectDefinitionID>
            <DefinitionJSON>
                <Name>Test Object</Name>
                <SortByAttribute>Text Attribute</SortByAttribute>
                <SortDirection>asc</SortDirection>
                <MaxObjectsPerEntity>0</MaxObjectsPerEntity>
                <Description>This is a description of the test object</Description>
                <Attributes>
                    <Attribute>
                        <ShowOnInitialLoad>No</ShowOnInitialLoad>
                        <PseudoName>attr1</PseudoName>
                        <MaxLength></MaxLength>
                        <Name>Text Attribute</Name>
                        <Default></Default>
                        <Type>text</Type>
                        <Placeholder></Placeholder>
                    </Attribute>
                    <Attribute>
                        <ShowOnInitialLoad>No</ShowOnInitialLoad>
                        <PseudoName>attr2</PseudoName>
                        <MaxLength></MaxLength>
                        <Name>Image Attribute</Name>
                        <Default></Default>
                        <Type>image</Type>
                        <Placeholder></Placeholder>
                    </Attribute>
                    <Attribute>
                        <ShowOnInitialLoad>No</ShowOnInitialLoad>
                        <PseudoName>attr3</PseudoName>
                        <MaxLength></MaxLength>
                        <Name>File Attribute</Name>
                        <Default></Default>
                        <Type>file</Type>
                        <Placeholder></Placeholder>
                    </Attribute>
                </Attributes>
            </DefinitionJSON>
        </CustomObject>
    </CustomObjects>
</ListCustomObjectsResponse>

Create New Custom Object

This API call adds a new custom object for an entity.

Input

Output

Success or failure.

Example Request

<CreateNewCustomObjectRequest object_definition_id="1" entity="Contact623">
    <ObjectJSON>
        <Object>
            <PseudoName>attr1</PseudoName>
            <AttributeValue>the quick brown fox</AttributeValue>
        </Object>
        <Object>
            <PseudoName>attr2</PseudoName>
            <AttributeValue>1|2|3|4</AttributeValue>
        </Object>
        <Object>
            <PseudoName>attr3</PseudoName>
            <AttributeValue>data:image/png;base64,iVBORw0KGgoAAAANSUhEUg...</AttributeValue>
        </Object>
        <Object>
            <PseudoName>attr4</PseudoName>
            <AttributeValue>data:text/plain;base64,dGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZw==</AttributeValue>
        </Object>
    </ObjectJSON>
</CreateNewCustomObjectRequest>

Example Request (Shared Access)

<CreateNewCustomObjectRequest account_id="12345" group_id="1" object_definition_id="1" entity="Contact623">
    <ObjectJSON>
        <Object>
            <PseudoName>attr1</PseudoName>
            <AttributeValue>the quick brown fox</AttributeValue>
        </Object>
        <Object>
            <PseudoName>attr2</PseudoName>
            <AttributeValue>1|2|3|4</AttributeValue>
        </Object>
    </ObjectJSON>
</CreateNewCustomObjectRequest>

Example Response

<CreateNewCustomObjectResponse>
    <Result>Success</Result>
    <ObjectID>1</ObjectID>
    <ObjectDefinitionID>1</ObjectDefinitionID>
    <Entity>Contact623</Entity>
</CreateNewCustomObjectResponse>

Update Custom Object

This API call updates an existing custom object for an entity.

Input

Output

Success or failure.

Example Request

<UpdateCustomObjectRequest object_id="1" entity="Contact123">
    <ObjectJSON>
        <Object>
            <PseudoName>attr1</PseudoName>
            <AttributeValue>the quick brown fox</AttributeValue>
        </Object>
        <Object>
            <PseudoName>attr2</PseudoName>
            <AttributeValue>1|2|3|4</AttributeValue>
        </Object>
        <Object>
            <PseudoName>attr3</PseudoName>
            <AttributeValue>data:image/png;base64,iVBORw0KGgoAAAANSUhEUg...</AttributeValue>
        </Object>
        <Object>
            <PseudoName>attr4</PseudoName>
            <AttributeValue>data:text/plain;base64,dGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZw==</AttributeValue>
        </Object>
    </ObjectJSON>
</UpdateCustomObjectRequest>

Example Request (Shared Access)

<UpdateCustomObjectRequest account_id="12345" group_id="1" object_id="1" entity="Contact123">
    <ObjectJSON>
        <Object>
            <PseudoName>attr1</PseudoName>
            <AttributeValue>the quick brown fox</AttributeValue>
        </Object>
        <Object>
            <PseudoName>attr2</PseudoName>
            <AttributeValue>1|2|3|4</AttributeValue>
        </Object>
    </ObjectJSON>
</UpdateCustomObjectRequest>

Example Response

<UpdateCustomObjectResponse>
    <Result>Success</Result>
    <ObjectID>1</ObjectID>
    <Entity>Contact123</Entity>
</UpdateCustomObjectResponse>

Delete Custom Object

This API call removes an custom object for an entity.

Input

Output

Success or failure.

Example Request

<DeleteCustomObjectRequest object_id="1" entity="Contact123"/>

Example Request (Shared Access)

<DeleteCustomObjectRequest account_id="12345" group_id="1" object_id="1" entity="Contact123"/>

Example Response

<DeleteCustomObjectResponse>
    <Result>Success</Result>
    <ObjectID>1</ObjectID>
    <Entity>Contact123</Entity>
</DeleteCustomObjectResponse>