Viewing 0 reply threads
  • Author
    Posts
    • #10614

      First we need to know is which API we will use, you can see in this link the API information, replace yoursitedomain.com with your domain.
      https://yoursitedomain.com/api-static/docs/#api-qr_codes-QRLink

      API Link

      How you can see in the image you need a Token for the Authenticate field, the vehicle ID and the asset ID for the request.

      You are going to use this API, replace the sitedomain.com for your domain.
      https://sitedomain.com/api/entities/link

      We need to use and tool to make the POST request. For example Postman
      https://www.getpostman.com/downloads/

      You can use the API login to generate the Token using your credentials of your Pegasus Gateway.

      API Login

      Example from API Login in Postman

      Request API Login

      Once with the session started you can do the request with the API link, in the tool Postman the session of the API Login is saved and you don’t need to add the Header Authenticate with the Token, but is you wanted you can take the data of the field auth of the response of the API Login.

      In the request select the method POST and use the URL provided previously, in the field Body select raw and JSON to send in this format, and type the parameters in JSON format, now only need to send the request.

      Request API Link

      If the response code is 200, the request was sent correctly.

      If you want to delete the association you can use the same URL API and only need to modify the method and the body, as shown in the image.

      Request API Unlink

      Only need to change the method to DELETE and send in the body the primary_id of the association.

Viewing 0 reply threads
  • You must be logged in to reply to this topic.