General Description of the Feature
With this feature, the user can create a Branch and Location via API. Additionally, in the case of creating a Branch and Location manually, the system does not allow the user to enter a code shorter than four characters.
Create Branch API
Request:
{ "branch": { "BranchId": { "InternalCode": "", "DMSCode": "2" }, "Description": "Branch Description e1", "CompanyId": { "InternalCode": "bxoGdJ4g1kuz9mIMXgM-rQ", "DMSCode": "101" }, "RegionCode": { "InternalCode": "GOgq7WWdUUeGCm4LzpRcbA", "DMSCode": "110" } } }
Response:
{ "BusinessState": { "BusinessStatusName": "BusinessOk", "BusinessStatus": 0, "BusinessErrors": [] }, "Data": { "BranchId": { "InternalCode": "aNvZLh-5f06O67XLywUuSA", "ExternalCode": null, "DMSCode": "2", "ExternalSystemType": null }, "Description": "Branch Description e1", "CompanyId": { "InternalCode": "bxoGdJ4g1kuz9mIMXgM-rQ", "ExternalCode": null, "DMSCode": "101", "ExternalSystemType": null }, "RegionCode": { "InternalCode": "GOgq7WWdUUeGCm4LzpRcbA", "ExternalCode": null, "DMSCode": "110", "ExternalSystemType": null } } }
If the Company Id isn't exist user will get failed response
{ "BusinessState": { "BusinessStatusName": "BusinessFailed", "BusinessStatus": 2, "BusinessErrors": [ { "BusinessErrorType": 1, "BusinessErrorCode": 9948, "BusinessWarningCode": 0, "BusinessErrorDescription": "No Company found with this Id '8D4490DC0FC923x'", "BusinessErrorResourceKey": null, "IsValidationError": false, "SourceCode": null, "ExternalBusinessErrorCode": null } ] }, "Data": null }
Create Location
Request
{ "location": { "LocationId": { "InternalCode": "", "DMSCode": "12" }, "Description": "Location Description 1", "Phone1": "111111", "Phone2": "2222222", "MobilePhone1": "333333", "MobilePhone2": "4444444", "LocationEmail": "Location@email.com", "NoOfReviews": "4", "Rating": "2", "LocationType": "1", "InternalBPCode": { "InternalCode": "201150", "DMSCode": "101" }, "BranchId": { "InternalCode": "aNvZLh-5f06O67XLywUuSA", "DMSCode": "2" }, "LocationAddress": { "Street": "Ammochostou", "StreetNo": "19", "City": "Glyf", "PostalCode": "16561", "Country": { "InternalCode": "Greece", "DMSCode": "2" }, "Region": "4", "Latitude": "37.8798872", "Longitude": "23.7687796" } } }
Response
{ "BusinessState": { "BusinessStatusName": "BusinessOk", "BusinessStatus": 0, "BusinessErrors": [] }, "Data": { "LocationId": { "InternalCode": "c_essCNICUON2wZ2aDIBpg", "ExternalCode": null, "DMSCode": "12", "ExternalSystemType": null }, "Description": "Location Description 1", "Phone1": "111111", "Phone2": "2222222", "MobilePhone1": "333333", "MobilePhone2": "4444444", "LocationEmail": "Location@email.com", "NoOfReviews": 4, "Rating": 2, "LocationType": 1, "InternalBPCode": { "InternalCode": "201150", "ExternalCode": null, "DMSCode": "101", "ExternalSystemType": null }, "BranchId": { "InternalCode": "aNvZLh-5f06O67XLywUuSA", "ExternalCode": null, "DMSCode": "2", "ExternalSystemType": null }, "LocationAddress": { "Street": "Ammochostou", "StreetNo": "19", "City": "Glyf", "PostalCode": "16561", "Country": { "InternalCode": "Greece", "ExternalCode": null, "DMSCode": "2", "ExternalSystemType": null }, "Region": "4", "Latitude": 37.8798872, "Longitude": 23.7687796 } } }
This service is Billable
and complete the setupkey “GoogleGeocodingApiKey” with Geocoding API key
Geocode use these values of the request
Street, Street, Postal Code, Internal Code, Latitude and Longitude
If the Branch Id isn't exist user will get failed response
{ "BusinessState": { "BusinessStatusName": "BusinessFailed", "BusinessStatus": 2, "BusinessErrors": [ { "BusinessErrorType": 1, "BusinessErrorCode": 9948, "BusinessWarningCode": 0, "BusinessErrorDescription": "No Branch found with this Id 'mTdsjEbK2U2Z_TzYou-GQ'", "BusinessErrorResourceKey": null, "IsValidationError": false, "SourceCode": null, "ExternalBusinessErrorCode": null } ]
When the user tried to create Branch and Location manually add code shorter than 4 characters, then user gets error message
Create Branch
Create Location
Business Benefit
With this feature, the creation of a Branch and Location can be achieved in more than one way.
Configuration
Setup Keys
GeoCodingApiInLocationCreateUpdateEnabled This switch should be enable
GoogleGeocodingApiKey This setup key must be pre filed with API Key
Additional Information
This feature is implemented in version 4.2025.0
and patched in version 3.9.0-PROCAR
0 Comments