QuantumDigital

FREE
By Quantum Postcards | Updated 4 days ago | eCommerce
Health Check

N/A

README

Planning Your Implementation
Any programming language, library or framework that supports HTTP actions and JSON should be compatible with our API. That includes popular technologies such as PHP 5.2+, PHP 7+, Python, JavaScript/Node.js and many more.

We recommend that you implement our API into your server-side webapp or trusted application. We do not recommend implementing it in a fully-frontend SPA or in other client-side code (e.g. in a mobile app), because it may be difficult to reliably protect your client secret in those cases.

Please secure your client secret in a safe place.

All requests to our API must be HTTPS. The API server is located at https://api.quantumdigital.com. We have enabled CORS support in the API.

Your client ID will be mapped to a single QuantumDigital account. That means that all orders, quotes, etc. that your end-users create via our API will reside under that account. End-users will not have their own accounts with us.

An example of a fully formed URL for one of our endpoints: https://api.quantumdigital.com/v1/producttypes.

All POST, PUT and PATCH requests should use the application/json content type, unless otherwise noted.

All responses from our API endpoints will be JSON, with the application/json content type, unless otherwise noted.

All route endpoints and query string parameter names should be specified in all lowercase. (e.g. “/producttypes”, not “/PRODUCTTYPES”)

When your Developer Platform access is first granted, your QuantumDigital API account will default to “Development / Testing” mode. This mode means that any orders your API client submits will be test orders, not real orders. Test orders will not be processed or fulfilled, and we will delete them after a while. We strongly recommend that you leave your account in development mode until your implementation is finished, tested to your satisfaction, and ready to “go live”. Then you should switch your account to “Production Mode” by logging into our Developer Platform and clicking on Developer Platform - API Information in the Tools area.

Authentication and Authorization
This API is secured with OAuth2, with the “client_credentials” grant. All requests to the endpoints listed below must include a valid access token in the Authorization header.

To acquire an access token, issue a POST to https://api.quantumdigital.com/oauth/token (don’t include the ‘v1’ in any oauth URLs) with the following information in the request body:

{
“grant_type”: “client_credentials”
}

And in the header:

Content-type: application/json
Authorization: Basic base64encoded({your-client-id}:{your-client-secret})

…where “base64encoded({your-client-id}:{your-client-secret})” is a base64-encoded string of your client ID and client secret concatenated together with a colon separator.

If authentication is successful (check for a HTTP 200), the response JSON will look like this:

{
“access_token”: “{your-access-token}”,
“token_type”: “Bearer”,
“expires_in”: {integer value representing the TTL of the access token. Number of seconds from the current time.}
}

Our access tokens are good for one year, in case you want to store your access token for awhile.

As mentioned earlier, all requests to our v1 endpoints (v1 = version 1 of our API) need to be authorized…in other words, they need to include the access token in the Authorization header. Construct the header like this:

Authorization: Bearer {your-access-token}

An HTTP 401 or 403 status code is returned on invalid authentication or authorization.

Response HTTP status codes
Successful requests will return a status code in the 2XX range. The endpoint docs below detail the exact returned status code. GET, PUT, PATCH requests will return a 200, POST requests will usually return a 201 and DELETE requests with an empty response body will return a 204.

Any status code in the 4XX or 5XX range should be treated as an error. The endpoint docs cover the possible 4XX error status codes. However, keep in mind that ANY endpoint could possibly return a 500 (which would indicate a server issue on our end.)

Followers: 0
Resources:
Product Website Terms of use
API Creator:
Rapid account: Quantum Postcards
Quantum Postcards
quantumpostcards
Log In to Rate API
Rating: 5 - Votes: 1