Update documents
curl --request PUT \
--url https://api.yume.cloud/v2/documents/{document_id}/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"source": 0,
"template": 123,
"content_type": "<string>",
"object_id": 123,
"regenerate": false,
"resign": false,
"file": "<string>",
"content": "<string>"
}
'import requests
url = "https://api.yume.cloud/v2/documents/{document_id}/"
payload = {
"name": "<string>",
"source": 0,
"template": 123,
"content_type": "<string>",
"object_id": 123,
"regenerate": False,
"resign": False,
"file": "<string>",
"content": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
source: 0,
template: 123,
content_type: '<string>',
object_id: 123,
regenerate: false,
resign: false,
file: '<string>',
content: '<string>'
})
};
fetch('https://api.yume.cloud/v2/documents/{document_id}/', 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.yume.cloud/v2/documents/{document_id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'source' => 0,
'template' => 123,
'content_type' => '<string>',
'object_id' => 123,
'regenerate' => false,
'resign' => false,
'file' => '<string>',
'content' => '<string>'
]),
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.yume.cloud/v2/documents/{document_id}/"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"source\": 0,\n \"template\": 123,\n \"content_type\": \"<string>\",\n \"object_id\": 123,\n \"regenerate\": false,\n \"resign\": false,\n \"file\": \"<string>\",\n \"content\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.yume.cloud/v2/documents/{document_id}/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"source\": 0,\n \"template\": 123,\n \"content_type\": \"<string>\",\n \"object_id\": 123,\n \"regenerate\": false,\n \"resign\": false,\n \"file\": \"<string>\",\n \"content\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yume.cloud/v2/documents/{document_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"source\": 0,\n \"template\": 123,\n \"content_type\": \"<string>\",\n \"object_id\": 123,\n \"regenerate\": false,\n \"resign\": false,\n \"file\": \"<string>\",\n \"content\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_by": 123,
"signed": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"files": [
{
"id": 123,
"file": "<string>",
"type": 0,
"extra": "<unknown>"
}
],
"signs": [
{
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"signer": {
"id": 123,
"name": "<string>",
"phone": "<string>",
"email": "jsmith@example.com",
"type": "company",
"outer_id": 0
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"stages": [
{
"id": 123,
"status_from": 0,
"status_to": 0,
"created_at": "2023-11-07T05:31:56Z",
"meta": "<unknown>"
}
],
"method": 0,
"method_allowed": [
16383
],
"status": 0
}
],
"links": [
{
"content_type": "<string>",
"content_type_label": "<string>",
"object_id": 4611686018427388000,
"role_label": "<string>",
"label": "<string>",
"url": "<string>",
"role": "main"
}
],
"meta": "<unknown>",
"name": "<string>",
"source": 0,
"template": 123,
"content_type": "<string>",
"object_id": 123,
"content": "<string>"
}API Reference
Update documents
PUT
/
v2
/
documents
/
{document_id}
/
Update documents
curl --request PUT \
--url https://api.yume.cloud/v2/documents/{document_id}/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"source": 0,
"template": 123,
"content_type": "<string>",
"object_id": 123,
"regenerate": false,
"resign": false,
"file": "<string>",
"content": "<string>"
}
'import requests
url = "https://api.yume.cloud/v2/documents/{document_id}/"
payload = {
"name": "<string>",
"source": 0,
"template": 123,
"content_type": "<string>",
"object_id": 123,
"regenerate": False,
"resign": False,
"file": "<string>",
"content": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
source: 0,
template: 123,
content_type: '<string>',
object_id: 123,
regenerate: false,
resign: false,
file: '<string>',
content: '<string>'
})
};
fetch('https://api.yume.cloud/v2/documents/{document_id}/', 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.yume.cloud/v2/documents/{document_id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'source' => 0,
'template' => 123,
'content_type' => '<string>',
'object_id' => 123,
'regenerate' => false,
'resign' => false,
'file' => '<string>',
'content' => '<string>'
]),
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.yume.cloud/v2/documents/{document_id}/"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"source\": 0,\n \"template\": 123,\n \"content_type\": \"<string>\",\n \"object_id\": 123,\n \"regenerate\": false,\n \"resign\": false,\n \"file\": \"<string>\",\n \"content\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.yume.cloud/v2/documents/{document_id}/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"source\": 0,\n \"template\": 123,\n \"content_type\": \"<string>\",\n \"object_id\": 123,\n \"regenerate\": false,\n \"resign\": false,\n \"file\": \"<string>\",\n \"content\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yume.cloud/v2/documents/{document_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"source\": 0,\n \"template\": 123,\n \"content_type\": \"<string>\",\n \"object_id\": 123,\n \"regenerate\": false,\n \"resign\": false,\n \"file\": \"<string>\",\n \"content\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_by": 123,
"signed": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"files": [
{
"id": 123,
"file": "<string>",
"type": 0,
"extra": "<unknown>"
}
],
"signs": [
{
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"signer": {
"id": 123,
"name": "<string>",
"phone": "<string>",
"email": "jsmith@example.com",
"type": "company",
"outer_id": 0
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"stages": [
{
"id": 123,
"status_from": 0,
"status_to": 0,
"created_at": "2023-11-07T05:31:56Z",
"meta": "<unknown>"
}
],
"method": 0,
"method_allowed": [
16383
],
"status": 0
}
],
"links": [
{
"content_type": "<string>",
"content_type_label": "<string>",
"object_id": 4611686018427388000,
"role_label": "<string>",
"label": "<string>",
"url": "<string>",
"role": "main"
}
],
"meta": "<unknown>",
"name": "<string>",
"source": 0,
"template": 123,
"content_type": "<string>",
"object_id": 123,
"content": "<string>"
}Авторизации
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Заголовки
Компания, в контексте которой выполняется запрос — её id из GET /v1/tenant/. Пользователь должен состоять в этой компании: чужой id доступа к данным не даёт. Без заголовка компания определяется по домену запроса.
Параметры пути
Тело
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
0- Сформирован1- Загружен
Доступные опции:
0, 1 Ответ
200 - application/json
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
0- Сформирован1- Загружен
Доступные опции:
0, 1