Patch actions
curl --request PATCH \
--url https://api.yume.cloud/v1/shop/warehouses/actions/{id}/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invoice_id": "<string>",
"invoice_datetime": "2023-11-07T05:31:56Z",
"from_warehouse": 123,
"to_warehouse": 123,
"from_counterparty": 123,
"to_counterparty": 123,
"comment": "<string>",
"manager": 123,
"approved": true,
"products": [
{
"group": 123,
"amount": -1,
"unit_price": "<string>",
"discount": "<string>"
}
],
"tax": "<string>",
"tax_included": true
}
'import requests
url = "https://api.yume.cloud/v1/shop/warehouses/actions/{id}/"
payload = {
"invoice_id": "<string>",
"invoice_datetime": "2023-11-07T05:31:56Z",
"from_warehouse": 123,
"to_warehouse": 123,
"from_counterparty": 123,
"to_counterparty": 123,
"comment": "<string>",
"manager": 123,
"approved": True,
"products": [
{
"group": 123,
"amount": -1,
"unit_price": "<string>",
"discount": "<string>"
}
],
"tax": "<string>",
"tax_included": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
invoice_id: '<string>',
invoice_datetime: '2023-11-07T05:31:56Z',
from_warehouse: 123,
to_warehouse: 123,
from_counterparty: 123,
to_counterparty: 123,
comment: '<string>',
manager: 123,
approved: true,
products: [{group: 123, amount: -1, unit_price: '<string>', discount: '<string>'}],
tax: '<string>',
tax_included: true
})
};
fetch('https://api.yume.cloud/v1/shop/warehouses/actions/{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/v1/shop/warehouses/actions/{id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'invoice_id' => '<string>',
'invoice_datetime' => '2023-11-07T05:31:56Z',
'from_warehouse' => 123,
'to_warehouse' => 123,
'from_counterparty' => 123,
'to_counterparty' => 123,
'comment' => '<string>',
'manager' => 123,
'approved' => true,
'products' => [
[
'group' => 123,
'amount' => -1,
'unit_price' => '<string>',
'discount' => '<string>'
]
],
'tax' => '<string>',
'tax_included' => true
]),
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/v1/shop/warehouses/actions/{id}/"
payload := strings.NewReader("{\n \"invoice_id\": \"<string>\",\n \"invoice_datetime\": \"2023-11-07T05:31:56Z\",\n \"from_warehouse\": 123,\n \"to_warehouse\": 123,\n \"from_counterparty\": 123,\n \"to_counterparty\": 123,\n \"comment\": \"<string>\",\n \"manager\": 123,\n \"approved\": true,\n \"products\": [\n {\n \"group\": 123,\n \"amount\": -1,\n \"unit_price\": \"<string>\",\n \"discount\": \"<string>\"\n }\n ],\n \"tax\": \"<string>\",\n \"tax_included\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.yume.cloud/v1/shop/warehouses/actions/{id}/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"invoice_id\": \"<string>\",\n \"invoice_datetime\": \"2023-11-07T05:31:56Z\",\n \"from_warehouse\": 123,\n \"to_warehouse\": 123,\n \"from_counterparty\": 123,\n \"to_counterparty\": 123,\n \"comment\": \"<string>\",\n \"manager\": 123,\n \"approved\": true,\n \"products\": [\n {\n \"group\": 123,\n \"amount\": -1,\n \"unit_price\": \"<string>\",\n \"discount\": \"<string>\"\n }\n ],\n \"tax\": \"<string>\",\n \"tax_included\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yume.cloud/v1/shop/warehouses/actions/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"invoice_id\": \"<string>\",\n \"invoice_datetime\": \"2023-11-07T05:31:56Z\",\n \"from_warehouse\": 123,\n \"to_warehouse\": 123,\n \"from_counterparty\": 123,\n \"to_counterparty\": 123,\n \"comment\": \"<string>\",\n \"manager\": 123,\n \"approved\": true,\n \"products\": [\n {\n \"group\": 123,\n \"amount\": -1,\n \"unit_price\": \"<string>\",\n \"discount\": \"<string>\"\n }\n ],\n \"tax\": \"<string>\",\n \"tax_included\": true\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"invoice_datetime": "2023-11-07T05:31:56Z",
"to_warehouse": 123,
"manager": 123,
"products": [
{
"id": 123,
"action": 123,
"group": 123,
"group_warehouse": 123,
"price": "<string>",
"amount": -1,
"unit_price": "<string>",
"discount": "<string>"
}
],
"price": "<string>",
"amount": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"invoice_id": "<string>",
"type": 0,
"from_warehouse": 123,
"from_counterparty": 123,
"to_counterparty": 123,
"comment": "<string>",
"approved": true,
"tax": "<string>",
"tax_included": true
}warehouses
Patch actions
PATCH
/
v1
/
shop
/
warehouses
/
actions
/
{id}
/
Patch actions
curl --request PATCH \
--url https://api.yume.cloud/v1/shop/warehouses/actions/{id}/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invoice_id": "<string>",
"invoice_datetime": "2023-11-07T05:31:56Z",
"from_warehouse": 123,
"to_warehouse": 123,
"from_counterparty": 123,
"to_counterparty": 123,
"comment": "<string>",
"manager": 123,
"approved": true,
"products": [
{
"group": 123,
"amount": -1,
"unit_price": "<string>",
"discount": "<string>"
}
],
"tax": "<string>",
"tax_included": true
}
'import requests
url = "https://api.yume.cloud/v1/shop/warehouses/actions/{id}/"
payload = {
"invoice_id": "<string>",
"invoice_datetime": "2023-11-07T05:31:56Z",
"from_warehouse": 123,
"to_warehouse": 123,
"from_counterparty": 123,
"to_counterparty": 123,
"comment": "<string>",
"manager": 123,
"approved": True,
"products": [
{
"group": 123,
"amount": -1,
"unit_price": "<string>",
"discount": "<string>"
}
],
"tax": "<string>",
"tax_included": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
invoice_id: '<string>',
invoice_datetime: '2023-11-07T05:31:56Z',
from_warehouse: 123,
to_warehouse: 123,
from_counterparty: 123,
to_counterparty: 123,
comment: '<string>',
manager: 123,
approved: true,
products: [{group: 123, amount: -1, unit_price: '<string>', discount: '<string>'}],
tax: '<string>',
tax_included: true
})
};
fetch('https://api.yume.cloud/v1/shop/warehouses/actions/{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/v1/shop/warehouses/actions/{id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'invoice_id' => '<string>',
'invoice_datetime' => '2023-11-07T05:31:56Z',
'from_warehouse' => 123,
'to_warehouse' => 123,
'from_counterparty' => 123,
'to_counterparty' => 123,
'comment' => '<string>',
'manager' => 123,
'approved' => true,
'products' => [
[
'group' => 123,
'amount' => -1,
'unit_price' => '<string>',
'discount' => '<string>'
]
],
'tax' => '<string>',
'tax_included' => true
]),
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/v1/shop/warehouses/actions/{id}/"
payload := strings.NewReader("{\n \"invoice_id\": \"<string>\",\n \"invoice_datetime\": \"2023-11-07T05:31:56Z\",\n \"from_warehouse\": 123,\n \"to_warehouse\": 123,\n \"from_counterparty\": 123,\n \"to_counterparty\": 123,\n \"comment\": \"<string>\",\n \"manager\": 123,\n \"approved\": true,\n \"products\": [\n {\n \"group\": 123,\n \"amount\": -1,\n \"unit_price\": \"<string>\",\n \"discount\": \"<string>\"\n }\n ],\n \"tax\": \"<string>\",\n \"tax_included\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.yume.cloud/v1/shop/warehouses/actions/{id}/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"invoice_id\": \"<string>\",\n \"invoice_datetime\": \"2023-11-07T05:31:56Z\",\n \"from_warehouse\": 123,\n \"to_warehouse\": 123,\n \"from_counterparty\": 123,\n \"to_counterparty\": 123,\n \"comment\": \"<string>\",\n \"manager\": 123,\n \"approved\": true,\n \"products\": [\n {\n \"group\": 123,\n \"amount\": -1,\n \"unit_price\": \"<string>\",\n \"discount\": \"<string>\"\n }\n ],\n \"tax\": \"<string>\",\n \"tax_included\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yume.cloud/v1/shop/warehouses/actions/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"invoice_id\": \"<string>\",\n \"invoice_datetime\": \"2023-11-07T05:31:56Z\",\n \"from_warehouse\": 123,\n \"to_warehouse\": 123,\n \"from_counterparty\": 123,\n \"to_counterparty\": 123,\n \"comment\": \"<string>\",\n \"manager\": 123,\n \"approved\": true,\n \"products\": [\n {\n \"group\": 123,\n \"amount\": -1,\n \"unit_price\": \"<string>\",\n \"discount\": \"<string>\"\n }\n ],\n \"tax\": \"<string>\",\n \"tax_included\": true\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"invoice_datetime": "2023-11-07T05:31:56Z",
"to_warehouse": 123,
"manager": 123,
"products": [
{
"id": 123,
"action": 123,
"group": 123,
"group_warehouse": 123,
"price": "<string>",
"amount": -1,
"unit_price": "<string>",
"discount": "<string>"
}
],
"price": "<string>",
"amount": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"invoice_id": "<string>",
"type": 0,
"from_warehouse": 123,
"from_counterparty": 123,
"to_counterparty": 123,
"comment": "<string>",
"approved": true,
"tax": "<string>",
"tax_included": true
}Авторизации
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
Maximum string length:
2550- Создано1- Перемещено2- удалить
Доступные опции:
0, 1, 2 Требуемый диапазон:
-32768 <= x <= 32767Show child attributes
Show child attributes
Pattern:
^-?\d{0,2}(?:\.\d{0,2})?$Ответ
200 - application/json
Show child attributes
Show child attributes
Pattern:
^-?\d{0,14}(?:\.\d{0,2})?$Pattern:
^-?\d{0,14}(?:\.\d{0,2})?$Maximum string length:
2550- Создано1- Перемещено2- удалить
Доступные опции:
0, 1, 2 Требуемый диапазон:
-32768 <= x <= 32767Pattern:
^-?\d{0,2}(?:\.\d{0,2})?$