Connectivity

All application services detailed here utilize OAuth 2.0 to authenticate and authorize consumers of the service. A client credentials grant type is used with the details in the endpoints section below. The authorization data should be added to the request headers of the call.

Environments

At Axiz, there are 2 main environments used, QA for testing your application and Production for live data transactibility.

QA Environment

  • Identity Server = https://qa.axizdigital.com/connect/token
  • API = https://qa.axizdigital.com

Production Environment

  • Identity Server = https://identity.goaxiz.co.za/connect/token
  • API = https://api.goaxiz.co.za

Generate Access Token

To obtain the access_token, the ClientID and ClientSecret used should be as basic authentication and the grant_type and scope goes in the body of the request.

Below is sample json for making a Postman call. 

{
  "info":{
    "_postman_id":"e699a51c-5ff6-418a-a211-15bf6cf45414",
    "name":"AVA OAuth",
    "schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item":[
    {
      "name":"OAuth Sample",
      "request":{
        "auth":{
          "type":"basic",
          "basic":[
            {
              "key":"password",
              "value":"UniquePassword",
              "type":"string"
            },
            {
              "key":"username",
              "value":"MyUsername",
              "type":"string"
            }
          ]
        },
        "method":"POST",
        "header":[

        ],
        "body":{
          "mode":"urlencoded",
          "urlencoded":[
            {
              "key":"grant_type",
              "value":"client_credentials",
              "type":"text"
            },
            {
              "key":"scope",
              "value":"axiz-api.markets axiz-api.erppricelist",
              "type":"text"
            }
          ],
          "options":{
            "raw":{
              "language":"json"
            }
          }
        },
        "url":{
          "raw":"https://identity.goaxiz.co.za/connect/token",
          "protocol":"https",
          "host":[
            "identity",
            "goaxiz",
            "co",
            "za"
          ],
          "path":[
            "connect",
            "token"
          ]
        }
      },
      "response":[

      ]
    }
  ],
  "protocolProfileBehavior":{

  }
}

 

The successful response results access token should be used for making any further requests for the said ClientScope

{
    "access_token": "eyJhbGciOiJSUz4554ImtpZCI6swYTk4ZWIwZjQxZjE0OTkwMjc3N........",
    "expires_in": 3600,
    "token_type": "Bearer"
}

Making requests

All requests should supply the Accept: application/json header. POST requests must specify the Content-Type: application/json header. Request and response bodies are JSON encoded.

Requests must be made over HTTPS. Any non-secure requests are met with a redirect (HTTP 302) to the HTTPS equivalent URI.

POST https://identity.goaxiz.co.za/api/services/app/somecall
Content-Type: application/json
Accept: application/json
Authorization: Bearer myOAuthAccessToken123

{
  "foo": "bar"
}

 

 

Need assistance? Email your inquiry to : digitalsupport@axiz.com