Aggiorna deposito
curl --request PATCH \
--url https://service.e-manager.io/api/v1/integrations/warehouses/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Magazzino centrale",
"typeId": 2,
"address": "Via Roma 1",
"postalCode": "10121",
"city": "Torino",
"state": "TO",
"country": "IT"
}
'import requests
url = "https://service.e-manager.io/api/v1/integrations/warehouses/{id}"
payload = {
"name": "Magazzino centrale",
"typeId": 2,
"address": "Via Roma 1",
"postalCode": "10121",
"city": "Torino",
"state": "TO",
"country": "IT"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Magazzino centrale',
typeId: 2,
address: 'Via Roma 1',
postalCode: '10121',
city: 'Torino',
state: 'TO',
country: 'IT'
})
};
fetch('https://service.e-manager.io/api/v1/integrations/warehouses/{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://service.e-manager.io/api/v1/integrations/warehouses/{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([
'name' => 'Magazzino centrale',
'typeId' => 2,
'address' => 'Via Roma 1',
'postalCode' => '10121',
'city' => 'Torino',
'state' => 'TO',
'country' => 'IT'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/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://service.e-manager.io/api/v1/integrations/warehouses/{id}"
payload := strings.NewReader("{\n \"name\": \"Magazzino centrale\",\n \"typeId\": 2,\n \"address\": \"Via Roma 1\",\n \"postalCode\": \"10121\",\n \"city\": \"Torino\",\n \"state\": \"TO\",\n \"country\": \"IT\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://service.e-manager.io/api/v1/integrations/warehouses/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Magazzino centrale\",\n \"typeId\": 2,\n \"address\": \"Via Roma 1\",\n \"postalCode\": \"10121\",\n \"city\": \"Torino\",\n \"state\": \"TO\",\n \"country\": \"IT\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://service.e-manager.io/api/v1/integrations/warehouses/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Magazzino centrale\",\n \"typeId\": 2,\n \"address\": \"Via Roma 1\",\n \"postalCode\": \"10121\",\n \"city\": \"Torino\",\n \"state\": \"TO\",\n \"country\": \"IT\"\n}"
response = http.request(request)
puts response.read_body{
"id": 42,
"name": "Magazzino centrale",
"typeId": 1,
"address": "Via Roma 1",
"postalCode": "10121",
"city": "Torino",
"state": "TO",
"country": "IT",
"isPrincipal": true,
"warehouseType": {
"id": 1,
"name": "Principale"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}Depositi
Aggiorna deposito
Aggiorna i campi anagrafici di un deposito esistente. Almeno un campo deve essere fornito nel body. Richiede scope warehouses:update.
PATCH
/
v1
/
integrations
/
warehouses
/
{id}
Aggiorna deposito
curl --request PATCH \
--url https://service.e-manager.io/api/v1/integrations/warehouses/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Magazzino centrale",
"typeId": 2,
"address": "Via Roma 1",
"postalCode": "10121",
"city": "Torino",
"state": "TO",
"country": "IT"
}
'import requests
url = "https://service.e-manager.io/api/v1/integrations/warehouses/{id}"
payload = {
"name": "Magazzino centrale",
"typeId": 2,
"address": "Via Roma 1",
"postalCode": "10121",
"city": "Torino",
"state": "TO",
"country": "IT"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Magazzino centrale',
typeId: 2,
address: 'Via Roma 1',
postalCode: '10121',
city: 'Torino',
state: 'TO',
country: 'IT'
})
};
fetch('https://service.e-manager.io/api/v1/integrations/warehouses/{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://service.e-manager.io/api/v1/integrations/warehouses/{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([
'name' => 'Magazzino centrale',
'typeId' => 2,
'address' => 'Via Roma 1',
'postalCode' => '10121',
'city' => 'Torino',
'state' => 'TO',
'country' => 'IT'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/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://service.e-manager.io/api/v1/integrations/warehouses/{id}"
payload := strings.NewReader("{\n \"name\": \"Magazzino centrale\",\n \"typeId\": 2,\n \"address\": \"Via Roma 1\",\n \"postalCode\": \"10121\",\n \"city\": \"Torino\",\n \"state\": \"TO\",\n \"country\": \"IT\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://service.e-manager.io/api/v1/integrations/warehouses/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Magazzino centrale\",\n \"typeId\": 2,\n \"address\": \"Via Roma 1\",\n \"postalCode\": \"10121\",\n \"city\": \"Torino\",\n \"state\": \"TO\",\n \"country\": \"IT\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://service.e-manager.io/api/v1/integrations/warehouses/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Magazzino centrale\",\n \"typeId\": 2,\n \"address\": \"Via Roma 1\",\n \"postalCode\": \"10121\",\n \"city\": \"Torino\",\n \"state\": \"TO\",\n \"country\": \"IT\"\n}"
response = http.request(request)
puts response.read_body{
"id": 42,
"name": "Magazzino centrale",
"typeId": 1,
"address": "Via Roma 1",
"postalCode": "10121",
"city": "Torino",
"state": "TO",
"country": "IT",
"isPrincipal": true,
"warehouseType": {
"id": 1,
"name": "Principale"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}Authorizations
Path Parameters
ID deposito
Body
application/json
Nome del deposito
Example:
"Magazzino centrale"
Tipo deposito (1=Principale, 2=Logistica, 3=Drop Shipping, 4=Secondario). Vedi tipi deposito.
Available options:
1, 2, 3, 4 Example:
2
Indirizzo
Example:
"Via Roma 1"
CAP
Example:
"10121"
Città
Example:
"Torino"
Provincia o stato
Example:
"TO"
Codice paese ISO alpha-2
Example:
"IT"
Response
200 - application/json
ID deposito
Example:
42
Nome del deposito
Example:
"Magazzino centrale"
ID tipo deposito
Example:
1
Indirizzo
Example:
"Via Roma 1"
CAP
Example:
"10121"
Città
Example:
"Torino"
Provincia o stato
Example:
"TO"
Codice paese ISO alpha-2
Example:
"IT"
True se typeId è 1 (Principale)
Example:
true
Tipo deposito risolto da enum
Show child attributes
Show child attributes
Was this page helpful?

