@entrygo/sdk
v0.1.0
Published
EntryGo SDK for supply-chain export orchestration.
Downloads
96
Maintainers
Readme
@entrygo/sdk
EntryGo is the export orchestration layer for supply-chain applications.
Use EntryGo when your application needs to:
- sync products
- sync orders
- plan exports
- execute exports
- submit shipments to brokers or partners
Install
pnpm add @entrygo/sdkUsage
import { EntryGo } from "@entrygo/sdk";
const entrygo = new EntryGo({
apiKey: process.env.ENTRYGO_API_KEY
});
const verification = await entrygo.setup.verify();
const product = await entrygo.products.upsert({
externalId: "prod-ext-1",
sku: "JKT-001",
name: "Wool jacket",
originCountry: "CA",
declaredValueUsd: 110,
materials: ["wool"]
});
const order = await entrygo.orders.create({
externalId: "ord-ext-1",
destinationCountry: "US",
items: [
{
productId: product.id,
quantity: 1,
unitValueUsd: 110
}
]
});
const plan = await entrygo.exports.plan(order.id);
const result = await entrygo.exports.execute(plan.batch_id);