Add a new layout
curl --request POST \
--url https://api.smokeball.com/matters/{matterId}/layouts \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json-patch+json' \
--header 'x-api-key: <api-key>' \
--data '
{
"itemId": "59791902-6280-471b-bd18-f8439ba3042f",
"layoutDesignId": "414ab774-adce-4659-b18c-82d1b0e826a0",
"index": 0,
"parentItemId": "59791902-6280-471b-bd18-f8439ba3042f",
"parentId": "Client",
"parentIndex": 0,
"name": "Item",
"description": "Text describing item",
"values": [
{
"key": "<string>",
"value": "<string>",
"state": "<unknown>"
}
],
"events": [
{
"id": "<string>",
"appointmentId": "<string>"
}
],
"isRemoved": false
}
'import requests
url = "https://api.smokeball.com/matters/{matterId}/layouts"
payload = {
"itemId": "59791902-6280-471b-bd18-f8439ba3042f",
"layoutDesignId": "414ab774-adce-4659-b18c-82d1b0e826a0",
"index": 0,
"parentItemId": "59791902-6280-471b-bd18-f8439ba3042f",
"parentId": "Client",
"parentIndex": 0,
"name": "Item",
"description": "Text describing item",
"values": [
{
"key": "<string>",
"value": "<string>",
"state": "<unknown>"
}
],
"events": [
{
"id": "<string>",
"appointmentId": "<string>"
}
],
"isRemoved": False
}
headers = {
"x-api-key": "<api-key>",
"Authorization": "<api-key>",
"Content-Type": "application/json-patch+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
Authorization: '<api-key>',
'Content-Type': 'application/json-patch+json'
},
body: JSON.stringify({
itemId: '59791902-6280-471b-bd18-f8439ba3042f',
layoutDesignId: '414ab774-adce-4659-b18c-82d1b0e826a0',
index: 0,
parentItemId: '59791902-6280-471b-bd18-f8439ba3042f',
parentId: 'Client',
parentIndex: 0,
name: 'Item',
description: 'Text describing item',
values: [{key: '<string>', value: '<string>', state: '<unknown>'}],
events: [{id: '<string>', appointmentId: '<string>'}],
isRemoved: false
})
};
fetch('https://api.smokeball.com/matters/{matterId}/layouts', 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.smokeball.com/matters/{matterId}/layouts",
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([
'itemId' => '59791902-6280-471b-bd18-f8439ba3042f',
'layoutDesignId' => '414ab774-adce-4659-b18c-82d1b0e826a0',
'index' => 0,
'parentItemId' => '59791902-6280-471b-bd18-f8439ba3042f',
'parentId' => 'Client',
'parentIndex' => 0,
'name' => 'Item',
'description' => 'Text describing item',
'values' => [
[
'key' => '<string>',
'value' => '<string>',
'state' => '<unknown>'
]
],
'events' => [
[
'id' => '<string>',
'appointmentId' => '<string>'
]
],
'isRemoved' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json-patch+json",
"x-api-key: <api-key>"
],
]);
$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.smokeball.com/matters/{matterId}/layouts"
payload := strings.NewReader("{\n \"itemId\": \"59791902-6280-471b-bd18-f8439ba3042f\",\n \"layoutDesignId\": \"414ab774-adce-4659-b18c-82d1b0e826a0\",\n \"index\": 0,\n \"parentItemId\": \"59791902-6280-471b-bd18-f8439ba3042f\",\n \"parentId\": \"Client\",\n \"parentIndex\": 0,\n \"name\": \"Item\",\n \"description\": \"Text describing item\",\n \"values\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\",\n \"state\": \"<unknown>\"\n }\n ],\n \"events\": [\n {\n \"id\": \"<string>\",\n \"appointmentId\": \"<string>\"\n }\n ],\n \"isRemoved\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json-patch+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.smokeball.com/matters/{matterId}/layouts")
.header("x-api-key", "<api-key>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"itemId\": \"59791902-6280-471b-bd18-f8439ba3042f\",\n \"layoutDesignId\": \"414ab774-adce-4659-b18c-82d1b0e826a0\",\n \"index\": 0,\n \"parentItemId\": \"59791902-6280-471b-bd18-f8439ba3042f\",\n \"parentId\": \"Client\",\n \"parentIndex\": 0,\n \"name\": \"Item\",\n \"description\": \"Text describing item\",\n \"values\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\",\n \"state\": \"<unknown>\"\n }\n ],\n \"events\": [\n {\n \"id\": \"<string>\",\n \"appointmentId\": \"<string>\"\n }\n ],\n \"isRemoved\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smokeball.com/matters/{matterId}/layouts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"itemId\": \"59791902-6280-471b-bd18-f8439ba3042f\",\n \"layoutDesignId\": \"414ab774-adce-4659-b18c-82d1b0e826a0\",\n \"index\": 0,\n \"parentItemId\": \"59791902-6280-471b-bd18-f8439ba3042f\",\n \"parentId\": \"Client\",\n \"parentIndex\": 0,\n \"name\": \"Item\",\n \"description\": \"Text describing item\",\n \"values\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\",\n \"state\": \"<unknown>\"\n }\n ],\n \"events\": [\n {\n \"id\": \"<string>\",\n \"appointmentId\": \"<string>\"\n }\n ],\n \"isRemoved\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"href": "<string>",
"relation": "<string>",
"method": "GET"
}{
"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>"
}Layout Matter Items
Add a new layout
Adds a new layout matter item to a matter.
POST
/
matters
/
{matterId}
/
layouts
Add a new layout
curl --request POST \
--url https://api.smokeball.com/matters/{matterId}/layouts \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json-patch+json' \
--header 'x-api-key: <api-key>' \
--data '
{
"itemId": "59791902-6280-471b-bd18-f8439ba3042f",
"layoutDesignId": "414ab774-adce-4659-b18c-82d1b0e826a0",
"index": 0,
"parentItemId": "59791902-6280-471b-bd18-f8439ba3042f",
"parentId": "Client",
"parentIndex": 0,
"name": "Item",
"description": "Text describing item",
"values": [
{
"key": "<string>",
"value": "<string>",
"state": "<unknown>"
}
],
"events": [
{
"id": "<string>",
"appointmentId": "<string>"
}
],
"isRemoved": false
}
'import requests
url = "https://api.smokeball.com/matters/{matterId}/layouts"
payload = {
"itemId": "59791902-6280-471b-bd18-f8439ba3042f",
"layoutDesignId": "414ab774-adce-4659-b18c-82d1b0e826a0",
"index": 0,
"parentItemId": "59791902-6280-471b-bd18-f8439ba3042f",
"parentId": "Client",
"parentIndex": 0,
"name": "Item",
"description": "Text describing item",
"values": [
{
"key": "<string>",
"value": "<string>",
"state": "<unknown>"
}
],
"events": [
{
"id": "<string>",
"appointmentId": "<string>"
}
],
"isRemoved": False
}
headers = {
"x-api-key": "<api-key>",
"Authorization": "<api-key>",
"Content-Type": "application/json-patch+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
Authorization: '<api-key>',
'Content-Type': 'application/json-patch+json'
},
body: JSON.stringify({
itemId: '59791902-6280-471b-bd18-f8439ba3042f',
layoutDesignId: '414ab774-adce-4659-b18c-82d1b0e826a0',
index: 0,
parentItemId: '59791902-6280-471b-bd18-f8439ba3042f',
parentId: 'Client',
parentIndex: 0,
name: 'Item',
description: 'Text describing item',
values: [{key: '<string>', value: '<string>', state: '<unknown>'}],
events: [{id: '<string>', appointmentId: '<string>'}],
isRemoved: false
})
};
fetch('https://api.smokeball.com/matters/{matterId}/layouts', 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.smokeball.com/matters/{matterId}/layouts",
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([
'itemId' => '59791902-6280-471b-bd18-f8439ba3042f',
'layoutDesignId' => '414ab774-adce-4659-b18c-82d1b0e826a0',
'index' => 0,
'parentItemId' => '59791902-6280-471b-bd18-f8439ba3042f',
'parentId' => 'Client',
'parentIndex' => 0,
'name' => 'Item',
'description' => 'Text describing item',
'values' => [
[
'key' => '<string>',
'value' => '<string>',
'state' => '<unknown>'
]
],
'events' => [
[
'id' => '<string>',
'appointmentId' => '<string>'
]
],
'isRemoved' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json-patch+json",
"x-api-key: <api-key>"
],
]);
$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.smokeball.com/matters/{matterId}/layouts"
payload := strings.NewReader("{\n \"itemId\": \"59791902-6280-471b-bd18-f8439ba3042f\",\n \"layoutDesignId\": \"414ab774-adce-4659-b18c-82d1b0e826a0\",\n \"index\": 0,\n \"parentItemId\": \"59791902-6280-471b-bd18-f8439ba3042f\",\n \"parentId\": \"Client\",\n \"parentIndex\": 0,\n \"name\": \"Item\",\n \"description\": \"Text describing item\",\n \"values\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\",\n \"state\": \"<unknown>\"\n }\n ],\n \"events\": [\n {\n \"id\": \"<string>\",\n \"appointmentId\": \"<string>\"\n }\n ],\n \"isRemoved\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json-patch+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.smokeball.com/matters/{matterId}/layouts")
.header("x-api-key", "<api-key>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"itemId\": \"59791902-6280-471b-bd18-f8439ba3042f\",\n \"layoutDesignId\": \"414ab774-adce-4659-b18c-82d1b0e826a0\",\n \"index\": 0,\n \"parentItemId\": \"59791902-6280-471b-bd18-f8439ba3042f\",\n \"parentId\": \"Client\",\n \"parentIndex\": 0,\n \"name\": \"Item\",\n \"description\": \"Text describing item\",\n \"values\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\",\n \"state\": \"<unknown>\"\n }\n ],\n \"events\": [\n {\n \"id\": \"<string>\",\n \"appointmentId\": \"<string>\"\n }\n ],\n \"isRemoved\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smokeball.com/matters/{matterId}/layouts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"itemId\": \"59791902-6280-471b-bd18-f8439ba3042f\",\n \"layoutDesignId\": \"414ab774-adce-4659-b18c-82d1b0e826a0\",\n \"index\": 0,\n \"parentItemId\": \"59791902-6280-471b-bd18-f8439ba3042f\",\n \"parentId\": \"Client\",\n \"parentIndex\": 0,\n \"name\": \"Item\",\n \"description\": \"Text describing item\",\n \"values\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\",\n \"state\": \"<unknown>\"\n }\n ],\n \"events\": [\n {\n \"id\": \"<string>\",\n \"appointmentId\": \"<string>\"\n }\n ],\n \"isRemoved\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"href": "<string>",
"relation": "<string>",
"method": "GET"
}{
"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>"
}Path Parameters
Matter ID
Query Parameters
Body
application/json-patch+jsonapplication/jsonapplication/*+json
Layout matter item to add
Unique identifier for the matter list item.
Example:
"59791902-6280-471b-bd18-f8439ba3042f"
Identifier of the layout design.
Example:
"414ab774-adce-4659-b18c-82d1b0e826a0"
Zero-based index of the layout item.
Example:
0
Unique identifier for the parent matter list item.
Example:
"59791902-6280-471b-bd18-f8439ba3042f"
Identifier of the parent matter list item specific to the provider.
Example:
"Client"
Zero-based index of the parent matter list item.
Example:
0
Name of the layout item.
Example:
"Item"
Brief description of the layout item.
Example:
"Text describing item"
List of layout values.
Show child attributes
Show child attributes
List of layout events.
Show child attributes
Show child attributes
Boolean flag indicating if the layout item is to be removed.
Example:
false
⌘I