CompanyService
Use the CompanyService methods to work with company data, including creating, retrieving, and searching a company object.
The company master file contains profiles of all organizations with which your company does business, such as shippers, consignees, and companies responsible for payment of invoices. In addition, it may include profiles for any locations where you want to show resources, such as drop and hook locations, truck stops where you commonly schedule driver check calls, fuel stops, trailer wash sites, or trailer storage yards. Company profiles are recorded in the Company Profile window.
Endpoint Address: [SystemsLinkRootUrl]/CompanyService.svc
Methods
Method Name | Parameters | C# return type | Description | |
---|---|---|---|---|
Name |
C# data type |
|||
Delete |
companyId |
string |
void |
Delete a company object specified by its companyId. |
DeleteCompanyHourWindow |
companyHourWindow |
CompanyHourWindow |
void |
Delete a company hour window if the window exists. |
DeleteTankModel |
modelId |
string |
void |
Delete a tank specified by it modelId. |
Get |
companyId |
string |
Company |
Get a company by its companyId. |
GetAdHocAddress |
stpNumber |
int |
AdHocAddress |
Return an AdHoc address. |
GetClosestCompany |
originLatitude, orginLongitud, companies |
Decimal?, decimal?, List<Company> |
Company |
Return closest company based on latitude and longitude. |
GetCompanies |
ids |
List<string> |
List<Company> |
Return an enumerable list of companies. |
GetCompaniesForIds |
ids |
List<string> |
List<Company> |
Return a list of companies by the company’s Id. |
GetComapaniesWithTanks |
companyIds |
List<string> |
List<CompanyWithTanks> |
Return a list of companies with tanks. |
GetCompaniesWithTanksByAltId |
companyAltIds |
List<string> |
List<CompanyWithTanks> |
Return a list of companies with tanks by the company’s alternate Id. |
GetCompanyAllHourWindow |
companyId |
string |
List<CompanyHourWindow> |
Return all the open hour windows for a specific company. |
GetCompanyByAltId |
companyAltId |
string |
Company |
Get a company by an alternative Id. |
GetCompanyHourWindow |
companyId day |
string WindowDayEnum |
List<CompanyHourWindow> |
Return a list of company open hours window in a specific day. |
GetCompanyTankModel |
modelId |
string |
TankModel |
Return tank model. |
GetCompanyWithTanks |
companyId |
string |
CompanyWithTanks |
Return a list of companies with tanks. |
NewItem |
Company |
Create a new company object. |
||
Save |
company |
company |
Company |
Save the company object to the database. |
SaveCompanyHourWindow |
companyHourWindow |
companyHourWindow |
CompanyHourWindow |
If the company hour window passed in exists, return it, otherwise create a new one and save it. |
SaveCompanyWithTanks |
comp |
CompanyWithTanks |
CompanyWithTanks |
Save a company with tanks to the database. |
SaveTankModel |
tankModel |
tankModel |
TankModel |
Save the tank model to the database. |
Search |
filter |
FilterObjectOfCompany |
PagedResultOfCompany |
Return tank model. |
UpdateCompanyHourWindow |
companyHourWindow |
CompanyHourWindow |
void |
Update a company hour window with a specified CompanyHoursWindowId of CompanyHoursWindow. |
Properties and column mapping
Property | Database column | Comments | ||
---|---|---|---|---|
Name |
C# data type |
Name |
Data type |
|
Address1 |
string |
cmp_address1 |
varchar(100) |
|
Address2 |
string |
cmp_address2 |
varchar(100) |
|
Address3 |
string |
cmp_address3 |
varchar(100) |
|
AlternateCompanyId |
string |
cmp_altid |
varchar(25) |
|
CityId |
int? |
cmp_city |
int |
|
CompanyId |
string |
cmp_id |
varchar(8) |
|
Contact |
string |
cmp_contact |
nvarchar(40) |
|
DefaultBillTo |
string |
cmp_defaultbillto |
varchar(8) |
|
Directions |
string |
cmp_directions |
text |
|
IsAccountOf |
bool? |
cmp_accountof |
char(1) |
|
IsActive |
bool? |
cmp_active |
char(1) |
|
IsAtHomeLocation |
bool? |
cmp_athome_location |
char(1) |
|
IsBillTo |
bool? |
cmp_billto |
char(1) |
|
IsConsignee |
bool? |
cmp_consingee |
char(1) |
|
IsDepot |
bool? |
cmp_depot |
char(1) |
|
IsParent |
bool? |
cmp_parent |
char(1) |
|
IsPort |
bool? |
cmp_port |
char(1) |
|
IsRailRamp |
bool? |
cmp_railramp |
char(1) |
|
IsShipper |
bool? |
cmp_shipper |
char(1) |
|
IsSupplier |
bool? |
cmp_supplier |
char(1) |
|
Latitude |
decimal? |
cmp_latseconds |
decimal(11,3) |
|
Longitude |
decimal? |
cmp_longseconds |
decimal(11,3) |
|
Misc1 |
string |
cmp_misc1 |
varchar(254) |
|
Misc2 |
string |
cmp_misc2 |
varchar(254) |
|
Misc3 |
string |
cmp_misc3 |
varchar(254) |
|
Misc4 |
string |
cmp_misc4 |
varchar(254) |
|
Name |
string |
cmp_name |
varchar(100) |
|
OtherType1 |
string |
cmp_othertype1 |
varchar(6) |
|
OtherType2 |
string |
cmp_othertype2 |
varchar(6) |
|
OtherType3 |
string |
cmp_othertype3 |
varchar(6) |
|
OtherType4 |
string |
cmp_othertype4 |
varchar(6) |
|
ParentCompanyId |
string |
cmp_mastercompany |
varchar(8) |
|
PrimaryPhone |
string |
cmp_primaryphone |
varchar(20) |
|
RevType1 |
string |
cmp_revtype1 |
varchar(6) |
|
RevType2 |
string |
cmp_revtype2 |
varchar(6) |
|
RevType3 |
string |
cmp_revtype3 |
varchar(6) |
|
RevType4 |
string |
cmp_revtype4 |
varchar(6) |
|
SecondaryPhone |
string |
cmp_secondaryphone |
varchar(20) |
|
SubCompany |
string |
cmp_subcompany |
varchar(6) |
|
TaxId |
string |
cmp_taxid |
varchar(15) |
|
UpdateDateTime |
DateTime? |
cmp_updatedby |
varchar(20) |
|
UpdatedBy |
string |
cmp_updatedby |
varchar(20) |
|
ZipCode |
string |
cmp_zip |
varchar(10) |
CompanyHourWindow
Columns in Database Column Name are from the company_hourswindow database table. |
Property | Database column | Comments | ||
---|---|---|---|---|
Name |
C# data type |
Name |
Data type |
|
CompanyHoursWindowId |
int |
chw_id |
int |
|
CompanyId |
string |
cmp_id |
varchar(8) |
|
WindowType |
WindowTypeEnum |
WindowType |
varchar(6) |
|
WindowDay |
WindowDayEnum |
WindowDay |
varchar(6) |
|
WindowStart |
DateTime |
WindowStart |
datetime |
|
WindowEnd |
DateTime |
WindowEnd |
datetime |
|
ForecasterRestrict |
bool |
Not mapped to database. |