Register new company
Description
Register a new company to the portal.
Method
URL: https://api.free2convey.co.uk/api/PortalCompany/CreatePortalCompany
Type: POST
Input parameters
Name Type Length Description Mandatory
CompanyId int Company id No
CompanyName string 128 Company name Yes
Address1 string 256 Address 1 Yes
Address2 string 256 Address 2 No
Address3 string 256 Address 3 No
Town string 128 Town No
County string 128 County No
PostCode string 8 Postcode Yes
CompanyPhoneNo string 32 Company phone number No
CompanyFaxNo string 32 Company fax number No
CompanyEmailAddress string 254 Company email address Yes
CompanyIsGuest bool Company is guest No
UserTitle string 16 User title Yes
UserFirstName string 64 User first name Yes
UserLastName string 64 User last name Yes
UserEmail string 256 User email address Yes
UserPhoneNo string 32 User phone number No
UserMobileNo string 32 User mobile number No
UserFaxNo string 32 User fax number No
Input example
{  
   "CompanyId":"null",
   "CompanyName":"David & Company",
   "Address1":"First Floor,  Green House",
   "Address2":null,
   "Address3":null,
   "Town":"London",
   "County":"Holborn",
   "PostCode":"AA11 1AA",
   "CompanyPhoneNo":null,
   "CompanyFaxNo":null,
   "CompanyEmailAddress":"office@domain.co.uk",
   "CompanyIsGuest":false,
   "UserTitle":"Mrs",
   "UserFirstName":"David",
   "UserLastName":"Calderon ",
   "UserEmail":"david.calderon@domain.co.uk",
   "UserPhoneNo":null,
   "UserMobileNo":null,
   "UserFaxNo":null
}

Output
On success: true
On error: false
Exceptions
Exception type Exception message
CompanyNameExistsException There already exists a company with the same name
CompanyEmailAddressExistsException There already exists a company with the same email address
UserEmailAddressExistsException There already exists a user with the same email address
RegisterCompanyValidationException Data validation failed: [validation errors]
Register new company2
Description
Register a new company to the portal and return the newly created company id.
Method
URL: https://api.free2convey.co.uk/api/PortalCompany/CreatePortalCompany2
Type: POST
Input parameters
Name Type Length Description Mandatory
CompanyId int Company id No
CompanyName string 128 Company name Yes
Address1 string 256 Address 1 Yes
Address2 string 256 Address 2 No
Address3 string 256 Address 3 No
Town string 128 Town No
County string 128 County No
PostCode string 8 Postcode Yes
CompanyPhoneNo string 32 Company phone number No
CompanyFaxNo string 32 Company fax number No
CompanyEmailAddress string 254 Company email address Yes
CompanyIsGuest bool Company is guest No
UserTitle string 16 User title Yes
UserFirstName string 64 User first name Yes
UserLastName string 64 User last name Yes
UserEmail string 256 User email address Yes
UserPhoneNo string 32 User phone number No
UserMobileNo string 32 User mobile number No
UserFaxNo string 32 User fax number No
Input example
{  
   "CompanyId":"null",
   "CompanyName":"David & Company",
   "Address1":"First Floor,  Green House",
   "Address2":null,
   "Address3":null,
   "Town":"London",
   "County":"Holborn",
   "PostCode":"AA11 1AA",
   "CompanyPhoneNo":null,
   "CompanyFaxNo":null,
   "CompanyEmailAddress":"office@domain.co.uk",
   "CompanyIsGuest":false,
   "UserTitle":"Mrs",
   "UserFirstName":"David",
   "UserLastName":"Calderon ",
   "UserEmail":"david.calderon@domain.co.uk",
   "UserPhoneNo":null,
   "UserMobileNo":null,
   "UserFaxNo":null
}

Output
Name Type Length Description Mandatory
CompanyId int Company id Yes
Output example
{
   "CompanyId": 5
}

Exceptions
Exception type Exception message
CompanyNameExistsException There already exists a company with the same name
CompanyEmailAddressExistsException There already exists a company with the same email address
UserEmailAddressExistsException There already exists a user with the same email address
RegisterCompanyValidationException Data validation failed: [validation errors]
Register new user
Description
Register a new user to the portal.
Method
URL: https://api.free2convey.co.uk/api/PortalUser/CreatePortalUser
Type: POST
Input parameters
Name Type Length Description Mandatory
UserId int User id No
Email string 256 Email address Yes
CompanyId int Company id Yes
UserTitle string 16 User title Yes
UserFirstName string 64 User first name Yes
UserLastName string 64 User last name Yes
MobileNo string 32 Mobile number No
PhoneNo string 32 Phone number No
UserFaxNo string 32 Fax number No
RoleTemplateId int Role template id No
Input example
{  
   "UserId":0,
   "Email":"christine.maxwell@domain.co.uk",
   "CompanyId":1013,
   "MobileNo":null,
   "PhoneNo":null,
   "UserTitle":"Mrs",
   "UserFirstName":"Christine",
   "UserLastName":"Maxwell",
   "UserFaxNo":null,
   "RoleTemplateId":0
}

Output
On success: true
On error: false
Exceptions
Exception type Exception message
UserEmailAddressExistsException There already exists a user with the same email address
RegisterUserValidationException Data validation failed: [validation errors]
Register new user2
Description
Register a new user to the portal and return the newly created user id.
Method
URL: https://api.free2convey.co.uk/api/PortalUser/CreatePortalUser2
Type: POST
Input parameters
Name Type Length Description Mandatory
UserId int User id No
Email string 256 Email address Yes
CompanyId int Company id Yes
UserTitle string 16 User title Yes
UserFirstName string 64 User first name Yes
UserLastName string 64 User last name Yes
MobileNo string 32 Mobile number No
PhoneNo string 32 Phone number No
UserFaxNo string 32 Fax number No
RoleTemplateId int Role template id No
Input example
{  
   "UserId":0,
   "Email":"christine.maxwell@domain.co.uk",
   "CompanyId":1013,
   "MobileNo":null,
   "PhoneNo":null,
   "UserTitle":"Mrs",
   "UserFirstName":"Christine",
   "UserLastName":"Maxwell",
   "UserFaxNo":null,
   "RoleTemplateId":0
}

Output
Name Type Length Description Mandatory
UserId int User id Yes
Output example
{
   "UserId": 8
}

Exceptions
Exception type Exception message
UserEmailAddressExistsException There already exists a user with the same email address
RegisterUserValidationException Data validation failed: [validation errors]