Decription
Here is a step by step of the basic operation of WS-ARD:
Remark: using the example homologation ws-ard (192.168.54.165)
Step 1.
It is necessary for the client to authenticate according to the application it uses (GW or Express)
1.1 Authentication SiTefGw
Method: POST
Endpoint: https://192.168.54.165:9090/wsard/v1/auth/sitefgw
JSON with access credentials:
{
"LoginTO":{"login": "[email protected]",
"senha": "Express@1234"
}
1.2 Authentication SiTefGw Full
Method: POST
Endpoint: https://192.168.54.165:9090/wsard/v1/auth/sitefgwfull
JSON with access credentials:
{
"LoginTO":{
"login": "[email protected]",
"senha": "Express@1234"
}
}
1.3 Authentication SiTef Express
Method: POST
Endpoint: https://192.168.54.165:9090/wsard/v1/auth/sitefexpress
JSON with access credentials:
{
"LoginTO":{
"login": "[email protected]",
"senha": "Express@1234"
}
}
1.4 Authentication SiTef Martins
Method: POST
Endpoint: https://192.168.54.165:9090/wsard/v1/auth/sitefmartins
JSON with access credentials:
{
"LoginTO":{
"login": "[email protected]",
"senha": "Express@1234"
}
}
Remark: All these authentication endpoints are pointing to the same application that is a SiTef Express emulator
Step 2
It returns a token when authenticating with any of the previous endpoints in the following format
{
"token":
"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJob21vbG9nYWNhb0Bzb2Z0d2FyZWV4cHJlc3MuY29tLmJyIiwicGxhdGFmb3JtYSI6I
lNJVEVGX0VYUFJFU1MiLCJjbGllbnRlcyI6W3sic2VDbGllbnRlIjoiMjAwMDIxNyIsImNucGoiOiI2MC42MjEuOTkyLzAwMD
EtMDQifSx7InNlQ2xpZW50ZSI6IjIwMDAyNzYiLCJjbnBqIjoiMTIzIn0seyJzZUNsaWVudGUiOiIyMDAxMDg0IiwiY25waiI6Ij
M0NSJ9LHsic2VDbGllbnRlIjoiMjAwMDI4NSIsImNucGoiOiI1NjcifSx7InNlQ2xpZW50ZSI6IjIwMDYwOTMiLCJjbnBqIjoiNz
g5In0seyJzZUNsaWVudGUiOiIyMDAwODU5IiwiY25waiI6IjY1NSJ9XSwiZXhwIjoxNTg5NDExNTQwLCJpYXQiOjE1ODkzOT
M1NDB9.nugw7CuaA1pQ4bYWq35zWouC-REMUi-R47zezPIRSfePVBG4RJuomEL-
Of4FDp686OuRO2qz_u2JbHmZBQttXg",
"type": "Bearer"
}
This token is used to call the endpoints that should return data from the extract, below is an example of
endpoint:
2.1 Endpoint Sales
Method: GET
Endpoint: https://192.168.54.165:9090/wsard/v1/vendas?se_cliente=2000217&data=2019-01-10
Authentication Bearer:
TOKEN =
eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJob21vbG9nYWNhb0Bzb2Z0d2FyZWV4cHJlc3MuY29tLmJyIiwicGxhdGFmb3JtYSI6Il
NJVEVGX0VYUFJFU1MiLCJjbGllbnRlcyI6W3sic2VDbGllbnRlIjoiMjAwMDIxNyIsImNucGoiOiI2MC42MjEuOTkyLzAwMDE
tMDQifSx7InNlQ2xpZW50ZSI6IjIwMDAyNzYiLCJjbnBqIjoiMTIzIn0seyJzZUNsaWVudGUiOiIyMDAxMDg0IiwiY25waiI6Ij
M0NSJ9LHsic2VDbGllbnRlIjoiMjAwMDI4NSIsImNucGoiOiI1NjcifSx7InNlQ2xpZW50ZSI6IjIwMDYwOTMiLCJjbnBqIjoiNz
g5In0seyJzZUNsaWVudGUiOiIyMDAwODU5IiwiY25waiI6IjY1NSJ9XSwiZXhwIjoxNTg5NDExNTQwLCJpYXQiOjE1ODkzOT
M1NDB9.nugw7CuaA1pQ4bYWq35zWouC-REMUi-R47zezPIRSfePVBG4RJuomEL-
Of4FDp686OuRO2qz_u2JbHmZBQttXg
Remark:
- The Token used for authentication has a time, after this time it becomes invalid.
- The other endpoints are available at: Integration document with WS-ARD.docx
- The endpoint below returns the SE Client that the user has access to:
Method: GET
Endpoint:
Updated 15 days ago