Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 32 Next »

NameClients Create
DescriptionCreate one or more clients.
TypePOST
URL/v9/clients
Credential TypeAPI

Long Description

Create one or more 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
LocationLimitations
nameName of the clientStringRequiredBodyMust include a space. “Prince Fielder” is valid. “Prince” is not.
office_idID of one of your Brokerage’s Offices to which this client will belongIntegerOptional, but recommendedBody
tagsComma separated list or an array of tags for this clientString|ArrayOptionalNody
addressesArray of addresses belonging to this clientArrayOptionalBody
phone_numbersArray of phone numbers belonging to this clientArrayOptionalBody
email_addressesArray of email addresses belonging to this clientArrayOptionalBody

company

or

company_id

A Company objectObjectOptionalBodyUse one or the other, but not both. Neither is required.
ID of an existing Company to which you wish to connect this ClientIntegerOptionalBody
notesNotes you want to store regarding this ClientStingOptionalBody
commission_junction_sidAlphanumeric SID from the Commission Junction networkStringOptionalBody


Examples

RequestResponse
POST /v9/clients

A minimal example of creating a client.

{
  "clients": [
    {
      "name": "Ned Flanders"
    }
  ]
}
{
  "clients": [
    {
      "addresses": [],
      "company": null,
      "email_addresses": [],
      "id": "168019",
      "name": "Ned Flanders",
      "notes": null,
      "affiliate_store": null,
      "phone_numbers": [],
      "primary_credit_card": null,
      "primary_shipping_address": null,
      "primary_billing_address": null,
      "primary_phone_number": null,
      "primary_email_address": null,
      "tags": [],
      "updated_at": "2017-12-14T18:13:24-05:00",
      "url": "/v9/clients/168019",
      "balance": "0.0",
      "pnr_id": null,
      "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.

{
  "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).",
      "email_addresses": [
        {
          "label": "home",
          "address": "nedflanders@example.com",
          "is_primary": false
        },
        {
          "label": "work",
          "address": "theleftorium@example.com",
          "is_primary": true
        }
      ],
      "addresses": [
        {
          "label": "home",
          "name": "Ned Flanders",
          "company": null,
          "street_address": "742 Evergreen Terrace",
          "extended_address": null,
          "locality": "Springfield",
          "region": "OR",
          "postal_code": "97475",
          "country_code": "US",
          "is_primary_shipping": false,
          "is_primary_billing": true
        },
        {
          "label": "work",
          "name": "Ned Flanders",
          "company": "The Leftorium",
          "street_address": "7721 Springfield Mall Drive",
          "extended_address": "Suite 202",
          "locality": "Springfield",
          "region": "OR",
          "postal_code": "97475",
          "country_code": "US",
          "is_primary_shipping": true,
          "is_primary_billing": false
        }
      ],
      "phone_numbers": [
        {
          "label": "home",
          "country_code": "+1",
          "number": "541-555-0123",
          "extension": null,
          "is_primary": false
        },
        {
          "label": "work",
          "country_code": "+1",
          "number": "541-555-0987",
          "extension": 5,
          "is_primary": false
        },
        {
          "label": "cell",
          "country_code": "+1",
          "number": "541-555-0573",
          "extension": null,
          "is_primary": true
        }
      ]
    }
  ]
}
{
  "clients": [
    {
      "addresses": [
        {
          "region": "OR",
          "longitude": null,
          "extended_address": "Suite 202",
          "label": "work",
          "locality": "Springfield",
          "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
        },
        {
          "region": "OR",
          "longitude": null,
          "extended_address": null,
          "label": "home",
          "locality": "Springfield",
          "street_address": "742 Evergreen Terrace",
          "name": "Ned Flanders",
          "primary": false,
          "primary_shipping_address": false,
          "primary_billing_address": false,
          "country_code": "US",
          "id": "645261",
          "latitude": null,
          "postal_code": "97475",
          "po_box": false
        }
      ],
      "company": null,
      "email_addresses": [
        {
          "address": "theleftorium@example.com",
          "label": "work",
          "id": "208086",
          "primary": true
        },
        {
          "address": "nedflanders@example.com",
          "label": "home",
          "id": "208085",
          "primary": false
        }
      ],
      "id": "168026",
      "name": "Ned Flanders",
      "notes": "Fan of rock band Kovenant, (ex-girlfriend Rachel Jordan is singer).",
      "office": {
        "brokerage": {
          "url": "/v9/brokerages/1935",
          "name": "Tevo POS Test",
          "id": "1935",
          "abbreviation": "TEPOS"
        },
        "url": "/v9/offices/1937",
        "name": "Main Office",
        "id": "1937",
        "pcc_code": null
      },
      "affiliate_store": null,
      "phone_numbers": [
        {
          "label": "cell",
          "extension": null,
          "number": "541-555-0573",
          "id": "294654",
          "country_code": "1",
          "primary": true
        },
        {
          "label": "work",
          "extension": "5",
          "number": "541-555-0987",
          "id": "294653",
          "country_code": "1",
          "primary": false
        },
        {
          "label": "home",
          "extension": null,
          "number": "541-555-0123",
          "id": "294652",
          "country_code": "1",
          "primary": false
        }
      ],
      "primary_credit_card": null,
      "primary_shipping_address": {
        "region": "OR",
        "longitude": null,
        "extended_address": "Suite 202",
        "label": "work",
        "locality": "Springfield",
        "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": "Suite 202",
        "label": "work",
        "locality": "Springfield",
        "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_phone_number": {
        "label": "cell",
        "extension": null,
        "number": "555-0573",
        "id": "294654",
        "country_code": "1",
        "primary": true
      },
      "primary_email_address": {
        "address": "theleftorium@example.com",
        "label": "work",
        "id": "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
    }
  ]
}
  • No labels