Claret Docs
  • Claret
  • Navigating these Docs
  • Using Claret
    • Getting Started
      • Navigating Claret
      • Global Settings
      • Setting up Modules
      • Transactional Data
      • Managing Views
  • Make
    • Make Planning
      • Make Planning Setup
  • Sell
    • Forecast Workbench
      • Forecasting Models
    • Long Term Planning
    • Sales Collaboration
      • Using Sales Collaboration
      • Collaborating on Sales Data
  • Transactional Data
    • Sales
      • Sales Data Import
      • Bulk Copying Sales Data
    • Supply Plans
      • Supply Plan Data Import
      • Bulk Copying Supply Plan Data
    • Inventory
      • Inventory Import
    • Exporting Data
  • Master Data
    • Calendars
    • Crop Locations
    • Crop Location Hierarchy
    • Customer Groups
    • Customer Group Hierarchy
    • Items
      • Finished Goods Items
      • Work in Process - aged Items
      • Crop Items
    • Item Hierarchy
    • Item @ Customer Groups
    • Item @ Locations
    • Location Maintenance
    • Recipes
    • Routings
    • Sale Types
    • Supply Types
  • Application Maintenance
    • Application Settings
    • User Admin
      • Managing User Privileges
      • Password Reset
      • SSO Integration
        • SAML 2.0 with Okta
  • Integrations
    • Overview
    • Data Interface Requirements
  • APIs
    • Authentication
    • Pagination
    • Public APIs
      • Sales Data
      • Supply Plans Data
Powered by GitBook
On this page

Was this helpful?

  1. APIs

Authentication

Claret API Authentication Processes

All Claret API calls are authenticated with tokens. Before making a call, you must authenticate first. You do this by first creating an authentication token and then use that token in the header of the subsequent API calls.

NOTE that all references to {tenant} should be replaced with the name of the Claret tenant (i.e., demo, zymoeno, etc.)

POST https://plan.claret.app/{tenant}/api/v1/tokens/create

Retrieve an authentication token from the Claret API endpoint

Query Parameters

Name
Type
Description

email*

String

The email address associated with the user account being authenticated

password*

String

The password associated with the user account being authenticated

A successful response will return a simple JSON payload containing the token value that should be used in each additional request.

Example:

{
    "token": "1|bfDoNPffjU6k541RYSLB68oEfHySweWJ2HSx34sZ"
}

Once the authentication token has been successfully retrieved, it can be used as a Bearer token within the header of each subsequent API call.

Example:

curl --location --request GET 'https://plan.claret.app/{tenant}/api/v1/sales?sale_type_name=History' \
--header 'X-Requested-With: XMLHttpRequest' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 1|bfDoNPffjU6k541RYSLB68oEfHySweWJ2HSx34sZ' \
PreviousData Interface RequirementsNextPagination

Last updated 1 year ago

Was this helpful?