CStoreOffice® Support & Learning

Getting API Authorization Data

Before getting the authorization data, make sure you have the CStoreOffice® user created with access to all needed locations.

For more information on how to create a new user, see Getting Started with Cash Register Integration API.

API authorization data represents a token you need to generate using the credentials from your Petrosoft account. Please note that the token is expired after a certain period of time and you need to refresh it regularly.

To get the authorization token:

  1. Go to the Authorization API by the following the link:
    https://api-docs.petrosoft.cloud/?service=device_gateway_proxy_service
  2. In the Authorization API page, expand the Auth section.

  3. In the Auth section, expand the Get authorization token by credentials subsection.
  4. In the Get authorization token by credentials subsection, click the Try it out button, to enable the Request body section for entering data.

  5. In the Request body section:
  1. In the login field, enter your login.
  2. In the password field, enter your password.
  3. Use the credentials of your user created at the very beginning, such as authentication email as a login and the user password as a password. For more information, see Getting Started with Public Swagger Rest API.

  4. At the bottom of the section, click Execute.

    Result: The token is generated in the Responses section.

  1. Go to the Responses section > Response body subsection.
  2. Get your authorization data in the access_token field.

    In the refresh_token field, you will receive the value required to refresh your token after its expiration. For more information, see Refreshing API Authorization Data.

    For confidentiality reasons, the token data is blurred intentionally.

You can now use this token to authorize with Petrosoft APIs.