Skip to content

Instantly share code, notes, and snippets.

@enriquesalceda
Last active March 21, 2018 07:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save enriquesalceda/852b50278001fc6d4331e1391087511b to your computer and use it in GitHub Desktop.
Save enriquesalceda/852b50278001fc6d4331e1391087511b to your computer and use it in GitHub Desktop.

Authentication

API Validation is performed through HTTP Basic Authentication using the CouriersPlease Account Number and Authorization Token. User Name: CouriersPlease Account Number Password: Sandbox or Production Token provided from the CouriersPlease API Developer Portal When using HTTP Basic Authentication the User Name and Password must be Base64 encoded in the header. If your CouriersPlease Account Number is W99999 and your token is ABC123456789 your Authentication Header would be “Authorization: Basic W99999:ABC123456789” before encoding it. Once encoded, it should look as follows: “Authorization: Basic Vzk5OTk5OkFCQzEyMzQ1Njc4OQ==”

SSL ENCRYPTION

Signature Hash Algorithm -> sha256 Public Key -> RSA (2048 Bits)

Request

https://api.couriersplease.com.au/v1/domestic/redirect?consignment=CPBBGRE0000005

SAMPLE REQUEST THAT RETURNS JSON

Below is a sample request that returns JSON. The HTTP Request Header must contain application e.g.) “Accept: application/json”. Ensure the user name and password is Base64 encoded in the authorization header as specified in the Authentication section of this document.

REQUEST URL

GET https://api.couriersplease.com.au/v1/domestic/redirect?consignment=[ConsignmentNumber] HTTP/1.1

REQUEST HEADER

Host: api.couriersplease.com.au Accept: application/json Authorization: Basic Vzk5OTk5OkFCQzEyMzQ1Njc4OQ==

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment