Login a user

Login tries to login a user. In order to enable Customers to login they need to be created with an Account.

Request
Request Body schema:

Must include LoginName and Password. CultureCode and IncludeCompanies are optional.

LoginName
string

User login name MaxLength: 255

Password
string

User's password MaxLength: 4000

CultureCode
string

Specifies in which language to display culture specific information. If none is supplied, value is resolved from Application. MaxLength: 16

IncludeCompanies
string

Include full company data, if any, with the customer. Otherwise only primary company, if any, is included. Default is true. MaxLength: bool

Responses
200

Success

400

Bad Request

Key: AccountCustomerMissing. Gets raised when the customer is missing for the account.

Key: LoginFailed. Gets raised when the login name or password is incorrect.

500

Internal Server Error

post/CustomerService.svc/rest/LoginPost
Request samples
{
  • "LoginName": "string",
  • "Password": "string",
  • "CultureCode": "string",
  • "IncludeCompanies": "string"
}
Response samples
{
  • "Id": 0,
  • "Key": "string",
  • "Code": "string",
  • "Email": "string",
  • "SSN": "string",
  • "FirstName": "string",
  • "LastName": "string",
  • "Phone": "string",
  • "CellPhone": "string",
  • "ReferId": 0,
  • "ReferUrl": "string",
  • "Account": {
    },
  • "Companies": [
    ],
  • "DeliveryAddresses": [
    ],
  • "InvoiceAddress": {
    },
  • "Flags": [
    ],
  • "UseInvoiceAddressAsDeliveryAddress": true,
  • "Info": [
    ],
  • "PricelistIds": [
    ],
  • "CrmId": "string",
  • "IsActive": true,
  • "Created": "2019-08-24T14:15:22Z",
  • "Updated": "2019-08-24T14:15:22Z"
}