2 Authentication - Reference Documentation
Version: 2.1
2 Authentication
Service: AuthenticationURL:https://BASE_URL/j_spring_security_check
| Name | Description | Type | Required | Possible values |
|---|---|---|---|---|
| j_username | String | yes | ||
| j_password | password | String | yes | |
| ajax | String | yes | true |
Set-Cookie: JSESSIONID=6E3487971234567896704A9EB4AE501F; Path=/; HttpOnly
$ curl -H Cookie:JSESSIONID=6E3487971234567896704A9EB4AE501F https://BASE_URL/api/v1.0/orders
Success Output
If authentication was successful, it might redirect to https://BASE_URL/login/ajaxSuccess with a 302 code, that returns user and organization details in JSON format.{
"warning": {
"warning_code": "deprecated_version",
"warning_description": "All versions older than 1.0 version are deprecated and will be removed in the next release"
},
"success": true,
"token": "6E3487971234567896704A9EB4AE501F",
"user": {
"firstName": "Jane",
"lastName": "Doe",
"email": "foobar@example.com",
"address": null,
"city": null,
"country": null,
"postalCode": null,
"gender": null,
"phone": null,
"job": null,
"avatar": "1455115600210_1448038178_supportfemale.png",
"birthday": null,
"companyName": "entity1",
"companyDescription": null,
"companyPhone": null,
"companyFax": null,
"companyEmail": "foobar@example.com",
"companyWebSite": null,
"companyAddress": null,
"companyPostalCode": null,
"companyCity": "Sousse",
"companyCountry": "TN",
"isGeoLocationActivated": true,
"enableCheckStock": true,
"enableAssignRegionToCustomer": true,
"numberRefCarGenerated": 15,
"role": [
"ROLE_USER"
],
"enabled": true,
"homeBackground": null,
"organizationLogo": "/entity1-1450169988465/photoOrganization/***_1450349861417_valomnialogo.png",
"applicationColor": "#00567a",
"buttonsColor": "#a92c26",
"uploadDirectory": "/entity1-1450169988465",
"currency": {
"name": "EUR",
"symbol": "€",
"symbolLocation": "RIGHT",
"digitNumber": 2
},
"pricePrecedence": "HIGHEST",
"promotionPrecedence": "HIGHEST",
"taxPrecedence": "HIGHEST",
"emailCommand": "",
"emailCommandAddresses": [],
"termsOfSale": "",
"dueDiligence": "",
"checkInType": "BARR_CODE",
"uuid": null,
"appVersion": null,
"videoUploadLimit": 1073741824,
"companyRegistrationNumber": null,
"formattedVideoUploadLimit": "1,0 Go",
"totalUpload": 44045072,
"formattedTotalUpload": "42,0 Mo",
"worldPayConf": {
"serviceKey": null,
"clientKey": null
},
"declination": true,
"goodies": {
"startDate": null,
"endDate": null,
"goodiesBalance": 693.55
},
"userConfiguration": {
"isSignatureMandatory": false,
"isDeliverDateMandatory": true,
"isDueDiligenceMandatory": false,
"isCheckinMandatory": true,
"checkinRadius": 20,
"customerProximityRadius": 100,
"canApplyDiscount": true,
"canApplyPartialPayment": true,
"canReadBarCode": true,
"canDoSupportMarketing": false,
"notifyWithinNumber": 0,
"maxPartielDeliveryEchelon": null,
"maxDiscountRate": 50,
"notifyWithinType": "months",
"appointNotifyWithinNumber": 0,
"appointNotifyWithinType": "months",
"theme": "SELLER",
"askForReason": true,
"startTime": "8:00",
"endTime": "15:00",
"isGoodiesEnabled": true,
"canGoodiesAccumulate": true,
"canOrderIfCreditExceed": true,
"canDoPartialDelivery": false,
"canDuplicateItemInCart": false,
"canDoQuickOrder": true,
"generateOperationPdf": true
}
}
}*** with small or medium in the link url before the image's name, for example:
<BASE_URL>/entity1-1450169988465/photoOrganization/small_1450349861417_valomnialogo.png
***_ to get the original image size.Failure Output
The user will be redirected to https://BASE_URL/login/authfail?ajax=true on failure, and returns a JSON response.["14"]