curl --request POST \
--url https://api.exowpee.com/v1/catalog/assets \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/catalog/assets"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/catalog/assets', 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.exowpee.com/v1/catalog/assets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/catalog/assets"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.exowpee.com/v1/catalog/assets")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/assets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"type": "<string>",
"name": "<string>",
"location_group_id": "<string>",
"location_group": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"company_ids": [
"<unknown>"
],
"metadata": {},
"occupied_volume": 123,
"fill_rate": 123
}{
"message": "<string>",
"errors": {}
}Create a location or vehicle
Registers a new location or vehicle, optionally grouped and shared with some companies.
curl --request POST \
--url https://api.exowpee.com/v1/catalog/assets \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/catalog/assets"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/catalog/assets', 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.exowpee.com/v1/catalog/assets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/catalog/assets"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.exowpee.com/v1/catalog/assets")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/assets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"type": "<string>",
"name": "<string>",
"location_group_id": "<string>",
"location_group": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"company_ids": [
"<unknown>"
],
"metadata": {},
"occupied_volume": 123,
"fill_rate": 123
}{
"message": "<string>",
"errors": {}
}assets_{locations|vehicles}.create
Conditions
- name and type are required; name is at most 250 characters and must be unique in the organization (the name of a deleted asset cannot be reused); type is location or vehicle.
- A location must have a location_group_id of a group of the organization; a vehicle must not have one.
- company_ids, when sent, must hold at least one entry, no duplicate, and only companies of the organization.
- A location cannot join a group that a running transfer uses (409).
- When company_ids is sent, one sharing link is created per company. No metadata is created.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Response mode. Default none; none answers 204 No Content.
none, resource Comma-separated JSON keys of the root resource (id is always rendered). Available: id, type, name, location_group_id, created_at, updated_at, company_ids, metadata, occupied_volume, fill_rate.
Comma-separated include paths, each optionally followed by its fields in parentheses: units(id,sku),units.uomUnit(id,name). Max depth 6, max 40 paths. Available: locationGroup.
Response
Resource (only with response=resource).
Identifier of the asset (27-character KSUID).
Kind of asset: location or vehicle.
Name of the asset, unique in the organization.
Identifier of the location group of a location; null for a vehicle.
The group (id and name); omitted when the asset has none.
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).
Identifiers of the companies of the organization the asset is shared with, sorted by link id.
Map of every metadata key allowed for the type, with null for keys never set. Measurement values are in the unit chosen by the matching unit key.
Locations only: volume of stock held at the location, expressed in the location's volume unit; null when no volume unit is set.
Locations only: occupied volume as a percentage of fillable_volume, rounded to two decimals; 0 when fillable_volume is not positive, null when it is not set.