Cohesive
  • 👋 Welcome!
  • ✨Getting Started
  • Reference
    • API Documentation
      • POST: upload
      • POST: upload_async
      • Guide: Having a custom response schema
        • Template: Metrics Data
        • Template: Order Data
      • Guide: Tabular Data
    • Workflow Documentation
      • Overview
      • Templates
        • Lists
        • Math Expressions
        • Date Expressions
      • Integrations
        • ERP Integrations
        • CRM Integrations
        • Communication Integrations
    • Security Policy
Powered by GitBook
On this page
  1. Reference
  2. API Documentation

Guide: Having a custom response schema

PreviousPOST: upload_asyncNextTemplate: Metrics Data

Last updated 1 year ago

For API requests, Cohesive supports semantic instructions for structuring the API response. You can specify a JSON response format in the request, and Cohesive will extract and return the data in the requested structure.

Provide comments (via //<comment>) to help describe or provide more instructional context into the data request

Example: time-based metric import

Note: this schema is available as a template. This example simply illustrates how it could be custom-defined.

For the above metric data, we could pass in a request specifying the JSON response format as below:

Cohesive would then return all of the processed metrics in the requested response structure:

Example operational metrics
This schema can be provided via API request or in Cohesive's workflow builder platform
Data will be returned in the API response (or in the workflow builder platform) in the specified structure