JSON Data Structure Sample: Parsing via Integromat Configuration

788 views
Skip to first unread message

rcra...@thearragroup.com

unread,
May 20, 2020, 3:50:59 PM5/20/20
to CATS API v3
Hi there CATS dev support, 

I have initially configured an Integromat HTTP => JSON request in order to set up various GET and PUSH ideas I have for our email system (AWeber) and other marketing projects and software. In this first step once I have the data structure I can then deploy it for multiple actions. 

I followed the API documentation to add the header details along with my API key inside their request editor along with ensuring the JSON output.  I’m trying to obtain a sample data structure using Integromat's JSON data request tool but I can’t find “sample data” structures that work in the generator.
  • I tried using the example data from the API listed under “activities” but that didn’t generate a structure as I got an Error (see below screenshot)
  • I have been following this tutorial vid from Integromat
  • What sample data should I put in here using https://api.catsone.com/v3  in order for the JSON generator to get the data structure?

Screen Shot 2020-05-20 at 2.31.15 PM.png



Another Possibility, Using Webhooks? 

I have been successful in using webhooks with Integromat to add candidates automatically to my email system (Aweber) but now I want to update candidate info back in CATS, so that I can specify those who have “subscribed” or “unsubscribed” via a tag or field. They do have a webhook for "action" to post a response but I'm not sure what to add in the "body" or "header" fields to successfully input the "subscribed" or unsubscribed" data back into my CATS database. If this is an easier approach, let me know, here is what I have so far but I don't know what to sue in the Body or Headers

Screen Shot 2020-05-20 at 3.35.17 PM.png


The trigger is watching subscribers added to my list, then getting their info from AWeber and posting a response to my webhook 


Response Options


Screen Shot 2020-05-20 at 3.32.36 PM.png


Advanced options


Screen Shot 2020-05-20 at 3.36.48 PM.png



Anthony Allan

unread,
May 20, 2020, 4:22:05 PM5/20/20
to CATS API v3
The examples given in our API docs are generally shortened for brevity, as the API can return thousands of lines depending on the particular request. Your best bet to generate an example response it to just make the GET request to the API yourself using something like Postman or CURL. That will return the exact data you will always get, and from that you or the application you are using should be able to deduce a structure.

To your second part, unless the application has some way to specify headers and body, then yeah you would be able to have it communicate with CATS, as CATS expect the data to come in a certain way.

One thing that might be worth looking into is Zapier. That is a service we integrate with that is meant to be a middleman in these sort of situations. It can take data from CATS, translate it into a format another system can understand, and then send it to them, and vice versa. You would just need to check and make sure that the other systems that you are trying to hook CATS up to also integrate with Zapier.

rcra...@thearragroup.com

unread,
May 20, 2020, 5:15:33 PM5/20/20
to CATS API v3
Thanks, Anthony. 

I was originally trying to use Zapier for this but I was directed to this forum because I got stopped by a Zap trying to search for a candidate using an email as an identifier. Here is the response I originally got from Chris K @ Cats that led me to this route 

"the "Find" Zap action is only available to search via the ID of that record in CATS, it cannot use other identifiers." 

In my current webhook I send the candidate info into AWeber I have (just now) updated that hook to include candidate_ID however, I do not have the ID in the rest of my database. 

In order to do that (update my current email database) 
  1. I would need to create an HTTP request to GET the data and then send it to match all subscribers by email
  2. then update a custom field I just created in AWeber (CATS ID) with this info candidate_id. 
  3. Once this is complete then I could go back to Zap and find my candidates to execute the original objective of updating CATS candidates with email subscriber status. 
    1. or I guess I could just use integromat at this point too.

Does that sound like the correct course here or should I think of this differently? 

Also, if you guys would create an integration like you did with Zap for Integromat that would be amazing because Zaps are expensive compared to Integromat (like 80% less) and more robust. 


rcra...@thearragroup.com

unread,
May 22, 2020, 6:39:10 PM5/22/20
to CATS API v3
So I've been trying POSTMAN and INSOMNIA to try and obtain sample JSON data following the API doc. 

I can't seem to get it to login to my database for a simple GET - I'm getting 404 errors, can you tell me what I'm doing wrong? There is certainly confusion on which Oauth I should use so I selected oauth 2.o and just added the never expiring token. This was timeline data from Insomnia, I edited my API key for privacy in the data set below. 

* Preparing request to https://api.catsone.com/v3
* Using libcurl/7.64.1 (SecureTransport) LibreSSL/2.8.3 zlib/1.2.11 nghttp2/1.39.2
* Current time is 2020-05-22T22:26:35.177Z
* Disable timeout
* Enable automatic URL encoding
* Enable SSL validation
* Enable cookie sending with jar of 0 cookies
* Found bundle for host api.catsone.com: 0x7fc491b13da0 [can multiplex]
* Re-using existing connection! (#0) with host api.catsone.com
* Connected to api.catsone.com (127.0.0.1) port 443 (#0)
* Using Stream ID: 5 (easy handle 0x7fc4901d3000)

> GET /v3 HTTP/2
> User-Agent: insomnia/7.1.1
> Content-Type: application/json
> Authorization: Bearer 9XXXXXXXXXXXXXXXX9eb
> Accept: */*
> Content-Length: 0

< HTTP/2 404 
< content-type: text/html; charset=UTF-8
< date: Fri, 22 May 2020 22:26:35 GMT
< expires: Mon, 26 Jul 1997 05:00:00 GMT
< last-modified: Fri, 22 May 2020 22:26:35 GMT
< server: nginx
< vary: Accept-Encoding
< vary: Accept-Encoding
< content-length: 849

* HTTP error before end of send, stop sending

rcra...@thearragroup.com

unread,
May 22, 2020, 6:44:36 PM5/22/20
to CATS API v3
Also - here is the URL I used in POSTMAN https://api.catsone.com/v3?content-type=application/json I've also tried it without this ending in v3 as the API doc says. In this version, I added the Key and Value for JSON my authorization is OAuth 2.o.

I'm unsure if I should be adding < API key > the carrots around my API key when I insert it into these types of programs? I've tried it both ways but that doesn't seem to work either.

DATA from POSTMAN

<!DOCTYPE html>
<html>

<head>
    <title>Error</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
    <meta name="robots" content="noindex,nofollow" />
    <meta charset="utf-8">
    <link rel="icon" href="images/favicon/cats.ico" type="image/x-icon" />
    <link rel="shortcut icon" href="images/favicon/cats.ico" type="image/x-icon" />
    <link rel="stylesheet" type="text/css" media="all"
    <link rel="stylesheet" type="text/css" media="all" href="/css/themes/milo/error.css">
</head>

<body class="error-page">

    <header>
        <figure></figure>
    </header>

    <main>
        <h2>Page not found.</h2>
        <p>The page you have requested does not exist.</p>
    </main>

</body>

</html>
Reply all
Reply to author
Forward
0 new messages