Save or complete hosted layout
curl --request POST \
--url https://{workspace}.dekasign.com/api/v1/hosted-editor/{sessionId}/commands \
--header 'Content-Type: application/json' \
--data '
{
"expectedVersion": 2,
"layout": {
"pageCount": 250,
"fields": [
{
"id": "<string>",
"label": "<string>",
"page": 2,
"rect": {
"x": 0.5,
"y": 0.5,
"width": 0.5,
"height": 0.5
},
"required": true
}
]
},
"idempotencyKey": "<string>"
}
'import requests
url = "https://{workspace}.dekasign.com/api/v1/hosted-editor/{sessionId}/commands"
payload = {
"expectedVersion": 2,
"layout": {
"pageCount": 250,
"fields": [
{
"id": "<string>",
"label": "<string>",
"page": 2,
"rect": {
"x": 0.5,
"y": 0.5,
"width": 0.5,
"height": 0.5
},
"required": True
}
]
},
"idempotencyKey": "<string>"
}
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({
expectedVersion: 2,
layout: {
pageCount: 250,
fields: [
{
id: '<string>',
label: '<string>',
page: 2,
rect: {x: 0.5, y: 0.5, width: 0.5, height: 0.5},
required: true
}
]
},
idempotencyKey: '<string>'
})
};
fetch('https://{workspace}.dekasign.com/api/v1/hosted-editor/{sessionId}/commands', 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://{workspace}.dekasign.com/api/v1/hosted-editor/{sessionId}/commands",
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([
'expectedVersion' => 2,
'layout' => [
'pageCount' => 250,
'fields' => [
[
'id' => '<string>',
'label' => '<string>',
'page' => 2,
'rect' => [
'x' => 0.5,
'y' => 0.5,
'width' => 0.5,
'height' => 0.5
],
'required' => true
]
]
],
'idempotencyKey' => '<string>'
]),
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://{workspace}.dekasign.com/api/v1/hosted-editor/{sessionId}/commands"
payload := strings.NewReader("{\n \"expectedVersion\": 2,\n \"layout\": {\n \"pageCount\": 250,\n \"fields\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"page\": 2,\n \"rect\": {\n \"x\": 0.5,\n \"y\": 0.5,\n \"width\": 0.5,\n \"height\": 0.5\n },\n \"required\": true\n }\n ]\n },\n \"idempotencyKey\": \"<string>\"\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://{workspace}.dekasign.com/api/v1/hosted-editor/{sessionId}/commands")
.header("Content-Type", "application/json")
.body("{\n \"expectedVersion\": 2,\n \"layout\": {\n \"pageCount\": 250,\n \"fields\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"page\": 2,\n \"rect\": {\n \"x\": 0.5,\n \"y\": 0.5,\n \"width\": 0.5,\n \"height\": 0.5\n },\n \"required\": true\n }\n ]\n },\n \"idempotencyKey\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{workspace}.dekasign.com/api/v1/hosted-editor/{sessionId}/commands")
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 \"expectedVersion\": 2,\n \"layout\": {\n \"pageCount\": 250,\n \"fields\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"page\": 2,\n \"rect\": {\n \"x\": 0.5,\n \"y\": 0.5,\n \"width\": 0.5,\n \"height\": 0.5\n },\n \"required\": true\n }\n ]\n },\n \"idempotencyKey\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}hosted-editor
Save or complete hosted layout
Opaque session credential in path. Idempotency-Key header or body idempotencyKey is required by command execution. Layout follows the server document layout schema; bearer app key is not accepted as this session.
Save or complete hosted layout
curl --request POST \
--url https://{workspace}.dekasign.com/api/v1/hosted-editor/{sessionId}/commands \
--header 'Content-Type: application/json' \
--data '
{
"expectedVersion": 2,
"layout": {
"pageCount": 250,
"fields": [
{
"id": "<string>",
"label": "<string>",
"page": 2,
"rect": {
"x": 0.5,
"y": 0.5,
"width": 0.5,
"height": 0.5
},
"required": true
}
]
},
"idempotencyKey": "<string>"
}
'import requests
url = "https://{workspace}.dekasign.com/api/v1/hosted-editor/{sessionId}/commands"
payload = {
"expectedVersion": 2,
"layout": {
"pageCount": 250,
"fields": [
{
"id": "<string>",
"label": "<string>",
"page": 2,
"rect": {
"x": 0.5,
"y": 0.5,
"width": 0.5,
"height": 0.5
},
"required": True
}
]
},
"idempotencyKey": "<string>"
}
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({
expectedVersion: 2,
layout: {
pageCount: 250,
fields: [
{
id: '<string>',
label: '<string>',
page: 2,
rect: {x: 0.5, y: 0.5, width: 0.5, height: 0.5},
required: true
}
]
},
idempotencyKey: '<string>'
})
};
fetch('https://{workspace}.dekasign.com/api/v1/hosted-editor/{sessionId}/commands', 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://{workspace}.dekasign.com/api/v1/hosted-editor/{sessionId}/commands",
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([
'expectedVersion' => 2,
'layout' => [
'pageCount' => 250,
'fields' => [
[
'id' => '<string>',
'label' => '<string>',
'page' => 2,
'rect' => [
'x' => 0.5,
'y' => 0.5,
'width' => 0.5,
'height' => 0.5
],
'required' => true
]
]
],
'idempotencyKey' => '<string>'
]),
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://{workspace}.dekasign.com/api/v1/hosted-editor/{sessionId}/commands"
payload := strings.NewReader("{\n \"expectedVersion\": 2,\n \"layout\": {\n \"pageCount\": 250,\n \"fields\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"page\": 2,\n \"rect\": {\n \"x\": 0.5,\n \"y\": 0.5,\n \"width\": 0.5,\n \"height\": 0.5\n },\n \"required\": true\n }\n ]\n },\n \"idempotencyKey\": \"<string>\"\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://{workspace}.dekasign.com/api/v1/hosted-editor/{sessionId}/commands")
.header("Content-Type", "application/json")
.body("{\n \"expectedVersion\": 2,\n \"layout\": {\n \"pageCount\": 250,\n \"fields\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"page\": 2,\n \"rect\": {\n \"x\": 0.5,\n \"y\": 0.5,\n \"width\": 0.5,\n \"height\": 0.5\n },\n \"required\": true\n }\n ]\n },\n \"idempotencyKey\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{workspace}.dekasign.com/api/v1/hosted-editor/{sessionId}/commands")
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 \"expectedVersion\": 2,\n \"layout\": {\n \"pageCount\": 250,\n \"fields\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"page\": 2,\n \"rect\": {\n \"x\": 0.5,\n \"y\": 0.5,\n \"width\": 0.5,\n \"height\": 0.5\n },\n \"required\": true\n }\n ]\n },\n \"idempotencyKey\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}Path Parameters
Opaque secret session credential; do not log.
Body
application/json
Response
Operation result. Read fields vary by endpoint and deployment; see narrative guide.
The response is of type object.
