cURL
curl -X POST "$EXSITED_BASE_URL/api/v4/settings/shipping_packages" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"shipping_package": {
"name": "Small box",
"length": 10,
"weight": 1.5
}
}'from exsited import build_client
client = build_client()
response = client.shipping_packages.create_settings_shipping_package(
{"shipping_package": {"name": "Small box", "length": 10, "weight": 1.5}}
)
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.shippingPackages.createSettingsShippingPackage({
shipping_package: {name: 'Small box', length: 10, weight: 1.5},
});
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->shippingPackages->createSettingsShippingPackage([
'shipping_package' => ['name' => 'Small box', 'length' => 10, 'weight' => 1.5],
]);
print_r($response->data);
import com.exsited.client.ApiResponse;
import com.exsited.client.ClientRegistry;
import com.exsited.client.ExsitedClient;
import com.exsited.resources.shipping_packages.shipping_packages_dto.ShippingPackagesDto.SettingsShippingPackage;
import java.util.Map;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<SettingsShippingPackage> response = client.shippingPackages().createSettingsShippingPackage(
Map.of("shipping_package", Map.of("name", "Small box", "length", 10, "weight", 1.5)));
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.ShippingPackages.CreateSettingsShippingPackageAsync(new Dictionary<string, object?>
{
["shipping_package"] = new Dictionary<string, object?>
{
["name"] = "Small box",
["length"] = 10,
["weight"] = 1.5,
},
});
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.shippingPackages.createSettingsShippingPackage({
'shipping_package': {'name': 'Small box', 'length': 10, 'weight': 1.5},
});
print(response.map);
import (
"context"
"fmt"
"log"
exsited "github.com/exsited/exsited-sdk-go/v4"
)
client, err := exsited.BuildClient(nil)
if err != nil {
log.Fatal(err)
}
defer client.Close()
response, err := client.ShippingPackages().CreateSettingsShippingPackage(context.Background(), map[string]any{
"shipping_package": map[string]any{
"name": "Small box",
"length": 10,
"weight": 1.5,
},
}, nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(response.Map)
{
"shipping_package": {
"created_by": "<unknown>",
"created_on": "<string>",
"cubic": "<unknown>",
"cubic_uom": "<unknown>",
"description": "<string>",
"display_name": "<string>",
"height": 123,
"height_uom": "<unknown>",
"href": "<string>",
"id": "<string>",
"last_updated_by": "<unknown>",
"last_updated_on": "<string>",
"length": 123,
"length_uom": "<unknown>",
"name": "<string>",
"object": "<string>",
"status": "<string>",
"weight": 123,
"weight_uom": "<unknown>",
"width": 123,
"width_uom": "<unknown>"
}
}Shipping packages
Create a shipping package
Creates a shipping package and returns it under shipping_package.
POST
/
settings
/
shipping_packages
cURL
curl -X POST "$EXSITED_BASE_URL/api/v4/settings/shipping_packages" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"shipping_package": {
"name": "Small box",
"length": 10,
"weight": 1.5
}
}'from exsited import build_client
client = build_client()
response = client.shipping_packages.create_settings_shipping_package(
{"shipping_package": {"name": "Small box", "length": 10, "weight": 1.5}}
)
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.shippingPackages.createSettingsShippingPackage({
shipping_package: {name: 'Small box', length: 10, weight: 1.5},
});
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->shippingPackages->createSettingsShippingPackage([
'shipping_package' => ['name' => 'Small box', 'length' => 10, 'weight' => 1.5],
]);
print_r($response->data);
import com.exsited.client.ApiResponse;
import com.exsited.client.ClientRegistry;
import com.exsited.client.ExsitedClient;
import com.exsited.resources.shipping_packages.shipping_packages_dto.ShippingPackagesDto.SettingsShippingPackage;
import java.util.Map;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<SettingsShippingPackage> response = client.shippingPackages().createSettingsShippingPackage(
Map.of("shipping_package", Map.of("name", "Small box", "length", 10, "weight", 1.5)));
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.ShippingPackages.CreateSettingsShippingPackageAsync(new Dictionary<string, object?>
{
["shipping_package"] = new Dictionary<string, object?>
{
["name"] = "Small box",
["length"] = 10,
["weight"] = 1.5,
},
});
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.shippingPackages.createSettingsShippingPackage({
'shipping_package': {'name': 'Small box', 'length': 10, 'weight': 1.5},
});
print(response.map);
import (
"context"
"fmt"
"log"
exsited "github.com/exsited/exsited-sdk-go/v4"
)
client, err := exsited.BuildClient(nil)
if err != nil {
log.Fatal(err)
}
defer client.Close()
response, err := client.ShippingPackages().CreateSettingsShippingPackage(context.Background(), map[string]any{
"shipping_package": map[string]any{
"name": "Small box",
"length": 10,
"weight": 1.5,
},
}, nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(response.Map)
{
"shipping_package": {
"created_by": "<unknown>",
"created_on": "<string>",
"cubic": "<unknown>",
"cubic_uom": "<unknown>",
"description": "<string>",
"display_name": "<string>",
"height": 123,
"height_uom": "<unknown>",
"href": "<string>",
"id": "<string>",
"last_updated_by": "<unknown>",
"last_updated_on": "<string>",
"length": 123,
"length_uom": "<unknown>",
"name": "<string>",
"object": "<string>",
"status": "<string>",
"weight": 123,
"weight_uom": "<unknown>",
"width": 123,
"width_uom": "<unknown>"
}
}Send the package under
shipping_package with its name and the dimensions you know. Give a unit for a dimension in its *_uom field as the unit’s bare uuid.
The SDK samples get their client from credentials your app registers once when it starts, as shown in Authentication. To try the call here, click Try it, set
host to your Exsited API host name and paste an access token from Get an access token. To send a raw JSON body instead of filling in fields, copy the cURL sample and edit its -d payload.Authorizations
An access token from POST /api/v4/oauth2/token. The SDKs get and renew it for you.
Body
application/json
Show child attributes
Show child attributes
Response
201 - application/json
The new shipping package, under shipping_package.
Show child attributes
Show child attributes