/create-client/
Purpose
Allows users to create a client. If the ClientKey variable matches a client already in the system, the client information will be updated. If there is no matching ClientKey a new client will be created.
Header Information
The following Authorization keys need to be added to any API call header.
Auth-FactorID: an ID provided by FactorCloud to the Factor who owns the instance of FactorCloud.
Auth-SystemKey: A Key to Identify the specific system.
Auth-APIKey: An API password.
HTTP Methods
Accepts POST requests.
URI
/api_factor/create-client/
Body Information
The body is a JSON Object with the following paramaters:
Variable Name |
Type |
Required |
Purpose |
ClientKey |
Char Var |
Y |
The unique ID used to identify the client through the API, used in other calls. |
Name |
Char Var |
Y |
The company's name. |
CompCode |
Char Var |
|
An abbreviated form of the client's name. |
Address1 |
Char Var |
|
The mailing address of the client. |
Address2 |
Char Var |
|
Additional information on the address, such as PO box # or suite #. |
City |
Char Var |
|
Client's City. |
State |
Char Var |
|
Client's State, in two character format. |
ZipCode |
Char Var |
|
The Client's zipcode, supports non-American zipcode formats. |
Country |
Char Var |
|
The client's country. |
Phone |
Char Var |
|
Client's point of contact phone number. |
PhoneAlt |
Char Var |
|
Client's secondary point of contact phone number. |
Fax |
Char Var |
|
Client's fax number. |
Email |
Char Var |
|
Client's primary point of contact email address. |
UccDate |
Timestamp Without Time Zone |
|
Date the UCC is filed. |
UccDate2 |
Timestamp Without Time Zone |
|
Date the UCC2 is filed. |
UccSignedDate |
Timestamp Without Time Zone |
|
Date the UCC is signed. |
Type |
Char Var |
|
Client's Business Type; 0 for carrier, 1 for broker. |
Industry |
Integer |
|
Classification of the Client's general Industry; 1 for Transportation, 2 for Construction, 3 for Staffing, 4 for Oil & Gas, and 5 for General. |
AltName |
Char Var |
|
NameSpace for a client's FKA or DBA name. |
EdiID |
Char Var |
|
Client's ID for EDI transactions. |
FedTaxNum |
Char Var |
|
Client's Federal Tax Number. |
DunsNum |
Char Var |
|
Unique Identifier for the Data Universal Numbering System for businesses. |
MCNumber |
Char Var |
|
Client's Motor Carrier Number. |
DOTNumber |
Char Var |
|
Client's Department of Transportation Number. |
CreditLimit |
String |
|
The client's current credit limit in FactorCloud. Represents a float with 2 decimal points. |
Expected Return
An echo JSON object with the in-system information, this may be different then the information in the API call; and reflects the formatting applied to it when entered into the database.
Curl Example
Request:
curl -H 'Auth-FactorId: FACTORID' -H 'Auth-SystemKey: SYSTEMKEY' -H 'Auth-ApiKey: APIKEY' --data '{"ClientKey":"CLIENTKEY","Name":"CLIENT NAME","CompCode":"CODE","Industry":"1","Type":"0"}' https://wstest.factorcloud.com/api_factor/create-client/
Response:
Header for updated client: Status OK 200
Header for newly created client: Status Created 201
{
"Uuidd":"",
"ClientKey":"GREGSMOM",
"Name":"Test",
"CompCode":"TAA1",
"Address1":"",
"Address2":"",
"City":"",
"State":"",
"ZipCode":"",
"Country":"",
"Phone":"",
"PhoneAlt":"",
"Fax":"",
"Email":"",
"UccDate":"2020-09-07",
"UccDate2":"2020-09-07",
"UccSignedDate":"2020-09-07",
"Type":"0",
"Industry":"1",
"AltName":"",
"EdiId":"",
"FedTaxNum":"",
"DunsNum":"",
"MCNumber":"",
"DOTNumber":""
}