How to Log in to SAP B1 Service Layer Using Postman – Step-by-Step Guide
If you're working with SAP Business One (SAP B1) and need to access the Service Layer via Postman, this guide walks you through the entire process. Whether you're testing integrations or automating workflows, getting authenticated with a valid session is the first essential step.
Prerequisites
-
SAP B1 Service Layer is installed and running.
-
You have valid login credentials: Company DB, UserName, and Password.
-
Your PC can access the Service Layer server (e.g.,
https://192.168.1.100:50000
). -
Use https only if your server supports SSL; otherwise, use http.
Step-by-Step in Postman
Step 1: Open Postman
Launch Postman on your system.
Step 2: Create a New Request
-
Click "+" to open a new tab.
-
Set the method to POST.
-
Use this URL:
Step 3: Set Headers
In the Headers tab, add:
Step 4: Set Body
In the Body tab:
-
Select raw and choose JSON.
-
Enter the following (adjust values to your setup):
🔐 Replace
SBODEMOUS
with your actual database name.
🔐 Replacemanager
with your SAP B1 user credentials.
Step 5: Disable SSL Verification (Optional for Localhost)
If using a self-signed certificate or internal IP like 192.168.x.x
:
-
Go to Settings (top-right gear icon)
-
Navigate to General ➝ Disable SSL certificate verification
Step 6: Click Send
You’ll receive a response similar to: if service layer login succeed in postman showing this response
Save Session ID for Future Requests
Copy the SessionId
. For authenticated API requests (e.g., getting sales orders), include this header:
Troubleshooting Common Errors
More Postman Errors & Solutions
Error: connect ECONNREFUSED 192.168.1.100:50000
Cause: Can't connect to Service Layer server.
Solution: Check that the server is up, IP/port is correct, and no firewall blocks the request.
Error: self signed certificate
Cause: SSL certificate not trusted.
Solution: Disable SSL verification in Postman or switch to HTTP.
Error: Unsupported Media Type
Cause: Missing Content-Type
header.
Solution: Add Content-Type: application/json
and ensure body is in raw JSON format.
Error :
{
"error":
{
"code": -311,
"message":
{
"lang": "en-us",
"value": "Fail to get the bound database instance from SLD."
}
}
}
Solution - need to check Service layer Properly is not installed.
Error :
{
"error": {
"code": "-2028",
"message": "Customer record not found"
}
}
Postman query - https://fp2502.uneecopscloud.com:50000/b1s/v2/Orders?$filter=CardCode eq 'C23900'
SQL query for sql and hana - Find card record
Query :1
SELECT
"DocEntry",
"DocNum",
"CardCode",
"CardName",
"DocDate",
"DocTotal"
FROM
"YourDatabaseName"."ORDR"
Other Error : 1
{
"error": {
"code": "-2028",
"details": [
{
"code": "",
"message": ""
}
],
"message": "No matching records found (ODBC -2028)"
}
}
Other Qurey :
https://192.168.1.100:50000/rs/v1/LoadAuthorizedCRList
https://sap1009.uneecopscloud.com:60020/login
For hana in postman:
{
"CompanyDB": "database name",
"Password": "domain\\doamin user name",
"DBInstance": "domain\\SQL201910PL19",
"UserName": "password"
}
💡 Pro Tip
Save your request in Postman as a collection to reuse the login process in future API tests.
if you have any query please follow and contact us.
Thankyou for Visit.............................
0 Comments:
Post a Comment
pawarsolution