Skip to main content

Service Documentation CUSTOMER EXPOSED SERVICE: "Data Push"

Service Overview

To enable ADO to perform push operations on the database, the client must expose a RESTful web service utilizing the OAuth2 authentication method. This service should expose the following methods:

Token Service

    Description: This service issues an OAuth2 authentication token to authorize subsequent requests to the database push service. HTTP Method: POST Input Parameters:
      grant_type (String): Type of HTTP authentication. username (String): Username for token retrieval. password (String): Corresponding password for token retrieval. Response:
        access_token (String): Issued access token. token_type (String): Generated token type. expires_in (Int): Token expiration time in minutes. issued (String): Token issuance date and time. expires (String): Token expiration date and time.

        Http consumption Example:

        curl -X POST http://localhost:62859/api/token \
        -H "Content-Type: application/x-www-form-urlencoded" \
        -d "grant_type=password&username=admin&password=contraseña"

        Request Body Example

         {
            "access_token": "laK8SdjrKUAN7ja4SicUS-mL8eNWW74OTU2ZmSzjABLCGUgZknEifQkNtd5F20pBQiWvDpVwda9Bf31hB-mnzJLWmuKYY1sygHT37RQGI3Ym1HkLHwduutHwze2m9ZSBWCSV9NgOjO5Zd0Rcl9eexjFOS7cR6lOIZxxu31rLI_mHMbgtdSMAG-gToiHkgeXw6zbYjVaO1IzKMDjczyLZuvlYOfKNiJeh-3XbfjRxUy0",
            "token_type": "bearer",
            "expires_in": 59,
            ".issued": "Mon, 27 Jul 2020 20:38:24 GMT",
            ".expires": "Mon, 27 Jul 2020 20:39:24 GMT"
        }

        SERVICE PUSH DATABASE

        Push to Database

          Description: This service receives a list of documents to be signed and stores them in the database. HTTP Method: POST Input Parameters:
            JsonTransaction (JSON): JSON object containing transaction information in progress. Authorization (String): Authentication token (in request header). Response:
              200: Process completed successfully. 401: Authorization failure. 500: Internal server error.

              Http consumption Example:

              curl -X POST http://localhost:62859/api/Integration/Documents \
              -H "Authorization: Bearer {token}" \
              -H "Content-Type: application/json" \
              -d '{
                 "Uid":"d3a0bc78a0c344c48f1951a9e181c6b2",
                 "StartingDate":"2024-05-05T19:43:31.968755-05:00",
                 "CreationDate":"2024-05-05T19:43:28.0930662-05:00",
                 "CreationIP":"127.0.0.1",
                 "DocumentType":1,
                 "IdNumber":"1193539722",
                 "FirstName":"ROGER",
                 "SecondName":"JAVIER",
                 "FirstSurname":"DE AVILA",
                 "SecondSurname":"ARIAS",
                 "Gender":"M",
                 "BirthDate":"1990-05-03T00:00:00",
                 "PlaceBirth":"BOGOTÁ D.C. (BOGOTÁ D.C.)",
                 "TransactionType":1,
                 "TransactionTypeName":"Enroll",
                 "IssueDate":"2008-05-08T00:00:00",
                 "AdoProjectId":"126",
                 "TransactionId":"8676",
                 "ProductId":"1",
                 "ComparationFacesSuccesful":false,
                 "FaceFound":false,
                 "FaceDocumentFrontFound":false,
                 "BarcodeFound":false,
                 "ResultComparationFaces":0.0,
                 "ComparationFacesAproved":false,
                 "Extras":{
                    "IdState":"8676",
                    "StateName":"Proceso satisfactorio"
                 },
                 "Scores":[
                    {
                       "Id":8676,
                       "UserName":"Rest",
                       "StateName":"Proceso satisfactorio",
                       "StartingDate":"2020-08-05T19:43:31.968755-05:00",
                       "Observation":"Calificado automáticamente - Rest_Close"
                    }
                 ]
              }'