API Documentation

In-depth reference documentation for iQmetrix API's.

NAV

OVERVIEW

The Customer Relationship Management (CRM) API gives you a full suite of options to create, modify, or delete customers and customer information, such as address and contact method.

ENDPOINTS

Sandbox: https://crmdemo.iqmetrix.net/v1
Production: https://crm.iqmetrix.net/v1

RESOURCES

Customer

A Customer is a person or organization that buys goods or services from a store or business.

{
    "Id": "659c2a38-d083-4421-9330-46d779702f85",
    "PrimaryName": "Princess",
    "MiddleName": "Ella",
    "FamilyName": "Jasmine",
    "AlternateName": "Jas",
    "CustomerType": "Company",
    "CustomerTypeId": 3,
    "DateOfBirth": "1952-07-23T12:00:00.000",
    "Disabled": true,
    "DoNotContact": true,
    "Notes": "Interested in iPhone 6",
    "Title": "Ms",
    "Version": 1
}
Name Description
Id (GUID) Unique identifier
PrimaryName (String) First name of a given person or the full name of the business, division, organization, etc
MiddleName (String) Middle name. Could also be referred to as Additional name
FamilyName (String) Family name. In the U.S., the last name of a Person
AlternateName (String) Alias or preferred name
CustomerType (String) Name of the CustomerType
CustomerTypeId (Integer) See CustomerType for a list of acceptable values
DateOfBirth (DateTime) Customer’s birth date, stored in UTC but can be provided in shortened form (yyyy-mm-dd)
Disabled (Boolean) A flag to indicate whether or not this Customer is disabled. The Delete operation acts as a Disable operation, as a Customer can not be deleted. When the Disabled flag is set to true, this Customer can still be retrieved and updated normally, defaults to false
DoNotContact (Boolean) A flag to indicate if this Customer is private and not to be used by external systems (such as a marketing system), defaults to true
Notes (String) Any notes related to this Customer
Title (String) Title
Version (Integer) Latest revision number

Address

An Address represents a valid address somewhere on the planet.

{
    "Id": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "AddressType": "Home",
    "AddressTypeId": 2,
    "AttentionTo": "Princess",
    "Country": "Canada",
    "CountryCode": "CA",
    "Default": false,
    "DoNotContact": true,
    "Email": "Jas@princess.ca",
    "Locality": "Mountain View",
    "Notes": "Moved as of April 15 2015",
    "Phone": "(555) 555-5555",
    "PostalCode": "94043",
    "PostOfficeBoxNumber": "P.O. Box 1022",
    "State": "Alberta",
    "StateCode": "AB",
    "StreetAddress1": "1600 Amphitheatre Pkwy",
    "StreetAddress2": "Suite 500",
    "Version": 1
}
Name Description
Id (GUID) Unique identifier
CustomerId (GUID) Unique identifier for the Customer
AddressType (String) Name of the AddressType
AddressTypeId (Integer) See AddressType for a list of acceptable values
AttentionTo (String) Attention To (Attn:)
Country (String) The Country. This value is system-generated and read-only
CountryCode (String) Country in which this address resides. Uses the ISO 3166-1 alpha-2 standard. For a list of acceptable codes, see Getting All Countries
Default (Boolean) A flag to indicate if this address is the default address for the customer
DoNotContact (Boolean) A flag to indicate if this address is private and not to be used by any external systems (such as a marketing system), defaults to true
Email (String) Email
Locality (String) City, Town, Hamlet
Notes (String) Notes related to this Address
Phone (String) Phone number
PostalCode (String) The postal code/zip code
PostOfficeBoxNumber (String) The post office box number for PO box addresses
State (String) The State/Province
StateCode (String(2)) Code for the State in which this address resides. Based off the ISO 3166-2 standard. For a list of acceptable codes, see Getting All Countries
StreetAddress1 (String) The street address
StreetAddress2 (String) The street address
Version (Integer) Latest revision number

ContactMethod

A Contact Method is a method of contacting a Customer.

{
    "Id": "b25dd8b2-a24d-4107-8fbe-9c7b21e18137",
    "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "ContactMethodCategory": "Email",
    "ContactMethodCategoryId": 1,
    "ContactMethodType": "Work phone",
    "ContactMethodTypeId": 5,
    "Default": true,
    "DoNotContact": true,
    "Notes": "After 6pm",
    "Value": "(306) 222-3333",
    "Version": 1
}
Name Description
Id (GUID) Unique identifier
CustomerId (GUID) Unique identifier for the Customer
ContactMethodCategory (String) Name of the ContactMethodCategory
ContactMethodCategoryId (Integer) See ContactMethodCategory for a list of acceptable values
ContactMethodType (String) Name of the ContactMethodType
ContactMethodTypeId (Integer) See ContactMethodType for a list of acceptable values
Default (Boolean) A flag to indicate if this is the default ContactMethod for the Customer
DoNotContact (Boolean) A flag to indicate if this ContactMethod is private and not to be used by any external systems (such as a marketing system), defaults to true
Notes (String) Notes related to this ContactMethod
Value (String) The value representing this ContactMethod
Version (Integer) Latest revision number

CustomerExtension

A CustomerExtension resource is used for adding custom properties to a Customer.

{
    "Id": "74b87ece-5f70-454d-9991-7952127146b0",
    "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "ExtensionType": "ExternalCustomerId",
    "ExtensionTypeId": 2,
    "Value": "66432",
    "Version": 1
}
Name Description  
Id (GUID) Unique identifier  
CustomerId (GUID) Unique identifier for the Customer  
ExtensionType (String) Name of the CustomerExtensionType  
ExtensionTypeId (Integer) Identifier for the CustomerExtensionType  
Value (String) Value  
Version (Integer) Latest revision number  
ExtensionTypeFeature (String) Reserved for future use  

CustomerExtensionType

CustomerExtensionType resources are created by iQmetrix and are used to provide custom properties for the CustomerExtension resource.

[
    {
        "Id": 1,
        "Name": "CorrelationId",
        "DataType": "Integer"
    }
]
Name Description
Id (Integer) Identifier
Name (String) Name
DataType (String) Data type

CustomerFull

CustomerFull is an extension on the Customer resource.

{
    "Id": "659c2a38-d083-4421-9330-46d779702f85",
    "PrimaryName": "Princess",
    "MiddleName": "Ella",
    "FamilyName": "Jasmine",
    "Addresses": [
        {
            "Id": "a08b0640-606a-41f0-901a-facaf50e75dd",
            "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
            "AddressType": "Home",
            "AddressTypeId": 2,
            "AttentionTo": "Princess",
            "Country": "Canada",
            "CountryCode": "CA",
            "Default": false,
            "DoNotContact": true,
            "Email": "Jas@princess.ca",
            "Locality": "Mountain View",
            "Notes": "Moved as of April 15 2015",
            "Phone": "(555) 555-5555",
            "PostalCode": "94043",
            "PostOfficeBoxNumber": "P.O. Box 1022",
            "State": "Alberta",
            "StateCode": "AB",
            "StreetAddress1": "1600 Amphitheatre Pkwy",
            "StreetAddress2": "Suite 500",
            "Version": 1
        }
    ],
    "AlternateName": "Jas",
    "ContactMethods": [
        {
            "Id": "b25dd8b2-a24d-4107-8fbe-9c7b21e18137",
            "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
            "ContactMethodCategory": "Email",
            "ContactMethodCategoryId": 1,
            "ContactMethodType": "Work phone",
            "ContactMethodTypeId": 5,
            "Default": true,
            "DoNotContact": true,
            "Notes": "After 6pm",
            "Value": "(306) 222-3333",
            "Version": 1
        }
    ],
    "CustomerExtensions": [
        {
            "Id": "74b87ece-5f70-454d-9991-7952127146b0",
            "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
            "ExtensionType": "ExternalCustomerId",
            "ExtensionTypeId": 2,
            "Value": "66432",
            "Version": 1
        }
    ],
    "CustomerType": "Company",
    "CustomerTypeId": 3,
    "DateOfBirth": "1952-07-23T12:00:00.000",
    "Disabled": true,
    "DoNotContact": true,
    "MemberOf": [],
    "Notes": "Interested in iPhone 6",
    "RelatedCustomers": [],
    "Title": "Ms",
    "Version": 1
}
Name Description  
Id (GUID) Unique identifier  
PrimaryName (String) First name of a given person or the full name of the business, division, organization, etc  
MiddleName (String) Middle name. Could also be referred to as Additional name  
FamilyName (String) Family name. In the U.S., the last name of a Person  
Addresses (Array[Address]) A collection of Addresses  
AlternateName (String) Alias or preferred name  
ContactMethods (Array[ContactMethod]) A collection of ContactMethods  
CustomerExtensions (Array[CustomerExtension]) A collection of CustomerExtensions  
CustomerType (String) Name of the CustomerType  
CustomerTypeId (Integer) See CustomerType for a list of acceptable values  
DateOfBirth (DateTime) Customer’s birth date, stored in UTC but can be provided in shortened form (yyyy-mm-dd)  
Disabled (Boolean) A flag to indicate whether or not this Customer is disabled. The Delete operation acts as a Disable operation, as a Customer can not be deleted. When the Disabled flag is set to true, this Customer can still be retrieved and updated normally, defaults to false  
DoNotContact (Boolean) A flag to indicate if this Customer is private and not to be used by external systems (such as a marketing system), defaults to true  
MemberOf (Array[object]) A collection of Customers that the Customer is a MemberOf (parent relation)  
Notes (String) Any notes related to this Customer  
RelatedCustomers (Array[object]) A collection of Customers related to the Customer (child relation)  
Title (String) Title  
Version (Integer) Latest revision number  
Documents (Array[object]) Reserved for future use  

CustomerSearch

CustomerSearch is used to search for CustomerFull resources based on a Criteria. A CustomerSearch resource is an extension on the CustomerFull resource.

[
    {
        "Criteria": "bob",
        "Id": "503d1d4a-c974-4286-b4a2-002699e60ad6",
        "PrimaryName": "Robert",
        "MiddleName": "Lee",
        "FamilyName": "Smith",
        "Addresses": [
            {
                "Id": "a08b0640-606a-41f0-901a-facaf50e75dd",
                "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
                "AddressType": "Home",
                "AddressTypeId": 2,
                "AttentionTo": "Princess",
                "Country": "Canada",
                "CountryCode": "CA",
                "Default": false,
                "DoNotContact": true,
                "Email": "Jas@princess.ca",
                "Locality": "Mountain View",
                "Notes": "Moved as of April 15 2015",
                "Phone": "(555) 555-5555",
                "PostalCode": "94043",
                "PostOfficeBoxNumber": "P.O. Box 1022",
                "State": "Alberta",
                "StateCode": "AB",
                "StreetAddress1": "1600 Amphitheatre Pkwy",
                "StreetAddress2": "Suite 500",
                "Version": 1
            }
        ],
        "AlternateName": "Bob",
        "ContactMethods": [
            {
                "Id": "b25dd8b2-a24d-4107-8fbe-9c7b21e18137",
                "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
                "ContactMethodCategory": "Email",
                "ContactMethodCategoryId": 1,
                "ContactMethodType": "Work phone",
                "ContactMethodTypeId": 5,
                "Default": true,
                "DoNotContact": true,
                "Notes": "After 6pm",
                "Value": "(306) 222-3333",
                "Version": 1
            }
        ],
        "CustomerExtensions": [
            {
                "Id": "74b87ece-5f70-454d-9991-7952127146b0",
                "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
                "ExtensionType": "ExternalCustomerId",
                "ExtensionTypeId": 2,
                "Value": "66432",
                "Version": 1
            }
        ],
        "CustomerType": "Company",
        "CustomerTypeId": 3,
        "DateOfBirth": "1952-07-23T12:00:00.000",
        "Disabled": true,
        "DoNotContact": true,
        "MemberOf": [],
        "Notes": "Interested in iPhone 6",
        "RelatedCustomers": [],
        "Title": "Mr",
        "Version": 1
    }
]
Name Description
Criteria (String) The criteria used to seach for the Customer
Id (GUID) Unique identifier
PrimaryName (String) First name of a given person or the full name of the business, division, organization, etc
MiddleName (String) Middle name. Could also be referred to as Additional name
FamilyName (String) Family name. In the U.S., the last name of a Person
Addresses (Array[Address]) A collection of Addresses
AlternateName (String) Alias or preferred name
ContactMethods (Array[ContactMethod]) A collection of ContactMethods
CustomerExtensions (Array[CustomerExtension]) A collection of CustomerExtensions
CustomerType (String) Name of the CustomerType
CustomerTypeId (Integer) See CustomerType for a list of acceptable values
DateOfBirth (DateTime) Customer’s birth date, stored in UTC but can be provided in shortened form (yyyy-mm-dd)
Disabled (Boolean) A flag to indicate whether or not this Customer is disabled. The Delete operation acts as a Disable operation, as a Customer can not be deleted. When the Disabled flag is set to true, this Customer can still be retrieved and updated normally, defaults to false
DoNotContact (Boolean) A flag to indicate if this Customer is private and not to be used by external systems (such as a marketing system), defaults to true
MemberOf (Array[object]) A collection of Customers that the Customer is a MemberOf (parent relation)
Notes (String) Any notes related to this Customer
RelatedCustomers (Array[object]) A collection of Customers related to the Customer (child relation)
Title (String) Title
Version (Integer) Latest revision number

ENUMERATIONS

AddressType

Id Name Description
1 None Customer did not provide an Address
2 Home Customer’s Home Address
3 Shipping Address to be Shipped to
4 Office Customer’s Work (Office) Address
5 Other Other

ContactMethodCategory

Id Name
1 Phone
2 Email
3 Other

ContactMethodType

Category Contact Method Id
Dropship Facebook 15
Dropship LinkedIn 16
Dropship Other 17
Dropship Skype 13
Dropship Twitter 14
Dropship Website 12
Email Home 9
Email Other 11
Email Work 10
Phone Company 4
Phone Home 1
Phone Home Fax 6
Phone Mobile 3
Phone Other 8
Phone Pager 5
Phone Work 2
Phone Work Fax 7

CustomerType

Id Name
1 None
2 Person
3 Company

REQUESTS

GET All Customers

Request

GET /Companies({CompanyId})/Customers

Example Request

GET /Companies(14146)/Customers
Authorization: Bearer (Access Token)
Accept: application/json

curl -X GET "https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json"
static IRestResponse GettingAllCustomers()
{
    var client = new RestClient("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers");
    var request = new RestRequest(Method.GET);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 

    

    return client.Execute(request);
}

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse GettingAllCustomers() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.get 'https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
[
    {
        "Id": "659c2a38-d083-4421-9330-46d779702f85",
        "PrimaryName": "Princess",
        "MiddleName": "Ella",
        "FamilyName": "Jasmine",
        "AlternateName": "Jas",
        "CustomerType": "Company",
        "CustomerTypeId": 3,
        "DateOfBirth": "1952-07-23T12:00:00.000",
        "Disabled": true,
        "DoNotContact": true,
        "Notes": "Interested in iPhone 6",
        "Title": "Ms",
        "Version": 1
    }
]

Array[Customer]

POST a Customer

Request

POST /Companies({CompanyId})/Customers

Example Request

POST /Companies(14146)/Customers
Authorization: Bearer (Access Token)
Accept: application/json
Content-Type: application/json

{
    "PrimaryName": "Princess",
    "MiddleName": "Ella",
    "FamilyName": "Jasmine",
    "AlternateName": "Jas",
    "CustomerTypeId": 3,
    "DateOfBirth": "1952-07-23T12:00:00.000",
    "Disabled": true,
    "DoNotContact": true,
    "Notes": "Interested in iPhone 6",
    "Title": "Ms"
}
curl -X POST "https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json" -H "Content-Type: application/json" -d '{
    "PrimaryName": "Princess",
    "MiddleName": "Ella",
    "FamilyName": "Jasmine",
    "AlternateName": "Jas",
    "CustomerTypeId": 3,
    "DateOfBirth": "1952-07-23T12:00:00.000",
    "Disabled": true,
    "DoNotContact": true,
    "Notes": "Interested in iPhone 6",
    "Title": "Ms"
}'
static IRestResponse CreatingACustomer()
{
    var client = new RestClient("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers");
    var request = new RestRequest(Method.POST);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 
    request.AddHeader("Content-Type", "application/json"); 

     request.AddParameter("application/json", "{\"PrimaryName\":\"Princess\",\"MiddleName\":\"Ella\",\"FamilyName\":\"Jasmine\",\"AlternateName\":\"Jas\",\"CustomerTypeId\":3,\"DateOfBirth\":\"1952-07-23T12:00:00.000\",\"Disabled\":true,\"DoNotContact\":true,\"Notes\":\"Interested in iPhone 6\",\"Title\":\"Ms\"}", ParameterType.RequestBody);

    return client.Execute(request);
}
import org.apache.http.entity.StringEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse CreatingACustomer() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpPost request = new HttpPost("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    request.addHeader("Content-Type", "application/json"); 
    StringEntity body = new StringEntity("{\"PrimaryName\":\"Princess\",\"MiddleName\":\"Ella\",\"FamilyName\":\"Jasmine\",\"AlternateName\":\"Jas\",\"CustomerTypeId\":3,\"DateOfBirth\":\"1952-07-23T12:00:00.000\",\"Disabled\":true,\"DoNotContact\":true,\"Notes\":\"Interested in iPhone 6\",\"Title\":\"Ms\"}");
    request.setEntity(body);
    
    return httpClient.execute(request);
}
require 'rest-client'

body = "{\"PrimaryName\":\"Princess\",\"MiddleName\":\"Ella\",\"FamilyName\":\"Jasmine\",\"AlternateName\":\"Jas\",\"CustomerTypeId\":3,\"DateOfBirth\":\"1952-07-23T12:00:00.000\",\"Disabled\":true,\"DoNotContact\":true,\"Notes\":\"Interested in iPhone 6\",\"Title\":\"Ms\"}";

response = RestClient.post 'https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers', body, {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
     :'Content-Type' => 'application/json',
    } 

puts response

URI Parameters

Request Parameters

Response Parameters

Example Response

HTTP 201 Content-Type: application/json

GET a Customer

Request

GET /Companies({CompanyId})/Customers({CustomerId})

Example Request

GET /Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)
Authorization: Bearer (Access Token)
Accept: application/json

curl -X GET "https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json"
static IRestResponse GettingACustomer()
{
    var client = new RestClient("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)");
    var request = new RestRequest(Method.GET);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 

    

    return client.Execute(request);
}

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse GettingACustomer() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.get 'https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
{
    "Id": "659c2a38-d083-4421-9330-46d779702f85",
    "PrimaryName": "Princess",
    "MiddleName": "Ella",
    "FamilyName": "Jasmine",
    "AlternateName": "Jas",
    "CustomerType": "Company",
    "CustomerTypeId": 3,
    "DateOfBirth": "1952-07-23T12:00:00.000",
    "Disabled": true,
    "DoNotContact": true,
    "Notes": "Interested in iPhone 6",
    "Title": "Ms",
    "Version": 1
}

Customer

PUT a Customer

Request

PUT /Companies({CompanyId})/Customers({CustomerId})

Example Request

PUT /Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)
Authorization: Bearer (Access Token)
Accept: application/json
Content-Type: application/json

{
    "Id": "659c2a38-d083-4421-9330-46d779702f85",
    "PrimaryName": "Princess",
    "MiddleName": "Ella",
    "FamilyName": "Jasmine",
    "AlternateName": "Jas",
    "CustomerType": "Company",
    "CustomerTypeId": 3,
    "DateOfBirth": "1952-07-23T12:00:00.000",
    "Disabled": true,
    "DoNotContact": true,
    "Notes": "Interested in iPhone 6",
    "Title": "Ms",
    "Version": 1
}
curl -X PUT "https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json" -H "Content-Type: application/json" -d '{
    "Id": "659c2a38-d083-4421-9330-46d779702f85",
    "PrimaryName": "Princess",
    "MiddleName": "Ella",
    "FamilyName": "Jasmine",
    "AlternateName": "Jas",
    "CustomerType": "Company",
    "CustomerTypeId": 3,
    "DateOfBirth": "1952-07-23T12:00:00.000",
    "Disabled": true,
    "DoNotContact": true,
    "Notes": "Interested in iPhone 6",
    "Title": "Ms",
    "Version": 1
}'
static IRestResponse UpdatingACustomer()
{
    var client = new RestClient("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)");
    var request = new RestRequest(Method.PUT);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 
    request.AddHeader("Content-Type", "application/json"); 

     request.AddParameter("application/json", "{\"Id\":\"659c2a38-d083-4421-9330-46d779702f85\",\"PrimaryName\":\"Princess\",\"MiddleName\":\"Ella\",\"FamilyName\":\"Jasmine\",\"AlternateName\":\"Jas\",\"CustomerType\":\"Company\",\"CustomerTypeId\":3,\"DateOfBirth\":\"1952-07-23T12:00:00.000\",\"Disabled\":true,\"DoNotContact\":true,\"Notes\":\"Interested in iPhone 6\",\"Title\":\"Ms\",\"Version\":1}", ParameterType.RequestBody);

    return client.Execute(request);
}
import org.apache.http.entity.StringEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPut;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse UpdatingACustomer() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpPut request = new HttpPut("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    request.addHeader("Content-Type", "application/json"); 
    StringEntity body = new StringEntity("{\"Id\":\"659c2a38-d083-4421-9330-46d779702f85\",\"PrimaryName\":\"Princess\",\"MiddleName\":\"Ella\",\"FamilyName\":\"Jasmine\",\"AlternateName\":\"Jas\",\"CustomerType\":\"Company\",\"CustomerTypeId\":3,\"DateOfBirth\":\"1952-07-23T12:00:00.000\",\"Disabled\":true,\"DoNotContact\":true,\"Notes\":\"Interested in iPhone 6\",\"Title\":\"Ms\",\"Version\":1}");
    request.setEntity(body);
    
    return httpClient.execute(request);
}
require 'rest-client'

body = "{\"Id\":\"659c2a38-d083-4421-9330-46d779702f85\",\"PrimaryName\":\"Princess\",\"MiddleName\":\"Ella\",\"FamilyName\":\"Jasmine\",\"AlternateName\":\"Jas\",\"CustomerType\":\"Company\",\"CustomerTypeId\":3,\"DateOfBirth\":\"1952-07-23T12:00:00.000\",\"Disabled\":true,\"DoNotContact\":true,\"Notes\":\"Interested in iPhone 6\",\"Title\":\"Ms\",\"Version\":1}";

response = RestClient.put 'https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)', body, {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
     :'Content-Type' => 'application/json',
    } 

puts response

URI Parameters

Request Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
{
    "Id": "659c2a38-d083-4421-9330-46d779702f85",
    "PrimaryName": "Princess",
    "MiddleName": "Ella",
    "FamilyName": "Jasmine",
    "AlternateName": "Jas",
    "CustomerType": "Company",
    "CustomerTypeId": 3,
    "DateOfBirth": "1952-07-23T12:00:00.000",
    "Disabled": true,
    "DoNotContact": true,
    "Notes": "Interested in iPhone 6",
    "Title": "Ms",
    "Version": 1
}

Customer

DELETE a Customer

Request

DELETE /Companies({CompanyId})/Customers({CustomerId})

Example Request

DELETE /Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)
Authorization: Bearer (Access Token)

curl -X DELETE "https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)" -H "Authorization: Bearer (Access Token)"
static IRestResponse DeletingACustomer()
{
    var client = new RestClient("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)");
    var request = new RestRequest(Method.DELETE);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 

    

    return client.Execute(request);
}

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpDelete;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse DeletingACustomer() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpDelete request = new HttpDelete("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.delete 'https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)', {
     :'Authorization' => 'Bearer (Access Token)',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json

GET All Addresses for a Customer

Request

GET /Companies({CompanyId})/Customers({CustomerId})/Addresses

Example Request

GET /Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/Addresses
Authorization: Bearer (Access Token)
Accept: application/json

curl -X GET "https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/Addresses" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json"
static IRestResponse GettingAllAddressesForACustomer()
{
    var client = new RestClient("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/Addresses");
    var request = new RestRequest(Method.GET);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 

    

    return client.Execute(request);
}

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse GettingAllAddressesForACustomer() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/Addresses");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.get 'https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/Addresses', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
[
    {
        "Id": "a08b0640-606a-41f0-901a-facaf50e75dd",
        "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
        "AddressType": "Home",
        "AddressTypeId": 2,
        "AttentionTo": "Princess",
        "Country": "Canada",
        "CountryCode": "CA",
        "Default": false,
        "DoNotContact": true,
        "Email": "Jas@princess.ca",
        "Locality": "Mountain View",
        "Notes": "Moved as of April 15 2015",
        "Phone": "(555) 555-5555",
        "PostalCode": "94043",
        "PostOfficeBoxNumber": "P.O. Box 1022",
        "State": "Alberta",
        "StateCode": "AB",
        "StreetAddress1": "1600 Amphitheatre Pkwy",
        "StreetAddress2": "Suite 500",
        "Version": 1
    }
]

Array[Address]

POST a Customer Address

Request

POST /Companies({CompanyId})/Customers({CustomerId})/Addresses

Example Request

POST /Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/Addresses
Authorization: Bearer (Access Token)
Accept: application/json
Content-Type: application/json

{
    "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "AddressTypeId": 2,
    "AttentionTo": "Princess",
    "CountryCode": "CA",
    "Default": false,
    "DoNotContact": true,
    "Email": "Jas@princess.ca",
    "Locality": "Mountain View",
    "Notes": "Moved as of April 15 2015",
    "Phone": "(555) 555-5555",
    "PostalCode": "94043",
    "PostOfficeBoxNumber": "P.O. Box 1022",
    "StateCode": "AB",
    "StreetAddress1": "1600 Amphitheatre Pkwy",
    "StreetAddress2": "Suite 500"
}
curl -X POST "https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/Addresses" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json" -H "Content-Type: application/json" -d '{
    "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "AddressTypeId": 2,
    "AttentionTo": "Princess",
    "CountryCode": "CA",
    "Default": false,
    "DoNotContact": true,
    "Email": "Jas@princess.ca",
    "Locality": "Mountain View",
    "Notes": "Moved as of April 15 2015",
    "Phone": "(555) 555-5555",
    "PostalCode": "94043",
    "PostOfficeBoxNumber": "P.O. Box 1022",
    "StateCode": "AB",
    "StreetAddress1": "1600 Amphitheatre Pkwy",
    "StreetAddress2": "Suite 500"
}'
static IRestResponse AddingACustomerAddress()
{
    var client = new RestClient("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/Addresses");
    var request = new RestRequest(Method.POST);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 
    request.AddHeader("Content-Type", "application/json"); 

     request.AddParameter("application/json", "{\"CustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"AddressTypeId\":2,\"AttentionTo\":\"Princess\",\"CountryCode\":\"CA\",\"Default\":false,\"DoNotContact\":true,\"Email\":\"Jas@princess.ca\",\"Locality\":\"Mountain View\",\"Notes\":\"Moved as of April 15 2015\",\"Phone\":\"(555) 555-5555\",\"PostalCode\":\"94043\",\"PostOfficeBoxNumber\":\"P.O. Box 1022\",\"StateCode\":\"AB\",\"StreetAddress1\":\"1600 Amphitheatre Pkwy\",\"StreetAddress2\":\"Suite 500\"}", ParameterType.RequestBody);

    return client.Execute(request);
}
import org.apache.http.entity.StringEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse AddingACustomerAddress() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpPost request = new HttpPost("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/Addresses");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    request.addHeader("Content-Type", "application/json"); 
    StringEntity body = new StringEntity("{\"CustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"AddressTypeId\":2,\"AttentionTo\":\"Princess\",\"CountryCode\":\"CA\",\"Default\":false,\"DoNotContact\":true,\"Email\":\"Jas@princess.ca\",\"Locality\":\"Mountain View\",\"Notes\":\"Moved as of April 15 2015\",\"Phone\":\"(555) 555-5555\",\"PostalCode\":\"94043\",\"PostOfficeBoxNumber\":\"P.O. Box 1022\",\"StateCode\":\"AB\",\"StreetAddress1\":\"1600 Amphitheatre Pkwy\",\"StreetAddress2\":\"Suite 500\"}");
    request.setEntity(body);
    
    return httpClient.execute(request);
}
require 'rest-client'

body = "{\"CustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"AddressTypeId\":2,\"AttentionTo\":\"Princess\",\"CountryCode\":\"CA\",\"Default\":false,\"DoNotContact\":true,\"Email\":\"Jas@princess.ca\",\"Locality\":\"Mountain View\",\"Notes\":\"Moved as of April 15 2015\",\"Phone\":\"(555) 555-5555\",\"PostalCode\":\"94043\",\"PostOfficeBoxNumber\":\"P.O. Box 1022\",\"StateCode\":\"AB\",\"StreetAddress1\":\"1600 Amphitheatre Pkwy\",\"StreetAddress2\":\"Suite 500\"}";

response = RestClient.post 'https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/Addresses', body, {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
     :'Content-Type' => 'application/json',
    } 

puts response

URI Parameters

Request Parameters

Response Parameters

Example Response

HTTP 201 Content-Type: application/json

GET a Customer Address

Request

GET /Companies({CompanyId})/Customers({CustomerId})/Addresses({AddressId})

Example Request

GET /Companies(14146)/Customers(902cdc91-65f4-4c7d-b336-5f291849f2fe)/Addresses(a08b0640-606a-41f0-901a-facaf50e75dd)
Authorization: Bearer (Access Token)
Accept: application/json

curl -X GET "https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(902cdc91-65f4-4c7d-b336-5f291849f2fe)/Addresses(a08b0640-606a-41f0-901a-facaf50e75dd)" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json"
static IRestResponse GettingACustomerAddress()
{
    var client = new RestClient("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(902cdc91-65f4-4c7d-b336-5f291849f2fe)/Addresses(a08b0640-606a-41f0-901a-facaf50e75dd)");
    var request = new RestRequest(Method.GET);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 

    

    return client.Execute(request);
}

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse GettingACustomerAddress() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(902cdc91-65f4-4c7d-b336-5f291849f2fe)/Addresses(a08b0640-606a-41f0-901a-facaf50e75dd)");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.get 'https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(902cdc91-65f4-4c7d-b336-5f291849f2fe)/Addresses(a08b0640-606a-41f0-901a-facaf50e75dd)', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
{
    "Id": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "AddressType": "Home",
    "AddressTypeId": 2,
    "AttentionTo": "Princess",
    "Country": "Canada",
    "CountryCode": "CA",
    "Default": false,
    "DoNotContact": true,
    "Email": "Jas@princess.ca",
    "Locality": "Mountain View",
    "Notes": "Moved as of April 15 2015",
    "Phone": "(555) 555-5555",
    "PostalCode": "94043",
    "PostOfficeBoxNumber": "P.O. Box 1022",
    "State": "Alberta",
    "StateCode": "AB",
    "StreetAddress1": "1600 Amphitheatre Pkwy",
    "StreetAddress2": "Suite 500",
    "Version": 1
}

Address

PUT a Customer Address

Request

PUT /Companies({CompanyId})/Customers({CustomerId})/Addresses({AddressId})

Example Request

PUT /Companies(14146)/Customers(902cdc91-65f4-4c7d-b336-5f291849f2fe)/Addresses(a08b0640-606a-41f0-901a-facaf50e75dd)
Authorization: Bearer (Access Token)
Accept: application/json
Content-Type: application/json

{
    "Id": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "AddressType": "Home",
    "AddressTypeId": 2,
    "AttentionTo": "Princess",
    "Country": "Canada",
    "CountryCode": "CA",
    "Default": false,
    "DoNotContact": true,
    "Email": "Jas@princess.ca",
    "Locality": "Mountain View",
    "Notes": "Moved as of April 15 2015",
    "Phone": "(555) 555-5555",
    "PostalCode": "94043",
    "PostOfficeBoxNumber": "P.O. Box 1022",
    "State": "Alberta",
    "StateCode": "AB",
    "StreetAddress1": "1600 Amphitheatre Pkwy",
    "StreetAddress2": "Suite 500",
    "Version": 1
}
curl -X PUT "https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(902cdc91-65f4-4c7d-b336-5f291849f2fe)/Addresses(a08b0640-606a-41f0-901a-facaf50e75dd)" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json" -H "Content-Type: application/json" -d '{
    "Id": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "AddressType": "Home",
    "AddressTypeId": 2,
    "AttentionTo": "Princess",
    "Country": "Canada",
    "CountryCode": "CA",
    "Default": false,
    "DoNotContact": true,
    "Email": "Jas@princess.ca",
    "Locality": "Mountain View",
    "Notes": "Moved as of April 15 2015",
    "Phone": "(555) 555-5555",
    "PostalCode": "94043",
    "PostOfficeBoxNumber": "P.O. Box 1022",
    "State": "Alberta",
    "StateCode": "AB",
    "StreetAddress1": "1600 Amphitheatre Pkwy",
    "StreetAddress2": "Suite 500",
    "Version": 1
}'
static IRestResponse UpdatingACustomerAddress()
{
    var client = new RestClient("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(902cdc91-65f4-4c7d-b336-5f291849f2fe)/Addresses(a08b0640-606a-41f0-901a-facaf50e75dd)");
    var request = new RestRequest(Method.PUT);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 
    request.AddHeader("Content-Type", "application/json"); 

     request.AddParameter("application/json", "{\"Id\":\"a08b0640-606a-41f0-901a-facaf50e75dd\",\"CustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"AddressType\":\"Home\",\"AddressTypeId\":2,\"AttentionTo\":\"Princess\",\"Country\":\"Canada\",\"CountryCode\":\"CA\",\"Default\":false,\"DoNotContact\":true,\"Email\":\"Jas@princess.ca\",\"Locality\":\"Mountain View\",\"Notes\":\"Moved as of April 15 2015\",\"Phone\":\"(555) 555-5555\",\"PostalCode\":\"94043\",\"PostOfficeBoxNumber\":\"P.O. Box 1022\",\"State\":\"Alberta\",\"StateCode\":\"AB\",\"StreetAddress1\":\"1600 Amphitheatre Pkwy\",\"StreetAddress2\":\"Suite 500\",\"Version\":1}", ParameterType.RequestBody);

    return client.Execute(request);
}
import org.apache.http.entity.StringEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPut;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse UpdatingACustomerAddress() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpPut request = new HttpPut("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(902cdc91-65f4-4c7d-b336-5f291849f2fe)/Addresses(a08b0640-606a-41f0-901a-facaf50e75dd)");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    request.addHeader("Content-Type", "application/json"); 
    StringEntity body = new StringEntity("{\"Id\":\"a08b0640-606a-41f0-901a-facaf50e75dd\",\"CustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"AddressType\":\"Home\",\"AddressTypeId\":2,\"AttentionTo\":\"Princess\",\"Country\":\"Canada\",\"CountryCode\":\"CA\",\"Default\":false,\"DoNotContact\":true,\"Email\":\"Jas@princess.ca\",\"Locality\":\"Mountain View\",\"Notes\":\"Moved as of April 15 2015\",\"Phone\":\"(555) 555-5555\",\"PostalCode\":\"94043\",\"PostOfficeBoxNumber\":\"P.O. Box 1022\",\"State\":\"Alberta\",\"StateCode\":\"AB\",\"StreetAddress1\":\"1600 Amphitheatre Pkwy\",\"StreetAddress2\":\"Suite 500\",\"Version\":1}");
    request.setEntity(body);
    
    return httpClient.execute(request);
}
require 'rest-client'

body = "{\"Id\":\"a08b0640-606a-41f0-901a-facaf50e75dd\",\"CustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"AddressType\":\"Home\",\"AddressTypeId\":2,\"AttentionTo\":\"Princess\",\"Country\":\"Canada\",\"CountryCode\":\"CA\",\"Default\":false,\"DoNotContact\":true,\"Email\":\"Jas@princess.ca\",\"Locality\":\"Mountain View\",\"Notes\":\"Moved as of April 15 2015\",\"Phone\":\"(555) 555-5555\",\"PostalCode\":\"94043\",\"PostOfficeBoxNumber\":\"P.O. Box 1022\",\"State\":\"Alberta\",\"StateCode\":\"AB\",\"StreetAddress1\":\"1600 Amphitheatre Pkwy\",\"StreetAddress2\":\"Suite 500\",\"Version\":1}";

response = RestClient.put 'https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(902cdc91-65f4-4c7d-b336-5f291849f2fe)/Addresses(a08b0640-606a-41f0-901a-facaf50e75dd)', body, {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
     :'Content-Type' => 'application/json',
    } 

puts response

URI Parameters

Request Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
{
    "Id": "a08b0640-606a-41f0-901a-facaf50e75dd",
    "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "AddressType": "Home",
    "AddressTypeId": 2,
    "AttentionTo": "Princess",
    "Country": "Canada",
    "CountryCode": "CA",
    "Default": false,
    "DoNotContact": true,
    "Email": "Jas@princess.ca",
    "Locality": "Mountain View",
    "Notes": "Moved as of April 15 2015",
    "Phone": "(555) 555-5555",
    "PostalCode": "94043",
    "PostOfficeBoxNumber": "P.O. Box 1022",
    "State": "Alberta",
    "StateCode": "AB",
    "StreetAddress1": "1600 Amphitheatre Pkwy",
    "StreetAddress2": "Suite 500",
    "Version": 1
}

Address

DELETE an Address from a Customer

Request

DELETE /Companies({CompanyId})/Customers({CustomerId})/Addresses({AddressId})

Example Request

DELETE /Companies(14146)/Customers(902cdc91-65f4-4c7d-b336-5f291849f2fe)/Addresses(a08b0640-606a-41f0-901a-facaf50e75dd)
Authorization: Bearer (Access Token)

curl -X DELETE "https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(902cdc91-65f4-4c7d-b336-5f291849f2fe)/Addresses(a08b0640-606a-41f0-901a-facaf50e75dd)" -H "Authorization: Bearer (Access Token)"
static IRestResponse RemovingAnAddressFromACustomer()
{
    var client = new RestClient("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(902cdc91-65f4-4c7d-b336-5f291849f2fe)/Addresses(a08b0640-606a-41f0-901a-facaf50e75dd)");
    var request = new RestRequest(Method.DELETE);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 

    

    return client.Execute(request);
}

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpDelete;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse RemovingAnAddressFromACustomer() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpDelete request = new HttpDelete("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(902cdc91-65f4-4c7d-b336-5f291849f2fe)/Addresses(a08b0640-606a-41f0-901a-facaf50e75dd)");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.delete 'https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(902cdc91-65f4-4c7d-b336-5f291849f2fe)/Addresses(a08b0640-606a-41f0-901a-facaf50e75dd)', {
     :'Authorization' => 'Bearer (Access Token)',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json

GET all Customer Extension Types

Request

GET /Companies({CompanyId})/CustomerExtensionTypes

Example Request

GET /Companies(14146)/CustomerExtensionTypes
Authorization: Bearer (Access Token)
Accept: application/json

curl -X GET "https://crmdemo.iqmetrix.net/v1/Companies(14146)/CustomerExtensionTypes" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json"
static IRestResponse GettingAllCustomerExtensionTypes()
{
    var client = new RestClient("https://crmdemo.iqmetrix.net/v1/Companies(14146)/CustomerExtensionTypes");
    var request = new RestRequest(Method.GET);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 

    

    return client.Execute(request);
}

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse GettingAllCustomerExtensionTypes() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://crmdemo.iqmetrix.net/v1/Companies(14146)/CustomerExtensionTypes");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.get 'https://crmdemo.iqmetrix.net/v1/Companies(14146)/CustomerExtensionTypes', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
[
    {
        "Id": 1,
        "Name": "CorrelationId",
        "DataType": "Integer"
    }
]

Array[CustomerExtensionType]

POST a Customer Extension

Request

POST /Companies({CompanyId})/Customers({CustomerId})/CustomerExtensions

Example Request

POST /Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/CustomerExtensions
Authorization: Bearer (Access Token)
Accept: application/json
Content-Type: application/json

{
    "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "ExtensionTypeId": 2,
    "Value": "66432"
}
curl -X POST "https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/CustomerExtensions" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json" -H "Content-Type: application/json" -d '{
    "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "ExtensionTypeId": 2,
    "Value": "66432"
}'
static IRestResponse CreatingACustomerExtension()
{
    var client = new RestClient("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/CustomerExtensions");
    var request = new RestRequest(Method.POST);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 
    request.AddHeader("Content-Type", "application/json"); 

     request.AddParameter("application/json", "{\"CustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"ExtensionTypeId\":2,\"Value\":\"66432\"}", ParameterType.RequestBody);

    return client.Execute(request);
}
import org.apache.http.entity.StringEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse CreatingACustomerExtension() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpPost request = new HttpPost("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/CustomerExtensions");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    request.addHeader("Content-Type", "application/json"); 
    StringEntity body = new StringEntity("{\"CustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"ExtensionTypeId\":2,\"Value\":\"66432\"}");
    request.setEntity(body);
    
    return httpClient.execute(request);
}
require 'rest-client'

body = "{\"CustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"ExtensionTypeId\":2,\"Value\":\"66432\"}";

response = RestClient.post 'https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/CustomerExtensions', body, {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
     :'Content-Type' => 'application/json',
    } 

puts response

URI Parameters

Request Parameters

Response Parameters

Example Response

HTTP 201 Content-Type: application/json
{
    "Id": "74b87ece-5f70-454d-9991-7952127146b0",
    "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "ExtensionType": "ExternalCustomerId",
    "ExtensionTypeId": 2,
    "Value": "66432",
    "Version": 1
}

CustomerExtension

GET a Customer Extension

Request

GET /Companies({CompanyId})/Customers({CustomerId})/CustomerExtensions({CustomerExtensionId})

Example Request

GET /Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/CustomerExtensions(74b87ece-5f70-454d-9991-7952127146b0)
Authorization: Bearer (Access Token)
Accept: application/json

curl -X GET "https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/CustomerExtensions(74b87ece-5f70-454d-9991-7952127146b0)" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json"
static IRestResponse GettingACustomerExtension()
{
    var client = new RestClient("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/CustomerExtensions(74b87ece-5f70-454d-9991-7952127146b0)");
    var request = new RestRequest(Method.GET);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 

    

    return client.Execute(request);
}

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse GettingACustomerExtension() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/CustomerExtensions(74b87ece-5f70-454d-9991-7952127146b0)");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.get 'https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/CustomerExtensions(74b87ece-5f70-454d-9991-7952127146b0)', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
{
    "Id": "74b87ece-5f70-454d-9991-7952127146b0",
    "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "ExtensionType": "ExternalCustomerId",
    "ExtensionTypeId": 2,
    "Value": "66432",
    "Version": 1
}

CustomerExtension

PUT a Customer Extension

Request

PUT /Companies({CompanyId})/Customers({CustomerId})/CustomerExtensions({CustomerExtensionId})

Example Request

PUT /Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/CustomerExtensions(74b87ece-5f70-454d-9991-7952127146b0)
Authorization: Bearer (Access Token)
Accept: application/json
Content-Type: application/json

{
    "Id": "74b87ece-5f70-454d-9991-7952127146b0",
    "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "ExtensionType": "ExternalCustomerId",
    "ExtensionTypeId": 2,
    "Value": "66432",
    "Version": 1
}
curl -X PUT "https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/CustomerExtensions(74b87ece-5f70-454d-9991-7952127146b0)" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json" -H "Content-Type: application/json" -d '{
    "Id": "74b87ece-5f70-454d-9991-7952127146b0",
    "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "ExtensionType": "ExternalCustomerId",
    "ExtensionTypeId": 2,
    "Value": "66432",
    "Version": 1
}'
static IRestResponse UpdatingACustomerExtension()
{
    var client = new RestClient("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/CustomerExtensions(74b87ece-5f70-454d-9991-7952127146b0)");
    var request = new RestRequest(Method.PUT);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 
    request.AddHeader("Content-Type", "application/json"); 

     request.AddParameter("application/json", "{\"Id\":\"74b87ece-5f70-454d-9991-7952127146b0\",\"CustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"ExtensionType\":\"ExternalCustomerId\",\"ExtensionTypeId\":2,\"Value\":\"66432\",\"Version\":1}", ParameterType.RequestBody);

    return client.Execute(request);
}
import org.apache.http.entity.StringEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPut;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse UpdatingACustomerExtension() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpPut request = new HttpPut("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/CustomerExtensions(74b87ece-5f70-454d-9991-7952127146b0)");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    request.addHeader("Content-Type", "application/json"); 
    StringEntity body = new StringEntity("{\"Id\":\"74b87ece-5f70-454d-9991-7952127146b0\",\"CustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"ExtensionType\":\"ExternalCustomerId\",\"ExtensionTypeId\":2,\"Value\":\"66432\",\"Version\":1}");
    request.setEntity(body);
    
    return httpClient.execute(request);
}
require 'rest-client'

body = "{\"Id\":\"74b87ece-5f70-454d-9991-7952127146b0\",\"CustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"ExtensionType\":\"ExternalCustomerId\",\"ExtensionTypeId\":2,\"Value\":\"66432\",\"Version\":1}";

response = RestClient.put 'https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/CustomerExtensions(74b87ece-5f70-454d-9991-7952127146b0)', body, {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
     :'Content-Type' => 'application/json',
    } 

puts response

URI Parameters

Request Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
{
    "Id": "74b87ece-5f70-454d-9991-7952127146b0",
    "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "ExtensionType": "ExternalCustomerId",
    "ExtensionTypeId": 2,
    "Value": "66432",
    "Version": 1
}

CustomerExtension

DELETE a Customer Extension

Request

DELETE /Companies({CompanyId})/Customers({CustomerId})/CustomerExtensions({CustomerExtensionId})

Example Request

DELETE /Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/CustomerExtensions(74b87ece-5f70-454d-9991-7952127146b0)
Authorization: Bearer (Access Token)

curl -X DELETE "https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/CustomerExtensions(74b87ece-5f70-454d-9991-7952127146b0)" -H "Authorization: Bearer (Access Token)"
static IRestResponse DeletingACustomerExtension()
{
    var client = new RestClient("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/CustomerExtensions(74b87ece-5f70-454d-9991-7952127146b0)");
    var request = new RestRequest(Method.DELETE);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 

    

    return client.Execute(request);
}

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpDelete;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse DeletingACustomerExtension() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpDelete request = new HttpDelete("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/CustomerExtensions(74b87ece-5f70-454d-9991-7952127146b0)");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.delete 'https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/CustomerExtensions(74b87ece-5f70-454d-9991-7952127146b0)', {
     :'Authorization' => 'Bearer (Access Token)',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json

POST a Full Customer

Request

POST /Companies({CompanyId})/CustomerFull

Example Request

POST /Companies(14146)/CustomerFull
Authorization: Bearer (Access Token)
Accept: application/json
Content-Type: application/json

{
    "PrimaryName": "Princess",
    "MiddleName": "Ella",
    "FamilyName": "Jasmine",
    "Addresses": [
        {
            "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
            "AddressTypeId": 2,
            "AttentionTo": "Princess",
            "CountryCode": "CA",
            "Default": false,
            "DoNotContact": true,
            "Email": "Jas@princess.ca",
            "Locality": "Mountain View",
            "Notes": "Moved as of April 15 2015",
            "Phone": "(555) 555-5555",
            "PostalCode": "94043",
            "PostOfficeBoxNumber": "P.O. Box 1022",
            "StateCode": "AB",
            "StreetAddress1": "1600 Amphitheatre Pkwy",
            "StreetAddress2": "Suite 500"
        }
    ],
    "AlternateName": "Jas",
    "ContactMethods": [
        {
            "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
            "ContactMethodCategoryId": 1,
            "ContactMethodTypeId": 5,
            "Default": true,
            "DoNotContact": true,
            "Notes": "After 6pm",
            "Value": "(306) 222-3333"
        }
    ],
    "CustomerExtensions": [
        {
            "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
            "ExtensionTypeId": 2,
            "Value": "66432"
        }
    ],
    "CustomerTypeId": 3,
    "DateOfBirth": "1952-07-23T12:00:00.000",
    "Disabled": true,
    "DoNotContact": true,
    "MemberOf": [],
    "Notes": "Interested in iPhone 6",
    "RelatedCustomers": [],
    "Title": "Ms"
}
curl -X POST "https://crmdemo.iqmetrix.net/v1/Companies(14146)/CustomerFull" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json" -H "Content-Type: application/json" -d '{
    "PrimaryName": "Princess",
    "MiddleName": "Ella",
    "FamilyName": "Jasmine",
    "Addresses": [
        {
            "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
            "AddressTypeId": 2,
            "AttentionTo": "Princess",
            "CountryCode": "CA",
            "Default": false,
            "DoNotContact": true,
            "Email": "Jas@princess.ca",
            "Locality": "Mountain View",
            "Notes": "Moved as of April 15 2015",
            "Phone": "(555) 555-5555",
            "PostalCode": "94043",
            "PostOfficeBoxNumber": "P.O. Box 1022",
            "StateCode": "AB",
            "StreetAddress1": "1600 Amphitheatre Pkwy",
            "StreetAddress2": "Suite 500"
        }
    ],
    "AlternateName": "Jas",
    "ContactMethods": [
        {
            "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
            "ContactMethodCategoryId": 1,
            "ContactMethodTypeId": 5,
            "Default": true,
            "DoNotContact": true,
            "Notes": "After 6pm",
            "Value": "(306) 222-3333"
        }
    ],
    "CustomerExtensions": [
        {
            "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
            "ExtensionTypeId": 2,
            "Value": "66432"
        }
    ],
    "CustomerTypeId": 3,
    "DateOfBirth": "1952-07-23T12:00:00.000",
    "Disabled": true,
    "DoNotContact": true,
    "MemberOf": [],
    "Notes": "Interested in iPhone 6",
    "RelatedCustomers": [],
    "Title": "Ms"
}'
static IRestResponse CreatingAFullCustomer()
{
    var client = new RestClient("https://crmdemo.iqmetrix.net/v1/Companies(14146)/CustomerFull");
    var request = new RestRequest(Method.POST);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 
    request.AddHeader("Content-Type", "application/json"); 

     request.AddParameter("application/json", "{\"PrimaryName\":\"Princess\",\"MiddleName\":\"Ella\",\"FamilyName\":\"Jasmine\",\"Addresses\":[{\"CustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"AddressTypeId\":2,\"AttentionTo\":\"Princess\",\"CountryCode\":\"CA\",\"Default\":false,\"DoNotContact\":true,\"Email\":\"Jas@princess.ca\",\"Locality\":\"Mountain View\",\"Notes\":\"Moved as of April 15 2015\",\"Phone\":\"(555) 555-5555\",\"PostalCode\":\"94043\",\"PostOfficeBoxNumber\":\"P.O. Box 1022\",\"StateCode\":\"AB\",\"StreetAddress1\":\"1600 Amphitheatre Pkwy\",\"StreetAddress2\":\"Suite 500\"}],\"AlternateName\":\"Jas\",\"ContactMethods\":[{\"CustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"ContactMethodCategoryId\":1,\"ContactMethodTypeId\":5,\"Default\":true,\"DoNotContact\":true,\"Notes\":\"After 6pm\",\"Value\":\"(306) 222-3333\"}],\"CustomerExtensions\":[{\"CustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"ExtensionTypeId\":2,\"Value\":\"66432\"}],\"CustomerTypeId\":3,\"DateOfBirth\":\"1952-07-23T12:00:00.000\",\"Disabled\":true,\"DoNotContact\":true,\"MemberOf\":[],\"Notes\":\"Interested in iPhone 6\",\"RelatedCustomers\":[],\"Title\":\"Ms\"}", ParameterType.RequestBody);

    return client.Execute(request);
}
import org.apache.http.entity.StringEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse CreatingAFullCustomer() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpPost request = new HttpPost("https://crmdemo.iqmetrix.net/v1/Companies(14146)/CustomerFull");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    request.addHeader("Content-Type", "application/json"); 
    StringEntity body = new StringEntity("{\"PrimaryName\":\"Princess\",\"MiddleName\":\"Ella\",\"FamilyName\":\"Jasmine\",\"Addresses\":[{\"CustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"AddressTypeId\":2,\"AttentionTo\":\"Princess\",\"CountryCode\":\"CA\",\"Default\":false,\"DoNotContact\":true,\"Email\":\"Jas@princess.ca\",\"Locality\":\"Mountain View\",\"Notes\":\"Moved as of April 15 2015\",\"Phone\":\"(555) 555-5555\",\"PostalCode\":\"94043\",\"PostOfficeBoxNumber\":\"P.O. Box 1022\",\"StateCode\":\"AB\",\"StreetAddress1\":\"1600 Amphitheatre Pkwy\",\"StreetAddress2\":\"Suite 500\"}],\"AlternateName\":\"Jas\",\"ContactMethods\":[{\"CustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"ContactMethodCategoryId\":1,\"ContactMethodTypeId\":5,\"Default\":true,\"DoNotContact\":true,\"Notes\":\"After 6pm\",\"Value\":\"(306) 222-3333\"}],\"CustomerExtensions\":[{\"CustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"ExtensionTypeId\":2,\"Value\":\"66432\"}],\"CustomerTypeId\":3,\"DateOfBirth\":\"1952-07-23T12:00:00.000\",\"Disabled\":true,\"DoNotContact\":true,\"MemberOf\":[],\"Notes\":\"Interested in iPhone 6\",\"RelatedCustomers\":[],\"Title\":\"Ms\"}");
    request.setEntity(body);
    
    return httpClient.execute(request);
}
require 'rest-client'

body = "{\"PrimaryName\":\"Princess\",\"MiddleName\":\"Ella\",\"FamilyName\":\"Jasmine\",\"Addresses\":[{\"CustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"AddressTypeId\":2,\"AttentionTo\":\"Princess\",\"CountryCode\":\"CA\",\"Default\":false,\"DoNotContact\":true,\"Email\":\"Jas@princess.ca\",\"Locality\":\"Mountain View\",\"Notes\":\"Moved as of April 15 2015\",\"Phone\":\"(555) 555-5555\",\"PostalCode\":\"94043\",\"PostOfficeBoxNumber\":\"P.O. Box 1022\",\"StateCode\":\"AB\",\"StreetAddress1\":\"1600 Amphitheatre Pkwy\",\"StreetAddress2\":\"Suite 500\"}],\"AlternateName\":\"Jas\",\"ContactMethods\":[{\"CustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"ContactMethodCategoryId\":1,\"ContactMethodTypeId\":5,\"Default\":true,\"DoNotContact\":true,\"Notes\":\"After 6pm\",\"Value\":\"(306) 222-3333\"}],\"CustomerExtensions\":[{\"CustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"ExtensionTypeId\":2,\"Value\":\"66432\"}],\"CustomerTypeId\":3,\"DateOfBirth\":\"1952-07-23T12:00:00.000\",\"Disabled\":true,\"DoNotContact\":true,\"MemberOf\":[],\"Notes\":\"Interested in iPhone 6\",\"RelatedCustomers\":[],\"Title\":\"Ms\"}";

response = RestClient.post 'https://crmdemo.iqmetrix.net/v1/Companies(14146)/CustomerFull', body, {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
     :'Content-Type' => 'application/json',
    } 

puts response

URI Parameters

Request Parameters

Response Parameters

Example Response

HTTP 201 Content-Type: application/json
{
    "Id": "659c2a38-d083-4421-9330-46d779702f85",
    "PrimaryName": "Princess",
    "MiddleName": "Ella",
    "FamilyName": "Jasmine",
    "Addresses": [
        {
            "Id": "a08b0640-606a-41f0-901a-facaf50e75dd",
            "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
            "AddressType": "Home",
            "AddressTypeId": 2,
            "AttentionTo": "Princess",
            "Country": "Canada",
            "CountryCode": "CA",
            "Default": false,
            "DoNotContact": true,
            "Email": "Jas@princess.ca",
            "Locality": "Mountain View",
            "Notes": "Moved as of April 15 2015",
            "Phone": "(555) 555-5555",
            "PostalCode": "94043",
            "PostOfficeBoxNumber": "P.O. Box 1022",
            "State": "Alberta",
            "StateCode": "AB",
            "StreetAddress1": "1600 Amphitheatre Pkwy",
            "StreetAddress2": "Suite 500",
            "Version": 1
        }
    ],
    "AlternateName": "Jas",
    "ContactMethods": [
        {
            "Id": "b25dd8b2-a24d-4107-8fbe-9c7b21e18137",
            "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
            "ContactMethodCategory": "Email",
            "ContactMethodCategoryId": 1,
            "ContactMethodType": "Work phone",
            "ContactMethodTypeId": 5,
            "Default": true,
            "DoNotContact": true,
            "Notes": "After 6pm",
            "Value": "(306) 222-3333",
            "Version": 1
        }
    ],
    "CustomerExtensions": [
        {
            "Id": "74b87ece-5f70-454d-9991-7952127146b0",
            "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
            "ExtensionType": "ExternalCustomerId",
            "ExtensionTypeId": 2,
            "Value": "66432",
            "Version": 1
        }
    ],
    "CustomerType": "Company",
    "CustomerTypeId": 3,
    "DateOfBirth": "1952-07-23T12:00:00.000",
    "Disabled": true,
    "DoNotContact": true,
    "MemberOf": [],
    "Notes": "Interested in iPhone 6",
    "RelatedCustomers": [],
    "Title": "Ms",
    "Version": 1
}

CustomerFull

GET a Full Customer

Request

GET /Companies({CompanyId})/CustomerFull({CustomerId})

Example Request

GET /Companies(14146)/CustomerFull(659c2a38-d083-4421-9330-46d779702f85)
Authorization: Bearer (Access Token)
Accept: application/json

curl -X GET "https://crmdemo.iqmetrix.net/v1/Companies(14146)/CustomerFull(659c2a38-d083-4421-9330-46d779702f85)" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json"
static IRestResponse GettingAFullCustomer()
{
    var client = new RestClient("https://crmdemo.iqmetrix.net/v1/Companies(14146)/CustomerFull(659c2a38-d083-4421-9330-46d779702f85)");
    var request = new RestRequest(Method.GET);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 

    

    return client.Execute(request);
}

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse GettingAFullCustomer() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://crmdemo.iqmetrix.net/v1/Companies(14146)/CustomerFull(659c2a38-d083-4421-9330-46d779702f85)");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.get 'https://crmdemo.iqmetrix.net/v1/Companies(14146)/CustomerFull(659c2a38-d083-4421-9330-46d779702f85)', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
{
    "Id": "659c2a38-d083-4421-9330-46d779702f85",
    "PrimaryName": "Princess",
    "MiddleName": "Ella",
    "FamilyName": "Jasmine",
    "Addresses": [
        {
            "Id": "a08b0640-606a-41f0-901a-facaf50e75dd",
            "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
            "AddressType": "Home",
            "AddressTypeId": 2,
            "AttentionTo": "Princess",
            "Country": "Canada",
            "CountryCode": "CA",
            "Default": false,
            "DoNotContact": true,
            "Email": "Jas@princess.ca",
            "Locality": "Mountain View",
            "Notes": "Moved as of April 15 2015",
            "Phone": "(555) 555-5555",
            "PostalCode": "94043",
            "PostOfficeBoxNumber": "P.O. Box 1022",
            "State": "Alberta",
            "StateCode": "AB",
            "StreetAddress1": "1600 Amphitheatre Pkwy",
            "StreetAddress2": "Suite 500",
            "Version": 1
        }
    ],
    "AlternateName": "Jas",
    "ContactMethods": [
        {
            "Id": "b25dd8b2-a24d-4107-8fbe-9c7b21e18137",
            "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
            "ContactMethodCategory": "Email",
            "ContactMethodCategoryId": 1,
            "ContactMethodType": "Work phone",
            "ContactMethodTypeId": 5,
            "Default": true,
            "DoNotContact": true,
            "Notes": "After 6pm",
            "Value": "(306) 222-3333",
            "Version": 1
        }
    ],
    "CustomerExtensions": [
        {
            "Id": "74b87ece-5f70-454d-9991-7952127146b0",
            "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
            "ExtensionType": "ExternalCustomerId",
            "ExtensionTypeId": 2,
            "Value": "66432",
            "Version": 1
        }
    ],
    "CustomerType": "Company",
    "CustomerTypeId": 3,
    "DateOfBirth": "1952-07-23T12:00:00.000",
    "Disabled": true,
    "DoNotContact": true,
    "MemberOf": [],
    "Notes": "Interested in iPhone 6",
    "RelatedCustomers": [],
    "Title": "Ms",
    "Version": 1
}

CustomerFull

DELETE a Full Customer

Request

DELETE /Companies({CompanyId})/CustomerFull({CustomerId})

Example Request

DELETE /Companies(14146)/CustomerFull(659c2a38-d083-4421-9330-46d779702f85)
Authorization: Bearer (Access Token)

curl -X DELETE "https://crmdemo.iqmetrix.net/v1/Companies(14146)/CustomerFull(659c2a38-d083-4421-9330-46d779702f85)" -H "Authorization: Bearer (Access Token)"
static IRestResponse DeletingAFullCustomer()
{
    var client = new RestClient("https://crmdemo.iqmetrix.net/v1/Companies(14146)/CustomerFull(659c2a38-d083-4421-9330-46d779702f85)");
    var request = new RestRequest(Method.DELETE);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 

    

    return client.Execute(request);
}

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpDelete;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse DeletingAFullCustomer() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpDelete request = new HttpDelete("https://crmdemo.iqmetrix.net/v1/Companies(14146)/CustomerFull(659c2a38-d083-4421-9330-46d779702f85)");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.delete 'https://crmdemo.iqmetrix.net/v1/Companies(14146)/CustomerFull(659c2a38-d083-4421-9330-46d779702f85)', {
     :'Authorization' => 'Bearer (Access Token)',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json

GET All Contact Methods for a Customer

Request

GET /Companies({CompanyId})/Customers({CustomerId})/ContactMethods

Example Request

GET /Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/ContactMethods
Authorization: Bearer (Access Token)
Accept: application/json

curl -X GET "https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/ContactMethods" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json"
static IRestResponse GettingAllContactMethodsForACustomer()
{
    var client = new RestClient("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/ContactMethods");
    var request = new RestRequest(Method.GET);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 

    

    return client.Execute(request);
}

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse GettingAllContactMethodsForACustomer() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/ContactMethods");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.get 'https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/ContactMethods', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
[
    {
        "Id": "b25dd8b2-a24d-4107-8fbe-9c7b21e18137",
        "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
        "ContactMethodCategory": "Email",
        "ContactMethodCategoryId": 1,
        "ContactMethodType": "Work phone",
        "ContactMethodTypeId": 5,
        "Default": true,
        "DoNotContact": true,
        "Notes": "After 6pm",
        "Value": "(306) 222-3333",
        "Version": 1
    }
]

Array[ContactMethod]

POST a Customer Contact Method

Request

POST /Companies({CompanyId})/Customers({CustomerId})/ContactMethods

Example Request

POST /Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/ContactMethods
Authorization: Bearer (Access Token)
Accept: application/json
Content-Type: application/json

{
    "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "ContactMethodCategoryId": 1,
    "ContactMethodTypeId": 5,
    "Default": true,
    "DoNotContact": true,
    "Notes": "After 6pm",
    "Value": "(306) 222-3333"
}
curl -X POST "https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/ContactMethods" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json" -H "Content-Type: application/json" -d '{
    "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "ContactMethodCategoryId": 1,
    "ContactMethodTypeId": 5,
    "Default": true,
    "DoNotContact": true,
    "Notes": "After 6pm",
    "Value": "(306) 222-3333"
}'
static IRestResponse AddingACustomerContactMethod()
{
    var client = new RestClient("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/ContactMethods");
    var request = new RestRequest(Method.POST);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 
    request.AddHeader("Content-Type", "application/json"); 

     request.AddParameter("application/json", "{\"CustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"ContactMethodCategoryId\":1,\"ContactMethodTypeId\":5,\"Default\":true,\"DoNotContact\":true,\"Notes\":\"After 6pm\",\"Value\":\"(306) 222-3333\"}", ParameterType.RequestBody);

    return client.Execute(request);
}
import org.apache.http.entity.StringEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse AddingACustomerContactMethod() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpPost request = new HttpPost("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/ContactMethods");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    request.addHeader("Content-Type", "application/json"); 
    StringEntity body = new StringEntity("{\"CustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"ContactMethodCategoryId\":1,\"ContactMethodTypeId\":5,\"Default\":true,\"DoNotContact\":true,\"Notes\":\"After 6pm\",\"Value\":\"(306) 222-3333\"}");
    request.setEntity(body);
    
    return httpClient.execute(request);
}
require 'rest-client'

body = "{\"CustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"ContactMethodCategoryId\":1,\"ContactMethodTypeId\":5,\"Default\":true,\"DoNotContact\":true,\"Notes\":\"After 6pm\",\"Value\":\"(306) 222-3333\"}";

response = RestClient.post 'https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/ContactMethods', body, {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
     :'Content-Type' => 'application/json',
    } 

puts response

URI Parameters

Request Parameters

Response Parameters

Example Response

HTTP 201 Content-Type: application/json

GET a Customer Contact Method

Request

GET /Companies({CompanyId})/Customers({CustomerId})/ContactMethods({ContactMethodId})

Example Request

GET /Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/ContactMethods(0c877e33-e0a4-46ca-be34-49718f29e791)
Authorization: Bearer (Access Token)
Accept: application/json

curl -X GET "https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/ContactMethods(0c877e33-e0a4-46ca-be34-49718f29e791)" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json"
static IRestResponse GettingACustomerContactMethod()
{
    var client = new RestClient("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/ContactMethods(0c877e33-e0a4-46ca-be34-49718f29e791)");
    var request = new RestRequest(Method.GET);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 

    

    return client.Execute(request);
}

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse GettingACustomerContactMethod() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/ContactMethods(0c877e33-e0a4-46ca-be34-49718f29e791)");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.get 'https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/ContactMethods(0c877e33-e0a4-46ca-be34-49718f29e791)', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
{
    "Id": "b25dd8b2-a24d-4107-8fbe-9c7b21e18137",
    "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "ContactMethodCategory": "Email",
    "ContactMethodCategoryId": 1,
    "ContactMethodType": "Work phone",
    "ContactMethodTypeId": 5,
    "Default": true,
    "DoNotContact": true,
    "Notes": "After 6pm",
    "Value": "(306) 222-3333",
    "Version": 1
}

ContactMethod

PUT a Customer Contact Method

Request

PUT /Companies({CompanyId})/Customers({CustomerId})/ContactMethods({ContactMethodId})

Example Request

PUT /Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/ContactMethods(0c877e33-e0a4-46ca-be34-49718f29e791)
Authorization: Bearer (Access Token)
Accept: application/json
Content-Type: application/json

{
    "Id": "b25dd8b2-a24d-4107-8fbe-9c7b21e18137",
    "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "ContactMethodCategory": "Email",
    "ContactMethodCategoryId": 1,
    "ContactMethodType": "Work phone",
    "ContactMethodTypeId": 5,
    "Default": true,
    "DoNotContact": true,
    "Notes": "After 6pm",
    "Value": "(306) 222-3333",
    "Version": 1
}
curl -X PUT "https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/ContactMethods(0c877e33-e0a4-46ca-be34-49718f29e791)" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json" -H "Content-Type: application/json" -d '{
    "Id": "b25dd8b2-a24d-4107-8fbe-9c7b21e18137",
    "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "ContactMethodCategory": "Email",
    "ContactMethodCategoryId": 1,
    "ContactMethodType": "Work phone",
    "ContactMethodTypeId": 5,
    "Default": true,
    "DoNotContact": true,
    "Notes": "After 6pm",
    "Value": "(306) 222-3333",
    "Version": 1
}'
static IRestResponse UpdatingACustomerContactMethod()
{
    var client = new RestClient("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/ContactMethods(0c877e33-e0a4-46ca-be34-49718f29e791)");
    var request = new RestRequest(Method.PUT);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 
    request.AddHeader("Content-Type", "application/json"); 

     request.AddParameter("application/json", "{\"Id\":\"b25dd8b2-a24d-4107-8fbe-9c7b21e18137\",\"CustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"ContactMethodCategory\":\"Email\",\"ContactMethodCategoryId\":1,\"ContactMethodType\":\"Work phone\",\"ContactMethodTypeId\":5,\"Default\":true,\"DoNotContact\":true,\"Notes\":\"After 6pm\",\"Value\":\"(306) 222-3333\",\"Version\":1}", ParameterType.RequestBody);

    return client.Execute(request);
}
import org.apache.http.entity.StringEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPut;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse UpdatingACustomerContactMethod() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpPut request = new HttpPut("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/ContactMethods(0c877e33-e0a4-46ca-be34-49718f29e791)");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    request.addHeader("Content-Type", "application/json"); 
    StringEntity body = new StringEntity("{\"Id\":\"b25dd8b2-a24d-4107-8fbe-9c7b21e18137\",\"CustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"ContactMethodCategory\":\"Email\",\"ContactMethodCategoryId\":1,\"ContactMethodType\":\"Work phone\",\"ContactMethodTypeId\":5,\"Default\":true,\"DoNotContact\":true,\"Notes\":\"After 6pm\",\"Value\":\"(306) 222-3333\",\"Version\":1}");
    request.setEntity(body);
    
    return httpClient.execute(request);
}
require 'rest-client'

body = "{\"Id\":\"b25dd8b2-a24d-4107-8fbe-9c7b21e18137\",\"CustomerId\":\"659c2a38-d083-4421-9330-46d779702f85\",\"ContactMethodCategory\":\"Email\",\"ContactMethodCategoryId\":1,\"ContactMethodType\":\"Work phone\",\"ContactMethodTypeId\":5,\"Default\":true,\"DoNotContact\":true,\"Notes\":\"After 6pm\",\"Value\":\"(306) 222-3333\",\"Version\":1}";

response = RestClient.put 'https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/ContactMethods(0c877e33-e0a4-46ca-be34-49718f29e791)', body, {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
     :'Content-Type' => 'application/json',
    } 

puts response

URI Parameters

Request Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
{
    "Id": "b25dd8b2-a24d-4107-8fbe-9c7b21e18137",
    "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
    "ContactMethodCategory": "Email",
    "ContactMethodCategoryId": 1,
    "ContactMethodType": "Work phone",
    "ContactMethodTypeId": 5,
    "Default": true,
    "DoNotContact": true,
    "Notes": "After 6pm",
    "Value": "(306) 222-3333",
    "Version": 1
}

ContactMethod

DELETE a Customer Contact Method

Request

DELETE /Companies({CompanyId})/Customers({CustomerId})/ContactMethods({ContactMethodId})

Example Request

DELETE /Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/ContactMethods(0c877e33-e0a4-46ca-be34-49718f29e791)
Authorization: Bearer (Access Token)

curl -X DELETE "https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/ContactMethods(0c877e33-e0a4-46ca-be34-49718f29e791)" -H "Authorization: Bearer (Access Token)"
static IRestResponse RemovingACustomerContactMethod()
{
    var client = new RestClient("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/ContactMethods(0c877e33-e0a4-46ca-be34-49718f29e791)");
    var request = new RestRequest(Method.DELETE);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 

    

    return client.Execute(request);
}

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpDelete;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse RemovingACustomerContactMethod() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpDelete request = new HttpDelete("https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/ContactMethods(0c877e33-e0a4-46ca-be34-49718f29e791)");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.delete 'https://crmdemo.iqmetrix.net/v1/Companies(14146)/Customers(659c2a38-d083-4421-9330-46d779702f85)/ContactMethods(0c877e33-e0a4-46ca-be34-49718f29e791)', {
     :'Authorization' => 'Bearer (Access Token)',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json

CustomerSearch resources use a special filter property, criteria.

Criteria performs a case insensitive search of filterable properties in CustomerFull resources.

Filterable Properties

Resource Property
ContactMethod Value
Customer PrimaryName
Customer MiddleName
Customer FamilyName
Customer AlternateName
CustomerExtension Value

Request

GET /Companies({CompanyId})/CustomerSearch?$filter={filter}

Example Request

GET /Companies(14146)/CustomerSearch?$filter=Criteria eq 'Bob'
Authorization: Bearer (Access Token)
Accept: application/json

curl -X GET "https://crmdemo.iqmetrix.net/v1/Companies(14146)/CustomerSearch?$filter=Criteria eq 'Bob'" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json"
static IRestResponse CustomerSearch()
{
    var client = new RestClient("https://crmdemo.iqmetrix.net/v1/Companies(14146)/CustomerSearch?$filter=Criteria eq 'Bob'");
    var request = new RestRequest(Method.GET);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 

    

    return client.Execute(request);
}

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse CustomerSearch() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://crmdemo.iqmetrix.net/v1/Companies(14146)/CustomerSearch?$filter=Criteria eq 'Bob'");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.get 'https://crmdemo.iqmetrix.net/v1/Companies(14146)/CustomerSearch?$filter=Criteria eq 'Bob'', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
[
    {
        "Criteria": "bob",
        "Id": "503d1d4a-c974-4286-b4a2-002699e60ad6",
        "PrimaryName": "Robert",
        "MiddleName": "Lee",
        "FamilyName": "Smith",
        "Addresses": [
            {
                "Id": "a08b0640-606a-41f0-901a-facaf50e75dd",
                "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
                "AddressType": "Home",
                "AddressTypeId": 2,
                "AttentionTo": "Princess",
                "Country": "Canada",
                "CountryCode": "CA",
                "Default": false,
                "DoNotContact": true,
                "Email": "Jas@princess.ca",
                "Locality": "Mountain View",
                "Notes": "Moved as of April 15 2015",
                "Phone": "(555) 555-5555",
                "PostalCode": "94043",
                "PostOfficeBoxNumber": "P.O. Box 1022",
                "State": "Alberta",
                "StateCode": "AB",
                "StreetAddress1": "1600 Amphitheatre Pkwy",
                "StreetAddress2": "Suite 500",
                "Version": 1
            }
        ],
        "AlternateName": "Bob",
        "ContactMethods": [
            {
                "Id": "b25dd8b2-a24d-4107-8fbe-9c7b21e18137",
                "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
                "ContactMethodCategory": "Email",
                "ContactMethodCategoryId": 1,
                "ContactMethodType": "Work phone",
                "ContactMethodTypeId": 5,
                "Default": true,
                "DoNotContact": true,
                "Notes": "After 6pm",
                "Value": "(306) 222-3333",
                "Version": 1
            }
        ],
        "CustomerExtensions": [
            {
                "Id": "74b87ece-5f70-454d-9991-7952127146b0",
                "CustomerId": "659c2a38-d083-4421-9330-46d779702f85",
                "ExtensionType": "ExternalCustomerId",
                "ExtensionTypeId": 2,
                "Value": "66432",
                "Version": 1
            }
        ],
        "CustomerType": "Company",
        "CustomerTypeId": 3,
        "DateOfBirth": "1952-07-23T12:00:00.000",
        "Disabled": true,
        "DoNotContact": true,
        "MemberOf": [],
        "Notes": "Interested in iPhone 6",
        "RelatedCustomers": [],
        "Title": "Mr",
        "Version": 1
    }
]

Array[CustomerSearch]

SEARCHING

The Customers API supports searching of Customer and CustomerSearch resources through the use of filters.

The $filter query parameter is used for specifying filtering criteria.

The type of filters available depend on the Data Type of the property being filtered on.

Available Filters

See the table below for available filters and the syntax of using each filter.

Keyword Filter Description Data Type Examples
eq Property is equal to value Integer, Boolean, String, Date ContactMethod eq 1
DoNotContact eq true
Criteria eq 'Bob'
DateOfBirth eq DateTime'1990-01-01'
gt Property is greater than value(s) Integer, Date ContactMethod gt 1
DateOfBirth gt DateTime'1990-01-01'
Criteria gt DateTime'2015-01-01'
lt Property is less than value(s) Integer, Date ContactMethod lt 3
DateOfBirth lt DateTime'1990-01-01'
Criteria lt DateTime'2015-01-01'
ge Property is greater than or equal to value(s) Integer, Date ContactMethod ge 1
DateOfBirth ge DateTime'1990-01-01'
Criteria ge DateTime'2015-01-01'
le Property is less than or equal to value(s) Integer, Date ContactMethod le 1
DateOfBirth le DateTime'1990-01-01'
Criteria le DateTime'2015-01-01'
substringof Property contains value String substringof('bob', PrimaryName)
substringof('bob', Criteria)

Combining Filters

Filters can be combined using the keyword and as shown below.

Example
PrimaryName eq 'John' and DateOfBirth gt DateTime'1990-01-01'

Case Sensitivity

Filters on Customer resources are case sensitive.

Filters on CustomerSearch resources are NOT case sensitive.

To filter without case sensitivity, you can apply ‘tolower’ to a resource property.

Example
GET /Companies(14146)/Customers?$filter=substringof('bob', tolower(PrimaryName))

PAGINATION

The Customers API supports pagination of collections for some resources.

Requests to resources that support pagination include the Accept: application/hal+json HTTP header under the Headers section.

Query Parameters

Pagination is done through the use of $skip and $top query string parameters.

$skip denotes the number of items in the collection to skip, defaults to 0 if no value is provided.

$top denotes the number of items to take, defaults to 50 if no value is provided.

The maximum value of 100 will be used if the value provided is outside the acceptable range [0-100].

Pagination links for ‘self’, ‘prev’ and ‘next’ are returned by default when the media type is a hypermedia-enabled media type (i.e. HAL).

These links are relative, they do not include the base endpoint. It is the responsibility of the client to prepend the appropriate endpoint.

Example
{
    "_links": {
        "self": {
          "href": "Companies(14146)/Customers?$skip=10&$top=10",
          "templated": false
        },
        "next": {
          "href": "Companies(14146)/Customers?$skip=20&$top=10",
          "templated": false
        },
        "prev": {
          "href": "Companies(14146)/Customers?$skip=0&$top=10",
          "templated": false
        }
    },
    "_embedded": {
        "self": [ ]
    }
}

In the example above, the _links section is included in the data returned from an API request to get Customers, where $skip=10 and $top=10.

The self.href value is the encoded version of the API request that returned these results.

The next.href refers to a resource containing a page with the next 10 items.

The prev.href refers to a resource containing a page with the previous 10 items.

ERRORS

HTTP Status Code Description How to Resolve
HTTP 404 Not Found Ensure the CustomerID is correct
Was this page helpful?