Basics - Ascent Global Logistics

Basics

In order to use the PEAK Connect API, there are some basics you will need to understand.

Resource URL

QA: http(s)://qa-connect.ascentgl.com/v1/authenticate.{xml,json}?username=&password=

Production: http(s)://connect.ascentgl.com/v1/authenticate.{xml,json}?username=&password=

*The current version will change over time

URL Format

PEAK Connect resource URLs all conform to the same general format:
http(s)://<server name>/<version>/<resource name>.<format>

 

Where:

  • is either qa-connect.ascentgl.com for the testing environment or connect.ascentgl.com for the production environment
  • determines which version of the resource will be accessed, and is in the format V#. Currently, all resources should be accessed with a version of V1
  • is the documented name of the resource being accessed
  • is one of xml or json
  • Content types – XML or JSON

With the exception of the Authenticate resource, which is an HTTP GET method, all PEAK Connect resources are implemented as HTTP POST methods. All of the POST resources can accept either XML or JSON formatted request bodies, and all will provide either XML or JSON formatted response bodies. The format used is determined by 2 means:

 

  • In the HTTP request header, the Accepts and Content-Type header fields can be set to application/xml or application/json
  • As part of the resource URL, a suffix to the resource name of either .xml or .json

 

For example, the URL: http://connect.ascentgl.com/v1/authenticate.xml will return an XML formatted response body, assuming the HTTP header value are set appropriately

Authentication and Access Control

All PEAK Connect endpoints require an access token which allows access to the endpoint resource. These tokens are returned in the response from the Authenticate resource on a successful login. A token is valid for 24 hours from the time it is issued, after which it can no longer be used to authenticate subsequent requests. Once your token has expired, you will need to submit a new request to the Authenticate resources to retrieve a fresh token. When an expired token is sent in a resource request, the service will respond with an HTTP 401 status code.

 

While a token can be used continuously until the HTTP 401 is returned, you can also compare the expiration fields in the token to determine whether your next request would succeed or not. If the expiration has passed a new Authenticate request can be made to retrieve a fresh token.

Authentication and Access Control

HTTP Codes Definition
200 Success: See response body for result payload.
400 Bad input: Required fields missing from input, are malformed or are too numerous.
401 Unauthorized: Authentication failure; invalid credentials.
500 Internal server error: General service failure; retry request.

Thank you for contacting Ascent!
A member of our team will be in contact within a few business hours.
Okay

Request a quote

				
					<div id="zf_div_4oQmOZd_9JXIw2F7Kih3HivRVFGTzMxXrnkfgcgIuCw"></div><script type="text/javascript">(function() {
try{
var f = document.createElement("iframe");
f.src = 'https://forms.zohopublic.com/ascentlogistics5/form/OBCCampaignForm/formperma/4oQmOZd_9JXIw2F7Kih3HivRVFGTzMxXrnkfgcgIuCw?zf_rszfm=1';
f.style.border="none";
f.style.height="978px";
f.style.width="90%";
f.style.transition="all 0.5s ease";
f.setAttribute("aria-label", 'OBC\x20Campaign\x20Form');

var d = document.getElementById("zf_div_4oQmOZd_9JXIw2F7Kih3HivRVFGTzMxXrnkfgcgIuCw");
d.appendChild(f);
window.addEventListener('message', function (){
var evntData = event.data;
if( evntData && evntData.constructor == String ){
var zf_ifrm_data = evntData.split("|");
if ( zf_ifrm_data.length == 2 || zf_ifrm_data.length == 3 ) {
var zf_perma = zf_ifrm_data[0];
var zf_ifrm_ht_nw = ( parseInt(zf_ifrm_data[1], 10) + 15 ) + "px";
var iframe = document.getElementById("zf_div_4oQmOZd_9JXIw2F7Kih3HivRVFGTzMxXrnkfgcgIuCw").getElementsByTagName("iframe")[0];
if ( (iframe.src).indexOf('formperma') > 0 && (iframe.src).indexOf(zf_perma) > 0 ) {
var prevIframeHeight = iframe.style.height;
var zf_tout = false;
if( zf_ifrm_data.length == 3 ) {
iframe.scrollIntoView();
zf_tout = true;
}
if ( prevIframeHeight != zf_ifrm_ht_nw ) {
if( zf_tout ) {
setTimeout(function(){
iframe.style.height = zf_ifrm_ht_nw;
},500);
} else {
iframe.style.height = zf_ifrm_ht_nw;
}
}
}
}
}
}, false);
}catch(e){}
})();</script>