Add Creditor


Description

This method adds a creditor user to the system.

Authentication

Requires HTTP BASIC authentication. The authenticating user must have ROLE_API_ADD_CREDITOR assigned.

HTTP Methods

Accepts POST requests.

URI

/api/creditors.json

Path Variables

No path variable.

Parameters

Name Required/Optional Description Validation
companyName required The creditor's company name Length should not be greater then 100 character
contactName optional The creditor's contact name Length should not be greater then 100 character
contactPhone optional The creditor's contact phone number Length should not be greater then 10 character
contactFax optional The creditor's contact fax number Length should not be greater then 10 character
contactEmail optional The creditor's contact email address Length should not be greater then 100 character
addressLine1 optional The first line of the creditor's address Length should not be greater then 100 character
addressLine2 optional The second line of the creditor's address Length should not be greater then 100 character
city optional The creditor's city Length should not be greater then 100 character
state optional The creditor's two letter state code
postalCode optional The creditor's postal code Length should not be greater then 12 character
country optional The creditor's two letter ISO country code Length should be equals to 2 character

Curl Example

Request

curl -u apiuser:test -X POST https://www.factorsnetwork.com/api/creditors.json \ -d "companyName=Factoring Inc."
						

Response

{
  "creditor":{
    "uuid":"e6aaa036-2121-d11d-dd33-869ffac113be",
    "companyName":"Factoring Inc.",
    "contactName":null,
    "contactPhone":null,
    "contactFax":null,
    "contactEmail":null,
    "address1":null,
    "address2":null,
    "city":null,
    "state":null,
    "country":null,
    "postalCode":null,
    "createdDate" : 1441356834403,
    "totalUploadedAccounts" : 10,
    "lastUploadedDate" : 1436452046537
  }
}

Note: Responses will not be pretty printed when using the API, but have been formatted here for documentation purposes.