...
Page Properties |
---|
label | api_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 |
|
|
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. |
theme | Confluence |
---|
| {
"clients": [
{
"name": "Ned Flanders"
}
]
} |
|
|
rubyname"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 {"2017-12-14T18:13:24-05:00",
"url": "/v9/clients/168019",
" |
|
regionNJcountry_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 |
---|
| {
"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":"07307email_addresses": [
{
"label": "home",
" |
|
street_"333 Washington St Suite 302 "nedflanders@example.com",
"is_primary": false
},
{
"label": "work",
" |
|
locality"Jersey City" "theleftorium@example.com",
"is_primary": true
}
],
" |
|
phone_numbers "number":"2015555555" "label": "home",
"name": "Ned Flanders",
|
|
}],"street_address": "742 Evergreen Terrace",
" |
|
office_id":1494extended_address": null,
"locality": "Springfield",
"region": "OR",
|
|
}]} Code Block |
---|
theme | Confluence |
---|
language | ruby |
---|
|
{"postal_code": "97475",
" |
|
clients[{credit_cardnull,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",
" |
|
labelnullid"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": " |
|
2015555555id"131865"
null,
"is_primary": true
}
] |
|
,
|
Code Block |
---|
| {
"clients": [
{
" |
|
email_addresses": [
{
"region": "OR",
"longitude": null,
"extended_address": |
|
"joe@client.netnullid"81960"
"Springfield",
"street_address": "7721 Springfield Mall Drive",
|
|
} ]"name": "Ned Flanders",
" |
|
url"/clients/85238", true,
"primary_shipping_address": true,
"primary_ |
|
shipping{ true,
"country_code": "US",
" |
|
locality"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":true_billing_address": false,
"country_code": "US",
"id": "645261",
"latitude": null,
" |
|
extendedaddressnullfalse,namecompany": null,
"email_addresses": [
{
|
|
"id376786theleftorium@example.com",
" |
|
longitudenullregion"NJ" "208086",
"primary": true
},
{
" |
|
balance0.0",nedflanders@example.com",
"label": "home",
"id": "208085",
" |
|
updated_at":"2013-07-12T20:13:31Zprimary": false
}
],
"id": "168026",
"name": "Ned Flanders",
" |
|
tags[ "Fan of rock band Kovenant, (ex-girlfriend Rachel Jordan is |
|
]primary_billing_addresslocality"Jersey City {
"url": "/v9/brokerages/1935",
" |
|
postal_code07307country_codeUSstreet_address"333 Washington St Suite 302 "TEPOS"
},
"url": "/v9/offices/1937",
" |
|
labelnullprimarytruelatitude,extendedaddressstore": null,
"phone_numbers": [
{
" |
|
po_boxfalsenameid376786longitudenullregion"NJ" "1",
"primary": true
},
{
|
|
"name"Joe Client "work",
"extension": "5",
" |
|
notesnull, "541-555-0987",
"id": "294653",
"country_code": " |
|
85238addresses[ false
},
{
"label": "home",
" |
|
locality"Jersey City null,
"number": "541-555-0123",
" |
|
postal_code07307"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",
" |
|
poboxfalse, "7721 Springfield Mall Drive",
"name": |
|
null,
"Ned Flanders",
"primary": true,
" |
|
idprimary_shipping_address": |
|
"376786" true,
"primary_billing_address": true,
"country_code": "US",
|
|
"longitude":null, "id": "645262",
"latitude": null,
|
|
"regionNJ }]},
"primary_phone_number": {
"label": "cell",
"extension": null,
"number": "555-0573",
"id": "294654",
"country_code": |
|
nulllabel":nullprimary": true
},
"primary_email_address": {
"address": "theleftorium@example.com",
" |
|
number2015555555"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
}
]
} |
|