Import a Ready Preview
curl --request POST \
--url https://api.monaco.com/v1/tam/import \
--header 'Content-Type: application/json' \
--data '
{
"preview_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.monaco.com/v1/tam/import"
payload = { "preview_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({preview_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.monaco.com/v1/tam/import', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.monaco.com/v1/tam/import",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'preview_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.monaco.com/v1/tam/import"
payload := strings.NewReader("{\n \"preview_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.monaco.com/v1/tam/import")
.header("Content-Type", "application/json")
.body("{\n \"preview_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.monaco.com/v1/tam/import")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"preview_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"preview_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "IN_PROGRESS",
"attempt": 2,
"accounts": {
"total": 123,
"created": 123,
"already_existed": 123
},
"contacts": {
"total": 123,
"created": 123,
"already_existed": 123
},
"materialization": {
"ist_companies": {
"total": 123,
"created": 123,
"already_existed": 123
},
"ist_gold_companies": {
"total": 123,
"created": 123,
"already_existed": 123
},
"flattened_companies": {
"total": 123,
"created": 123,
"already_existed": 123
},
"accounts": {
"total": 123,
"created": 123,
"already_existed": 123
},
"account_icps": {
"total": 123,
"created": 123,
"already_existed": 123
},
"ist_persons": {
"total": 123,
"created": 123,
"already_existed": 123
},
"ist_employment_info": {
"total": 123,
"created": 123,
"already_existed": 123
},
"flattened_persons": {
"total": 123,
"created": 123,
"already_existed": 123
},
"contacts": {
"total": 123,
"created": 123,
"already_existed": 123
}
},
"selection": {
"rejected_companies": {
"total": 123,
"reasons": {}
},
"rejected_people": {
"total": 123,
"reasons": {}
},
"skipped_companies": {
"total": 123,
"reasons": {}
},
"skipped_inputs": {
"total": 123,
"reasons": {},
"records": [
{
"stage": "<string>",
"reason_code": "<string>",
"monaco_company_id": "<string>",
"monaco_person_id": "<string>"
}
],
"omitted_count": 123
}
},
"failure_reason": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"totals": {
"accounts": {
"created": 1,
"existing": 1,
"skipped": 1
},
"contacts": {
"created": 1,
"existing": 1,
"skipped": 1
}
},
"research": {
"status": "not_started",
"reason": "<string>",
"accounts_total": 1,
"accounts_done": 1,
"fields": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"flow_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"qualifier_cost": {
"unit_product": "<string>",
"charged": true,
"companies": 123,
"units": 123,
"unit_rate": 123,
"estimated_ai_signal_credits": 123,
"actual_ai_signal_credits": 123,
"rate_basis": "list",
"charged_operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
},
"meta": {
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "not_found",
"message": "Resource not found"
}
}TAM
Import a Ready Preview
Import the fixed selection from a Ready Preview. Repeating this command returns the same Import. A failed Import needs an explicit retry.
POST
/
v1
/
tam
/
import
Import a Ready Preview
curl --request POST \
--url https://api.monaco.com/v1/tam/import \
--header 'Content-Type: application/json' \
--data '
{
"preview_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.monaco.com/v1/tam/import"
payload = { "preview_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({preview_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.monaco.com/v1/tam/import', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.monaco.com/v1/tam/import",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'preview_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.monaco.com/v1/tam/import"
payload := strings.NewReader("{\n \"preview_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.monaco.com/v1/tam/import")
.header("Content-Type", "application/json")
.body("{\n \"preview_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.monaco.com/v1/tam/import")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"preview_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"preview_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "IN_PROGRESS",
"attempt": 2,
"accounts": {
"total": 123,
"created": 123,
"already_existed": 123
},
"contacts": {
"total": 123,
"created": 123,
"already_existed": 123
},
"materialization": {
"ist_companies": {
"total": 123,
"created": 123,
"already_existed": 123
},
"ist_gold_companies": {
"total": 123,
"created": 123,
"already_existed": 123
},
"flattened_companies": {
"total": 123,
"created": 123,
"already_existed": 123
},
"accounts": {
"total": 123,
"created": 123,
"already_existed": 123
},
"account_icps": {
"total": 123,
"created": 123,
"already_existed": 123
},
"ist_persons": {
"total": 123,
"created": 123,
"already_existed": 123
},
"ist_employment_info": {
"total": 123,
"created": 123,
"already_existed": 123
},
"flattened_persons": {
"total": 123,
"created": 123,
"already_existed": 123
},
"contacts": {
"total": 123,
"created": 123,
"already_existed": 123
}
},
"selection": {
"rejected_companies": {
"total": 123,
"reasons": {}
},
"rejected_people": {
"total": 123,
"reasons": {}
},
"skipped_companies": {
"total": 123,
"reasons": {}
},
"skipped_inputs": {
"total": 123,
"reasons": {},
"records": [
{
"stage": "<string>",
"reason_code": "<string>",
"monaco_company_id": "<string>",
"monaco_person_id": "<string>"
}
],
"omitted_count": 123
}
},
"failure_reason": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"totals": {
"accounts": {
"created": 1,
"existing": 1,
"skipped": 1
},
"contacts": {
"created": 1,
"existing": 1,
"skipped": 1
}
},
"research": {
"status": "not_started",
"reason": "<string>",
"accounts_total": 1,
"accounts_done": 1,
"fields": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"flow_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"qualifier_cost": {
"unit_product": "<string>",
"charged": true,
"companies": 123,
"units": 123,
"unit_rate": 123,
"estimated_ai_signal_credits": 123,
"actual_ai_signal_credits": 123,
"rate_basis": "list",
"charged_operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
},
"meta": {
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "not_found",
"message": "Resource not found"
}
}