Skip to content

Getting Started

This guide will help you make your first successful request to the CDS Global API.

By the end of this page, you’ll:

  • Obtain an access token
  • Make an authenticated API request
  • Understand how to move from sandbox to production

Get API Credentials

To access the API, you’ll need:

  • Client ID
  • Client Secret

If you don’t yet have credentials, contact your CDS account manager to request access.

Choose an environment

Two environments are available:

SandboxProduction
https://sandbox.cdsglobal.co.ukhttps://api.cdsglobal.co.uk

Use the sandbox environment to build and test your integration before going live.

Generate an access token

You can use the following request to get an access token for sandbox environment.

curl -X POST https://sandbox.cdsglobal.co.uk/v1/oauth2/token \
	 -H "Content-Type: application/x-www-form-urlencoded" \
     -d "grant_type=client_credentials" \
     -d "client_id=YOUR_CLIENT_ID" \
     -d "client_secret=YOUR_CLIENT_SECRET"

If your request is succesful, you'll receive a JSON response as following:

{
    "access_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6IkM5Q0JBNDhFNDlFOUJDMDc0RTUzNzJEMTM3NzM1OUMwNTNDQkRDMzkiLCJ4NXQiOiJ5Y3VramtucHZBZE9VM0xSTjNOWndGUEwzRGsiLCJ0eXAiOiJhdCt...",
    "token_type": "Bearer",
    "expires_in": 3600,
    "scope": "order.read"
}

TIP

The access token is valid for one hour, therefore this can be cached to avoid unnecessary requests to the token endpoint.

Make your first API request

Use the access token to call an API endpoint:

curl -X GET https://sandbox.cdsglobal.co.uk/v1/orders?email=john.doe@cdsglobal.co.uk \
	--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
	--header 'Content: application/json'

If successful, you’ll receive a JSON response containing order data.

Move to production

Once you’ve tested your integration in the sandbox environment:

  • Switch your base URL to the production endpoint
  • Use your production credentials
  • Ensure your application handles authentication and errors correctly

Next steps