Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Page Properties
labelapi_docs_client_actions


Name

Clients Create

Description

Create one or more clients.

Type

POST

URL

/v9/clients

Credential Type

API


Long Description

Create one or more clients for clients for your brokerage which can participate in orders as the buyer or seller. Note that this takes an array of clients even if only creating one.

Parameters

Name

Description

Type

Presence

Location

Limitations

name

Name of the client

String

Required

Body

Must include a space. “Prince Fielder” is valid. “Prince” is not.

office_id

ID of one of your Brokerage’s Offices to which this client will belong

Integer

Optional, but recommended

Body

 


tags

Comma separated list or an array of tags for this client

String|Array

Optional

Body


addresses

Array of addresses belonging to this client

Array

Optional

Body

 


phone_numbers

Array of phone numbers belonging to this client

Array

Optional

Body

 


email_addresses

Array of email addresses belonging to this client

Array

Optional

Body


company

or

company_id

A Company object

Object

Optional

Body

Use one or the other, but not both. Neither is required.

Note: Using a Company object will create a new Company every time so if you wish to add multiple clients to the same Company you should create the Company once and use the ID.

ID of an existing Company to which you wish to connect this Client

Integer

Optional

Body

notes

Notes you want to store regarding this Client

Sting

Optional

Body

 

...


commission_junction_sid

Alphanumeric SID from the Commission Junction network

String

Optional

Body



Examples

Request

Response

POST /v9/clients

 


A minimal example of creating a client.

Code Block
themeConfluence
languagejs
{
  "clients": [
    {
      "name": "Ned Flanders"
    }
  ]
}



Code Block
language
ruby
js
{
  "clients": [
    {
      "
name
addresses":
"Joe Client"
 [],
      "company": null,
      "email_addresses": [],
      "id": "168019",
      "name": "Ned Flanders",
      "notes": null,
      "affiliate_store": null,
      "phone_numbers": [],
   
{
   "primary_credit_card": null,
      "primary_shipping_address":
"joe@client.net"
 null,
      "primary_billing_address": null,
      
}
"primary_phone_number": null,
      
]
"primary_email_address": null,
      "
addresses
tags": [],
      "updated_at": 
{
"2017-12-14T18:13:24-05:00",
      "url": "/v9/clients/168019",
      "
region
balance": "
NJ
0.0",
      "pnr_id": null,
      "
country_code":"US",
commission_junction_sid": null
    }
  ]
}


An example of creating a client with all available properties as well as related items.

Note: Credit cards cannot be created at the same time as Client creation.

Code Block
languagejs
{
  "clients": [
    {
      "office_id": 1937,
      "name": "Ned Flanders",
      "tags": [
        "VIP",
        "Left Handed",
        "Mustache Afficianado"
      ],
      "company": {
        "name": "The Leftorium"
      },
      "notes": "Fan of rock band Kovenant, (ex-girlfriend Rachel Jordan is singer).",
      "
postal_code":"07307
email_addresses": [
        {
          "label": "home",
          "
street_
address":
"333 Washington St Suite 302
 "nedflanders@example.com",
          "is_primary": false
        },
        {
          "label": "work",
          "
locality
address":
"Jersey City"
 "theleftorium@example.com",
          "is_primary": true
        }
      ],
      "
phone_numbers
addresses": [
        {
         
"number":"2015555555"
 "label": "home",
          "name": "Ned Flanders",
         
}
 "company": null,
          
],
"street_address": "742 Evergreen Terrace",
          "
office_id":1494
extended_address": null,
          "locality": "Springfield",
          "region": "OR",
      
}
   
]
 
} Code Block
themeConfluence
languageruby
{
"postal_code": "97475",
          "
clients
country_code":
[
 "US",
   
{
       "is_primary_
credit_card
shipping":
null,
 false,
          "
primary_email_address":{
is_primary_billing": true
        },
        {
          "label": "work",
          "name": "Ned Flanders",
          "company": "The Leftorium",
          "street_address": "7721 Springfield Mall Drive",
          "extended_address":
"joe@client.net",
 "Suite 202",
          "locality": "Springfield",
          "
label
region":
null
 "OR",
          "
id
postal_code":
"81960"
 "97475",
          "country_code": "US",
          
}
"is_primary_shipping": true,
      
"company":null
    "is_primary_billing": false
        }
      ],
      "phone_numbers": [
        {
          "label": "home",
          "country_code": "+1",
          "number": "541-555-0123",
          "extension": null,
          "is_primary": false
        },
        {
          "label": "work",
          "country_code
":null
": "+1",
          "number": "541-555-0987",
          "extension": 5,
          "is_primary": false
        },
        {
          "label":
null
 "cell",
          "country_code": "+1",
          "number": "
2015555555
541-555-0573",
          "
id
extension":
"131865"
 null,
          "is_primary": true
        }
      ]
,

    }
  ]
}



Code Block
languagejs
{
  "clients": [
    {
      "
email_
addresses": [
        {
          "region": "OR",
          "longitude": null,
          "extended_address":
"joe@client.net
 "Suite 202",
          "label":
null
 "work",
          "
id
locality":
"81960"
 "Springfield",
          "street_address": "7721 Springfield Mall Drive",
    
}
      
]
"name": "Ned Flanders",
          "
url
primary":
"/clients/85238",
 true,
          "primary_shipping_address": true,
          "primary_
shipping
billing_address":
{
 true,
          "country_code": "US",
          "
locality
id":
"Jersey City"
 "645262",
          "latitude": null,
          "postal_code":
"07307",
 "97475",
          "po_box": false
        },
        {
          "region": "OR",
          "longitude": null,
          "
country_code":"US",
extended_address": null,
          "label": "home",
          "locality": "Springfield",
          "street_address":
"333 Washington St Suite 302"
 "742 Evergreen Terrace",
          "name": "Ned Flanders",
          "primary": false,
        
"label
  "primary_shipping_address":
null
 false,
          "primary
":true
_billing_address": false,
          "country_code": "US",
          "id": "645261",
          "latitude": null,
          "
extended
postal_
address
code":
null
 "97475",
          "po_box":
false,
 false
        }
      ],
      "
name
company": null,
      "email_addresses": [
        {
  
"id
        "address": "
376786
theleftorium@example.com",
          "
longitude
label":
null
 "work",
          "
region
id":
"NJ"
 "208086",
          "primary": true
        },
        {
          "
balance
address": "
0.0",
nedflanders@example.com",
          "label": "home",
          "id": "208085",
          "
updated_at":"2013-07-12T20:13:31Z
primary": false
        }
      ],
      "id": "168026",
      "name": "Ned Flanders",
      "
tags
notes":
[
 "Fan of rock band Kovenant, (ex-girlfriend Rachel Jordan is 
]
singer).",
      "
primary_billing_address
office": {
        "
locality
brokerage":
"Jersey City
 {
          "url": "/v9/brokerages/1935",
          "
postal_code
name": "
07307
Tevo POS Test",
          "
country_code
id": "
US
1935",
          "
street_address
abbreviation":
"333 Washington St Suite 302
 "TEPOS"
        },
        "url": "/v9/offices/1937",
        "
label
name":
null
 "Main Office",
        "
primary
id":
true
 "1937",
        "
latitude
pcc_code": null
,

      },
      "
extended
affiliate_
address
store": null,
      "phone_numbers": [
        {
          "
po_box
label":
false
 "cell",
          "
name
extension": null,
          "
id
number": "
376786
541-555-0573",
          "
longitude
id":
null
 "294654",
          "
region
country_code":
"NJ"
 "1",
          "primary": true
        },
        {
 
"name
         "label":
"Joe Client
 "work",
          "extension": "5",
          "
notes
number":
null,
 "541-555-0987",
          "id": "294653",
          "country_code": "
85238
1",
          "
addresses
primary":
[
 false
        },
        {
          "label": "home",
          "
locality
extension":
"Jersey City
 null,
          "number": "541-555-0123",
          "
postal_code
id": "
07307
294652",
          "country_code":
"US"
 "1",
          "primary": false
        }
      ],
      "primary_credit_card": null,
  
"street_address":"333 Washington St Suite 302
    "primary_shipping_address": {
        "region": "OR",
        "longitude": null,
        "extended_address": "Suite 202",
        "label": "work",
        "locality": "Springfield",
 
"label":null,
       "street_address": "7721 Springfield Mall Drive",
        "name": "Ned Flanders",
        "primary": true,
        "primary_shipping_address": true,
        "primary_billing_address": true,
        "country_code": "US",
        "id": "645262",
        "latitude": null,
        "postal_code": "97475",
        "po_box": false
      },
      "primary_billing_address": {
        "region": "OR",
        "longitude": null,
        "extended_address":
null,
 "Suite 202",
        "label": "work",
        "locality": "Springfield",
        "
po
street_
box
address":
false,
 "7721 Springfield Mall Drive",
        "name":
null,
 "Ned Flanders",
        "primary": true,
        "
id
primary_shipping_address":
"376786"
 true,
        "primary_billing_address": true,
        "country_code": "US",
"longitude":null,
        "id": "645262",
        "latitude": null,
    
"region
    "postal_code": "
NJ
97475",
       
}
 "po_box": false
      
]
},
      "primary_phone_number": {
        "label": "cell",
        "extension": null,
        "number": "555-0573",
        "id": "294654",
        "country_code":
null
 "1",
        "
label":null
primary": true
      },
      "primary_email_address": {
        "address": "theleftorium@example.com",
        "
number
label": "
2015555555
work",
        "id":
"131865"
 "208086",
        "primary": true
      },
      "tags": [
        "vip",
        "Left Handed",
        "Mustache Afficianado"
      ],
      "updated_at": "2017-12-14T18:37:50-05:00",
      "url": "/v9/clients/168026",
      "balance": "0.0",
      "pnr_id": null,
      "commission_junction_sid": null
    }
  ]
}