Save a card definition draft
curl --request POST \
--url https://api.occtoo.com/v1/card-definitions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"tags": [
"<string>"
],
"displayOptions": {},
"propertyGroups": [
{
"name": "<string>",
"propertyIds": [
"<string>"
]
}
],
"properties": [
{
"id": "<string>",
"sourceId": "<string>",
"sourcePropertyId": "<string>",
"name": {},
"description": {},
"settings": {},
"delimiter": "<string>",
"order": 0,
"isHidden": false,
"isEditable": false,
"managedTagList": {
"listId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
]
}
'import requests
url = "https://api.occtoo.com/v1/card-definitions"
payload = {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"tags": ["<string>"],
"displayOptions": {},
"propertyGroups": [
{
"name": "<string>",
"propertyIds": ["<string>"]
}
],
"properties": [
{
"id": "<string>",
"sourceId": "<string>",
"sourcePropertyId": "<string>",
"name": {},
"description": {},
"settings": {},
"delimiter": "<string>",
"order": 0,
"isHidden": False,
"isEditable": False,
"managedTagList": { "listId": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
name: '<string>',
description: '<string>',
tags: ['<string>'],
displayOptions: {},
propertyGroups: [{name: '<string>', propertyIds: ['<string>']}],
properties: [
{
id: '<string>',
sourceId: '<string>',
sourcePropertyId: '<string>',
name: {},
description: {},
settings: {},
delimiter: '<string>',
order: 0,
isHidden: false,
isEditable: false,
managedTagList: {listId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'}
}
]
})
};
fetch('https://api.occtoo.com/v1/card-definitions', 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.occtoo.com/v1/card-definitions",
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([
'id' => '<string>',
'name' => '<string>',
'description' => '<string>',
'tags' => [
'<string>'
],
'displayOptions' => [
],
'propertyGroups' => [
[
'name' => '<string>',
'propertyIds' => [
'<string>'
]
]
],
'properties' => [
[
'id' => '<string>',
'sourceId' => '<string>',
'sourcePropertyId' => '<string>',
'name' => [
],
'description' => [
],
'settings' => [
],
'delimiter' => '<string>',
'order' => 0,
'isHidden' => false,
'isEditable' => false,
'managedTagList' => [
'listId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.occtoo.com/v1/card-definitions"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"displayOptions\": {},\n \"propertyGroups\": [\n {\n \"name\": \"<string>\",\n \"propertyIds\": [\n \"<string>\"\n ]\n }\n ],\n \"properties\": [\n {\n \"id\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"sourcePropertyId\": \"<string>\",\n \"name\": {},\n \"description\": {},\n \"settings\": {},\n \"delimiter\": \"<string>\",\n \"order\": 0,\n \"isHidden\": false,\n \"isEditable\": false,\n \"managedTagList\": {\n \"listId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.occtoo.com/v1/card-definitions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"displayOptions\": {},\n \"propertyGroups\": [\n {\n \"name\": \"<string>\",\n \"propertyIds\": [\n \"<string>\"\n ]\n }\n ],\n \"properties\": [\n {\n \"id\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"sourcePropertyId\": \"<string>\",\n \"name\": {},\n \"description\": {},\n \"settings\": {},\n \"delimiter\": \"<string>\",\n \"order\": 0,\n \"isHidden\": false,\n \"isEditable\": false,\n \"managedTagList\": {\n \"listId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.occtoo.com/v1/card-definitions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"displayOptions\": {},\n \"propertyGroups\": [\n {\n \"name\": \"<string>\",\n \"propertyIds\": [\n \"<string>\"\n ]\n }\n ],\n \"properties\": [\n {\n \"id\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"sourcePropertyId\": \"<string>\",\n \"name\": {},\n \"description\": {},\n \"settings\": {},\n \"delimiter\": \"<string>\",\n \"order\": 0,\n \"isHidden\": false,\n \"isEditable\": false,\n \"managedTagList\": {\n \"listId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"tags": [
"<string>"
],
"status": "Draft",
"etag": 123,
"displayOptions": {},
"propertyGroups": [
{
"name": "<string>",
"propertyIds": [
"<string>"
]
}
],
"properties": [
{
"id": "<string>",
"sourceId": "<string>",
"sourcePropertyId": "<string>",
"type": "Text",
"name": {},
"description": {},
"settings": {},
"delimiter": "<string>",
"order": 0,
"isHidden": false,
"isEditable": false,
"managedTagList": {
"listId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"valueType": "Value"
}
}
],
"pendingChanges": {
"set": [
{
"id": "<string>",
"sourceId": "<string>",
"sourcePropertyId": "<string>",
"type": "Text",
"name": {},
"description": {},
"settings": {},
"delimiter": "<string>",
"order": 0,
"isHidden": false,
"isEditable": false,
"managedTagList": {
"listId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"valueType": "Value"
}
}
],
"remove": [
"<string>"
]
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Card definitions
Save a card definition draft
Creates a draft card definition. Its card properties wait as pending changes, and it has no entries until it’s activated. Every card property must point at an existing source. 409: the id is taken, also by an archived card definition.
POST
/
v1
/
card-definitions
Save a card definition draft
curl --request POST \
--url https://api.occtoo.com/v1/card-definitions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"tags": [
"<string>"
],
"displayOptions": {},
"propertyGroups": [
{
"name": "<string>",
"propertyIds": [
"<string>"
]
}
],
"properties": [
{
"id": "<string>",
"sourceId": "<string>",
"sourcePropertyId": "<string>",
"name": {},
"description": {},
"settings": {},
"delimiter": "<string>",
"order": 0,
"isHidden": false,
"isEditable": false,
"managedTagList": {
"listId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
]
}
'import requests
url = "https://api.occtoo.com/v1/card-definitions"
payload = {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"tags": ["<string>"],
"displayOptions": {},
"propertyGroups": [
{
"name": "<string>",
"propertyIds": ["<string>"]
}
],
"properties": [
{
"id": "<string>",
"sourceId": "<string>",
"sourcePropertyId": "<string>",
"name": {},
"description": {},
"settings": {},
"delimiter": "<string>",
"order": 0,
"isHidden": False,
"isEditable": False,
"managedTagList": { "listId": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
name: '<string>',
description: '<string>',
tags: ['<string>'],
displayOptions: {},
propertyGroups: [{name: '<string>', propertyIds: ['<string>']}],
properties: [
{
id: '<string>',
sourceId: '<string>',
sourcePropertyId: '<string>',
name: {},
description: {},
settings: {},
delimiter: '<string>',
order: 0,
isHidden: false,
isEditable: false,
managedTagList: {listId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'}
}
]
})
};
fetch('https://api.occtoo.com/v1/card-definitions', 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.occtoo.com/v1/card-definitions",
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([
'id' => '<string>',
'name' => '<string>',
'description' => '<string>',
'tags' => [
'<string>'
],
'displayOptions' => [
],
'propertyGroups' => [
[
'name' => '<string>',
'propertyIds' => [
'<string>'
]
]
],
'properties' => [
[
'id' => '<string>',
'sourceId' => '<string>',
'sourcePropertyId' => '<string>',
'name' => [
],
'description' => [
],
'settings' => [
],
'delimiter' => '<string>',
'order' => 0,
'isHidden' => false,
'isEditable' => false,
'managedTagList' => [
'listId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.occtoo.com/v1/card-definitions"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"displayOptions\": {},\n \"propertyGroups\": [\n {\n \"name\": \"<string>\",\n \"propertyIds\": [\n \"<string>\"\n ]\n }\n ],\n \"properties\": [\n {\n \"id\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"sourcePropertyId\": \"<string>\",\n \"name\": {},\n \"description\": {},\n \"settings\": {},\n \"delimiter\": \"<string>\",\n \"order\": 0,\n \"isHidden\": false,\n \"isEditable\": false,\n \"managedTagList\": {\n \"listId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.occtoo.com/v1/card-definitions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"displayOptions\": {},\n \"propertyGroups\": [\n {\n \"name\": \"<string>\",\n \"propertyIds\": [\n \"<string>\"\n ]\n }\n ],\n \"properties\": [\n {\n \"id\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"sourcePropertyId\": \"<string>\",\n \"name\": {},\n \"description\": {},\n \"settings\": {},\n \"delimiter\": \"<string>\",\n \"order\": 0,\n \"isHidden\": false,\n \"isEditable\": false,\n \"managedTagList\": {\n \"listId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.occtoo.com/v1/card-definitions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"displayOptions\": {},\n \"propertyGroups\": [\n {\n \"name\": \"<string>\",\n \"propertyIds\": [\n \"<string>\"\n ]\n }\n ],\n \"properties\": [\n {\n \"id\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"sourcePropertyId\": \"<string>\",\n \"name\": {},\n \"description\": {},\n \"settings\": {},\n \"delimiter\": \"<string>\",\n \"order\": 0,\n \"isHidden\": false,\n \"isEditable\": false,\n \"managedTagList\": {\n \"listId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"tags": [
"<string>"
],
"status": "Draft",
"etag": 123,
"displayOptions": {},
"propertyGroups": [
{
"name": "<string>",
"propertyIds": [
"<string>"
]
}
],
"properties": [
{
"id": "<string>",
"sourceId": "<string>",
"sourcePropertyId": "<string>",
"type": "Text",
"name": {},
"description": {},
"settings": {},
"delimiter": "<string>",
"order": 0,
"isHidden": false,
"isEditable": false,
"managedTagList": {
"listId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"valueType": "Value"
}
}
],
"pendingChanges": {
"set": [
{
"id": "<string>",
"sourceId": "<string>",
"sourcePropertyId": "<string>",
"type": "Text",
"name": {},
"description": {},
"settings": {},
"delimiter": "<string>",
"order": 0,
"isHidden": false,
"isEditable": false,
"managedTagList": {
"listId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"valueType": "Value"
}
}
],
"remove": [
"<string>"
]
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Authorizations
kindeOAuthbearerAuthapiKey
Body
application/json
Holds a new card definition draft.
Response
Created
Shapes the entries of one or more sources into cards: picks source properties as card properties and sets the data type each exposes.
Was this page helpful?