Entrada manual de estoque
curl --request POST \
--url https://api.example.com/inventory/entries/manual \
--header 'Content-Type: application/json' \
--data '
{
"productId": "<string>",
"warehouseId": "<string>",
"quantity": 123,
"unitGrossPrice": 123,
"discount": 123,
"freight": 123,
"insurance": 123,
"otherExpenses": 123,
"supplierId": "<string>",
"companyId": "<string>",
"notes": "<string>"
}
'import requests
url = "https://api.example.com/inventory/entries/manual"
payload = {
"productId": "<string>",
"warehouseId": "<string>",
"quantity": 123,
"unitGrossPrice": 123,
"discount": 123,
"freight": 123,
"insurance": 123,
"otherExpenses": 123,
"supplierId": "<string>",
"companyId": "<string>",
"notes": "<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({
productId: '<string>',
warehouseId: '<string>',
quantity: 123,
unitGrossPrice: 123,
discount: 123,
freight: 123,
insurance: 123,
otherExpenses: 123,
supplierId: '<string>',
companyId: '<string>',
notes: '<string>'
})
};
fetch('https://api.example.com/inventory/entries/manual', 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.example.com/inventory/entries/manual",
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([
'productId' => '<string>',
'warehouseId' => '<string>',
'quantity' => 123,
'unitGrossPrice' => 123,
'discount' => 123,
'freight' => 123,
'insurance' => 123,
'otherExpenses' => 123,
'supplierId' => '<string>',
'companyId' => '<string>',
'notes' => '<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://api.example.com/inventory/entries/manual"
payload := strings.NewReader("{\n \"productId\": \"<string>\",\n \"warehouseId\": \"<string>\",\n \"quantity\": 123,\n \"unitGrossPrice\": 123,\n \"discount\": 123,\n \"freight\": 123,\n \"insurance\": 123,\n \"otherExpenses\": 123,\n \"supplierId\": \"<string>\",\n \"companyId\": \"<string>\",\n \"notes\": \"<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://api.example.com/inventory/entries/manual")
.header("Content-Type", "application/json")
.body("{\n \"productId\": \"<string>\",\n \"warehouseId\": \"<string>\",\n \"quantity\": 123,\n \"unitGrossPrice\": 123,\n \"discount\": 123,\n \"freight\": 123,\n \"insurance\": 123,\n \"otherExpenses\": 123,\n \"supplierId\": \"<string>\",\n \"companyId\": \"<string>\",\n \"notes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/inventory/entries/manual")
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 \"productId\": \"<string>\",\n \"warehouseId\": \"<string>\",\n \"quantity\": 123,\n \"unitGrossPrice\": 123,\n \"discount\": 123,\n \"freight\": 123,\n \"insurance\": 123,\n \"otherExpenses\": 123,\n \"supplierId\": \"<string>\",\n \"companyId\": \"<string>\",\n \"notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "e4b6d4e8-8e6d-41da-abdb-8fc358a9e7f1",
"message": "Entrada criada e estoque atualizado."
}
Inventory Entries
Criar Entrada Manual
Injeta saldo de produtos rapidamente dentro de um depósito específico e insere a nota da origem dessa entrada.
POST
/
inventory
/
entries
/
manual
Entrada manual de estoque
curl --request POST \
--url https://api.example.com/inventory/entries/manual \
--header 'Content-Type: application/json' \
--data '
{
"productId": "<string>",
"warehouseId": "<string>",
"quantity": 123,
"unitGrossPrice": 123,
"discount": 123,
"freight": 123,
"insurance": 123,
"otherExpenses": 123,
"supplierId": "<string>",
"companyId": "<string>",
"notes": "<string>"
}
'import requests
url = "https://api.example.com/inventory/entries/manual"
payload = {
"productId": "<string>",
"warehouseId": "<string>",
"quantity": 123,
"unitGrossPrice": 123,
"discount": 123,
"freight": 123,
"insurance": 123,
"otherExpenses": 123,
"supplierId": "<string>",
"companyId": "<string>",
"notes": "<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({
productId: '<string>',
warehouseId: '<string>',
quantity: 123,
unitGrossPrice: 123,
discount: 123,
freight: 123,
insurance: 123,
otherExpenses: 123,
supplierId: '<string>',
companyId: '<string>',
notes: '<string>'
})
};
fetch('https://api.example.com/inventory/entries/manual', 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.example.com/inventory/entries/manual",
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([
'productId' => '<string>',
'warehouseId' => '<string>',
'quantity' => 123,
'unitGrossPrice' => 123,
'discount' => 123,
'freight' => 123,
'insurance' => 123,
'otherExpenses' => 123,
'supplierId' => '<string>',
'companyId' => '<string>',
'notes' => '<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://api.example.com/inventory/entries/manual"
payload := strings.NewReader("{\n \"productId\": \"<string>\",\n \"warehouseId\": \"<string>\",\n \"quantity\": 123,\n \"unitGrossPrice\": 123,\n \"discount\": 123,\n \"freight\": 123,\n \"insurance\": 123,\n \"otherExpenses\": 123,\n \"supplierId\": \"<string>\",\n \"companyId\": \"<string>\",\n \"notes\": \"<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://api.example.com/inventory/entries/manual")
.header("Content-Type", "application/json")
.body("{\n \"productId\": \"<string>\",\n \"warehouseId\": \"<string>\",\n \"quantity\": 123,\n \"unitGrossPrice\": 123,\n \"discount\": 123,\n \"freight\": 123,\n \"insurance\": 123,\n \"otherExpenses\": 123,\n \"supplierId\": \"<string>\",\n \"companyId\": \"<string>\",\n \"notes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/inventory/entries/manual")
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 \"productId\": \"<string>\",\n \"warehouseId\": \"<string>\",\n \"quantity\": 123,\n \"unitGrossPrice\": 123,\n \"discount\": 123,\n \"freight\": 123,\n \"insurance\": 123,\n \"otherExpenses\": 123,\n \"supplierId\": \"<string>\",\n \"companyId\": \"<string>\",\n \"notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "e4b6d4e8-8e6d-41da-abdb-8fc358a9e7f1",
"message": "Entrada criada e estoque atualizado."
}
Body
ID do Depósito centralizador
Nota descrevendo o motivo da entrada
Response
{
"id": "e4b6d4e8-8e6d-41da-abdb-8fc358a9e7f1",
"message": "Entrada criada e estoque atualizado."
}
Body
application/json
ID do produto
ID do depósito destino
Quantidade a ser adicionada
Preço bruto unitário
Desconto total
Frete total
Seguro total
Outras despesas
ID do fornecedor
ID da empresa (CNPJ)
Observações
Response
Entrada criada e estoque atualizado
⌘I