EasyRoutes API Getting Started Guide (Beta)

EasyRoutes API is currently in closed beta. Please contact us if you are interested in early access!

Set up API client ID and secret key

To enable API access, go to EasyRoutes Settings > API settings and click Generate API Key .

Your Client ID is associated with your shop and always available through this settings page. However, the Secret key is only available immediately after it is generated. The secret key should be copied and stored in a secure location. If you forget your secret key, you will have to rotate it to a new one.

Authenticating and making requests

See our EasyRoutes Routes API article for full API documentation.

To get started, exchange your client ID and secret key for a short-lived access token using the /authenticate endpoint.

curl -X POST \                                                                                                   
-H "Content-Type: application/json; charset=utf-8" \
-d '{
        "clientId":"...",
        "client_secret":"..."
    }' \
https://easyroutes.roundtrip.ai/api/2024-07/authenticate

You can then use the access token to retrieve routes like so:

curl \
-H "Authorization: Bearer ..." \
https://easyroutes.roundtrip.ai/api/2024-07/routes

Rotating Secrets

Forgot your secret key? If you have forgotten your secret key, you can initiate a key rotation to generate a new one. During the rotation, both the old key and the newly generated one will be valid for API authentication.

Once again, the new secret key is only viewable immediately after you generate it. Please copy and store it in a secure location before completing the rotation!

Once you have migrated clients to the new key, click the Finish rotation button to disable the old key. You can also cancel the rotation at any time to disable the new key instead.

Learn more about our API

Now that you have setup your initial API access, learn more about our API below:

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.