We come all through the state of affairs, the place we’re going to use POSTMAN software program program instrument to have a look at the working of exterior API. Postman is a simple GUI for sending HTTP requests and viewing responses. REST suppliers might be present in sage x3 that returns data in a JSON format. On this weblog, we’ll visualize the mapping of fields from postman to x3 Rest internet suppliers.
Occasion: In Postman IDE,
— Request is the very best method attainable to make http calls.
Request contains of Request Methodology, Request URL, Authorization, Request
Header, Request Physique.
Request Methodology: Request methodology defines the type of request to be made.
There are primarily 4 request methods, used for creating/updating, retrieving
and deleting data.
- POST Request — For Creating Or
- PUT Request — For
- GET Request — For
- DELETE Request — For Deleting data.
Put up Methodology, A POST request is a way that is used when we have now to
ship some additional knowledge contained within the physique of the request to the server.
Request URL:URL to make the http request. Enter all the URL on URL
c. Authorization: An authorization token, included with requests, is used to ascertain the requester. Select the Main Auth on Type self-discipline and enter official Username and Password.
Request Header: In request headers it contains key-value of the
Content material material-Type
— A content-type describes the format of object data. Content material material-type, i.e.,
software program/json which is used for the requests and responses
Request Physique: Physique Space contains
the data, relies upon type of request methodology, to be despatched with request, raw sort
of knowledge is used for sending request.
2.HTTP Response — On click on on of Ship Button, Response will present in JSON Format.
REST Internet suppliers
All->Administration->Administration->Rest Internet suppliers
Title Space : Enter any individual outlined self-discipline
Base URL : Enter
the realm title of the URL
Enter solely space title: http://reqres.in
from full path: http://reqres.in/api/clients
Content material material-Type: Choose Json
Authentication: Choose Main Authentication and Enter credentials ,Username and
password used for authenticate the API
Parameters: PARAM tab in postman is mapped with Parameters fields in X3 as Key value Pair
Code Snippet to call exterior API
##Declaration of Variables utilized in executing
LOCAL CHAR YAPI(250),YURI(250),PCOD(100)(1..100),
LOCAL CLBFILE YMTD,YREQBODY,YRESBODY,RESHEAD(0)
LOCAL CLBFILE RESBODY
LOCAL INTEGER RETVAL
##Declaring Header ,Methodology and Path of URL
“Content material material-Type”
##Title EXEC_REST_WS Methodology from
ASYRRESTCLI library carry out
is specified by Key-value pair, Header ought to incorporate authorization and
the variable HCOD(1)- Header code of array index 1 to Authorization.
the variable HVAL(1) -Header variable of array index 1 to username and password
separated with Colon.
the variable HCOD(2)- Header code of array index 2 to Content material material-type.
the variable HVAL(2)- Header variable of array index 2 to software program/Json.
the variable YMTD-Form of Methodology used to
string value “POST”
the variable YAPI -REST internet service Title to ” CreateID “
the variable YURI with the remaining part of URL
declare Response physique variable
Assign the YREQBODY variable to enter
EXEC_REST_WS carry out from ASYRRESTCLI library with all required parameters and
will return standing code as integer value which displays success or failure and
finish outcome json format is saved in YRESBODY Variable.
there could also be an requirement of sending Username and password immediately by code
with out passing in REST webservices. Clarification with state of affairs,
Login authentication show display screen, whether or not it’s worthwhile then go these credentials to
the REST internet suppliers by code, In that case Header variable ought to incorporate
Code HCOD(1) as “Authorization” and
Val HVAL(1) as ” Main MTcwZWU5MmEyODOTo= “
“Main” adopted by BASE 64 format of Username: Password
the weblog for the ASYRRESTCLI carry out and its parameters to be handed for the
“The narration of carry out and its parameter used to call an exterior/outgoing REST internet service from ASYRRESTCLI library”
Few Guidelines of Standing
Code and its description
1.200 -Worthwhile request.
2.201 -Worthwhile request and knowledge
3.204 -Empty Response.
4.400 -Harmful Request.
5.401 -Unauthorized entry
6.403 -Forbidden, Entry denied.
7.404 -Data not found.
8.405 -Methodology Not Allowed or
Requested methodology is simply not supported.
9.500 -Inside Server Error.
Response from API whereas executing the code above in X3.
This weblog helps us to know the mapping of fields from POSTMAN instrument to X3 REST internet suppliers and code used to call an exterior API by the usage of EXEC_REST_ES carry out by passing credentials in header variables.
Greytrix – a globally acknowledged and certainly one of many oldest Sage Gold Progress Affiliate is a one-stop reply provider for Sage ERP and Sage CRM organizational needs. Being acknowledged and rewarded for multi-man years of experience, we ship full end-to-end assist in your technical consultations, product customizations, data migration, system integrations, third-party add-on enchancment and implementation competence.
Greytrix caters to a wide range of Sage X3, a Sage Enterprise Cloud Decision, selections. Our distinctive GUMU integrations embody Sage X3 for Sage CRM, Salesforce.com, Dynamics 365 CRM and Magento eCommerce along with Implementation and Technical Assist worldwide for Sage X3. In the intervening time we’re Sage X3 Implementation Affiliate in East Africa, Middle East, Australia, Asia, US, UK. We moreover present best-in-class Sage X3 customization and development services, built-in functions equal to POS | WMS | Payment Gateway | Shipping System | Business Intelligence | eCommerce and have developed add-ons equal to Catch – Weight and Letter of Credit and India Legal guidelines for Sage X3 to Sage enterprise companions, end clients and Sage PSG worldwide.
Greytrix is a acknowledged Sage champion ISV Affiliate for GUMU Sage X3 – Sage CRM integration moreover listed on Sage Marketplace; GUMU integration for Sage X3 – Salesforce is a 5-star rated app listed on Salesforce AppExchange and GUMU integration for Dynamics 365 CRM – Sage ERP listed on Microsoft AppSource.
For additional knowledge on Sage X3 Integration and Suppliers, please contact us at email@example.com, We’re going to prefer to hearken to from you.