About Paazl's REST API

This article gives a bird's eye view of how Paazl's REST API works and the high-level steps required to integrate it.

There are two ways you can integrate Paazl checkout functionality into your webshop. The quickest way is to integrate the Paazl checkout widget. Set up your server, add a few lines of code to your website, and you're up and running.

If you want to use your own delivery options UI, customize your integration of Paazl's checkout functionality by calling Paazl's REST API methods directly as described in this article.

How the REST API works

How_it_works_-_endpoints.png

Authentication

Paazl maximizes the security of your webshop's order process by using three-legged OAuth 2.0 authentication in which the "API Secret" (private key) is only known to your webshop. Your customers can only access the "API Key" (public key).

See Authentication & Authorization for an explanation of how Paazl's three-legged OAuth 2.0 authentication works and how to generate API keys.

The Paazl authorization string

The authorization string you include in the header of the method call can be one of two types:

  • Calls that only require the API Key, and
  • Calls that require the API Key and the API Secret

Calls requiring the API key

  • POST checkout
  • POST shippingoptions
  • POST pickuplocations

Example: Authorization: Bearer sI3flYhflh

Call requiring the API key and API secret

  • POST token
  • GET checkout
  • POST order
  • PUT order
  • DELETE order

Example: Authorization: Bearer sI3flYhflh:sdHlHkyunLKsoI94luilIlndD

Note!

In addition to the access token, Paazl allows you to white-list the URL of your webshop (and other sites). This is how you tell Paazl that you have explicitly authorized the party requesting tokens. We highly recommend that you use white-listing.

Prerequisites

There are no prerequisites other than the ability of your webshop to send REST API web service requests, and to receive the resulting responses.

You may want to whitelist the IP addresses of Paazl's authentication and API servers. The URL of the host concerned is: https://api.paazl.com/v1

Integration steps

The schematic diagram below gives an overview of the steps you need to take in order to add the Paazl checkout functionality to your checkout page using the Paazl REST API.

Integration_steps_-_endpoints.png

See Paazl REST API reference for more information on each endpoint and method.

Why save orders?

The main reasons for saving the details of an order once payment by your customer has been confirmed are so that later you can:

Use the POST order method to save an order's details to the Paazl database for the first time. See Paazl REST API reference for more information this method.

Changing an order's details

If you want to change a saved order's details, use the PUT order method. See Paazl REST API reference for more information this method.

Was this article helpful?