Welcome to the Clover platform REST API reference. This reference describes the function of each REST API endpoint in the sandbox environment.
Before you begin
- See Get started for more information about setting up your developer account and retrieving your first API token. The API token provides the necessary permissions to access test merchant data.
- Learn more with our blog post Fiddling Through Digital Keys: Clover Auth Tokens and Ecommerce Keys.
Prerequisites
To use the Clover platform API, you require the following:
- Sandbox developer account
- Test merchant account
- Test API token with permissions to make REST API requests and manage your test merchant's data
Use the API reference
To make a sample REST API call using the Clover API reference:
- From the left navigation pane, select MERCHANTS > Get a single merchant.
- In the Path Params section, enter your test merchant ID in the mId field. Your test merchant ID is a thirteen-character sequence of numbers. See Locate your test merchant ID for more information.
- In the Authentication section, enter your access token in the Bearer field. This value is the test API token that you have generated in the sandbox Developer Dashboard.
- Click Try It. In the JSON output response, the
name
value is your test merchant’s name.
Sample REST API requests
To retrieve information about your test merchant, send a GET
request to /v3/merchants/mId
:
curl --request GET \
--url 'https://sandbox.dev.clover.com/v3/merchants/{mId}' \
--header 'accept: application/json' \
--header 'authorization: Bearer {auth_token}'
In this request, mId
is the test merchant's universally unique identifier (UUID) and auth_token
is the API token (or access token). See Use test merchant IDs and API tokens for more information.
To update your test merchant's name, send a POST
request to /v3/merchants/mId
:
curl --request POST \
--url 'https://sandbox.dev.clover.com/v3/merchants/{mId}' \
--header 'accept: application/json' \
--header 'authorization: Bearer {auth_token}'
--data '{"name":"{updated_merchant_name}"}'
Set additional query parameters
To retrieve more information from your REST API requests, set query parameters for supported endpoints in the following format.
[Endpoint URI]?field=value[,additionalValues...]&[additionalQueryParameters...]
In the API documentation, the Query Params section lists the additional parameters available. For example, use the expand
query parameter for additional information about a merchant.
curl --request GET \
--url 'https://sandbox.dev.clover.com/v3/merchants/{mId}?expand=openingHours' \
--header 'accept: application/json' \
--header 'authorization: Bearer {auth_token}'
See Use expandable fields for more information.
Sandbox base URLs
Use the Android emulator or Developer Kits in the sandbox environment for building and testing your apps with test merchants. In the sandbox environment, Clover provides base URLs for different services:
API | URL |
---|---|
Platform API | https://sandbox.dev.clover.com |
Tokenization service API | https://token-sandbox.dev.clover.com |
Ecommerce service API | https://scl-sandbox.dev.clover.com |
See the Ecommerce API tutorials for more information.
NOTE
The Ecommerce API and all related features are currently available in the US and Canada. We will provide updated information as Clover extends availability for more regions.
Production base URLs
In the production environment, Clover provides base URLs for different services in supported markets.
API and region | URL |
---|---|
Platform API (North America: US and Canada) | https://api.clover.com |
Platform API (Europe) | https://api.eu.clover.com |
Platform API (Latin America) | https://api.la.clover.com |
Tokenization service API | https://token.clover.com |
Ecommerce service API | https://scl.clover.com |