Authentication to the API occurs via HTTP Basic Authentication with TLS. Each call must be authenticated by providing an App ID and an API Key in the request.
Your App ID serves as the Basic Auth username and a Shop's API Key serves as the password.
By providing you with their API Key, a Shop gives you the ability to fetch rates for any of their product variants to any destination address. Your App ID will work in conjunction with any Shop as long as you have their API Key.
All API requests must be authenticated and must be sent over HTTPS.
Contact us to obtain an App ID. A Shop's API Key can be found in Settings > General in the Advanced Shipping Rules App.
Sample Authentication with cURL:
curl -I https://api.advancedshippingrules.com/rates -u APP_ID:API_KEY
The above line makes a HEAD request to the API, which validates your credentials. The response header will be either 200 OK upon success, or 401 Unauthorized if the credentials are invalid.
Note: cURL uses the -u flag to pass basic authentication credentials, with the username (App ID) and password (API Key) separated by a colon. If you need to authenticate by using an Authorization header, the username:password string must be base64 encoded (i.e. -H "Authorization: Basic <base64 encoded username:password>