API - Accounts

The Accounts resource contains a single listAccounts method that returns account specific information.

Method Name: listAccounts

Retrieve a list of all of your accounts.

  • Method: GET

  • Parameters: None

  • Request Headers: Accept, Authorization, Host

  • Request Message Body: None

  • Response Headers: Content-Length, Content-Type, Content-Location

  • Response Message Body: Account Information

  • Response Status: 200, 400, 401, 403, 404

  • Media Types:

    • application/vnd.koleimports.ds.account+xml
    • application/vnd.koleimports.ds.account+json

Request Parameters:

GET /accounts
Host: example.com 
Authorization: Basic {id}:{api_key} 
Accept: application/vnd.koleimports.ds.account+xml

Example CURL Request:

curl -H "Accept: application/vnd.koleimports.ds.account+xml" "https://{id}:{api_key}@api.koleimports.com/accounts/"

Example Response:

HTTP/1.1 200 OK 
Content-Type: application/vnd.koleimports.ds.account+xml
Content-Length: 524
Content-Location: https://api.koleimports.com/accounts/

<?xml version="1.0" encoding="utf-8"?>
<accounts>
    <account>
        <account_id></account_id>
        <customer_id></customer_id>
        <federal_tax_id></federal_tax_id>
        <email></email>
        <first_name></first_name>
        <last_name></last_name>
        <company></company>
        <address_1></address_1>
        <address_2></address_2>
        <city></city>
        <state></state>
        <zipcode></zipcode>
        <phone></phone>
        <created></created>
        <modified></modified>
    </account>
</accounts>

Response Body Field Definitions

Field Name Description Type Length
Field Name Description Type Length
accounts

Children:

  • account
n/a n/a
account

Children:

  • account_id
  • customer_id
  • federal_tax_id
  • email
  • first_name
  • last_name
  • company
  • address_1
  • address_2
  • city
  • state
  • zipcode
  • phone
  • created
  • modified
n/a n/a
account_id

Unique account ID

Integer 10
customer_id

The customer number associated with the account.

string 6
federal_tax_id

The customers federal tax id or EIN number.

string 9
email

The account owners email address.

string 255
first_name

Customer first name

String 40
last_name

Customer last name

String 40
company

Customer company name

String 60
address_1

Customer address

String 100
address_2

Customer extended address

String 100
city

Customer City

String 60
state

Customer State. Two-letter state abbreviation.
(e.g. CA, NY, VT).

String 2
zipcode

Customer Zipcode

String 5
phone

Customer Phone Number

String 10
created

The ISO 8601 Timestamp for when the account was created (0000-00-00T00:00:00).

String 19
modified

The ISO 8601 Timestamp for when the account was last modified (0000-00-00T00:00:00).

String 19