# nomad_pilot_cli

> This_is_the_API_descriptor_for_the_Nomad_Pilot_API_responsible_for_shipping_and_logistics_processing__Developed_by__Samarkand_Global_https__www_samarkand_global__in_partnership_with__SF_Express_https__www_sf_express_com___eSinotrans_http__air_esinotrans_c

Latest version **1.53.0** (published 2023-07-11) · Unlicense license · 0 weekly downloads

## Install

```sh
npm install nomad_pilot_cli
pnpm add nomad_pilot_cli
yarn add nomad_pilot_cli
bun add nomad_pilot_cli
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.53.0 |
| Published | 2023-07-11 |
| First published | 2019-03-15 |
| Weekly downloads | 0 |
| License | Unlicense |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 656.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | paulsmk, davidchenlondon, ben_2019 |

## Links

- npm: https://www.npmjs.com/package/nomad_pilot_cli
- npm.io page: https://npm.io/package/nomad_pilot_cli

## Dependencies (2)

- [@babel/cli](https://npm.io/package/@babel/cli.md) ^7.0.0
- [superagent](https://npm.io/package/superagent.md) 3.7.0

## Recent versions

- 1.53.0 (latest) — 2023-07-11
- 1.52.0 — 2023-02-02
- 1.50.0 — 2022-09-01
- 1.48.0 — 2022-03-09
- 1.47.0 — 2022-02-23
- 1.46.0 — 2022-02-11
- 1.45.0 — 2022-01-14
- 1.44.21 — 2021-12-16
- 1.44.2 — 2021-12-14
- 1.43.1 — 2021-09-29
- 1.43.0 — 2021-09-22
- 1.42.0 — 2021-07-16
- 1.41.0 — 2021-05-31
- 1.40.0 — 2021-05-19
- 1.39.0 — 2021-05-08
- … 29 more at https://npm.io/package/nomad_pilot_cli/versions

## README

# nomad_pilot_cli

NomadPilotCli - JavaScript client for nomad_pilot_cli
This is the API descriptor for the Nomad Pilot API, responsible for shipping and logistics processing. Developed by [Samarkand Global](https://www.samarkand.global/) in partnership with [SF Express](https://www.sf-express.com/), [eSinotrans](http://air.esinotrans.com/), [sto](http://sto-express.co.uk/). Read the documentation online at [Nomad API Suite](https://api.samarkand.io/).
- Install for node with `npm install nomad_pilot_cli`
- Install for python with `pip install nomad-pilot-cli`
- Install for Maven users `groupId, com.gitlab.samarkand-nomad; artifactId, nomad-pilot-cli`
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1.53.0
- Package version: 1.53.0
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen

## Installation

### For [Node.js](https://nodejs.org/)

#### npm

To publish the library as a [npm](https://www.npmjs.com/), please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages).

Then install it via:

```shell
npm install nomad_pilot_cli --save
```

Finally, you need to build the module:

```shell
npm run build
```

##### Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing `package.json` (and this README). Let's call this `JAVASCRIPT_CLIENT_DIR`. Then run:

```shell
npm install
```

Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`:

```shell
npm link
```

To use the link you just defined in your project, switch to the directory you want to use your nomad_pilot_cli from, and run:

```shell
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
```

Finally, you need to build the module:

```shell
npm run build
```

#### git

If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID
then install it via:

```shell
npm install GIT_USER_ID/GIT_REPO_ID --save
```

### For browser

The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following
the above steps with Node.js and installing browserify with `npm install -g browserify`,
perform the following (assuming *main.js* is your entry file):

```shell
browserify main.js > bundle.js
```

Then include *bundle.js* in the HTML pages.

### Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error:
Cannot resolve module", most certainly you should disable AMD loader. Add/merge
the following section to your webpack config:

```javascript
module: {
rules: [
{
parser: {
amd: false
}
}
]
}
```

## Getting Started

Please follow the [installation](#installation) instruction and execute the following JS code:

```javascript
const nomadPilotCli = require("/nomad_javascript_client");

var defaultClient = nomadPilotCli.ApiClient.instance;
defaultClient.defaultHeaders["x-ca-stage"] = "test";
defaultClient.defaultHeaders["Authorization"] = "APPCODE " +
    process.env["ALICLOUD_APIGATEWAY_APP_API_KEY"];

var api = new nomadPilotCli.ShipApi();
var carrier = "samarkand.sinotrans.test";

const packageData = {
    "orderRef": "CHT1542019685",
    "sellerOrderRef": "Iceland123456",
    "currency": "RMB",
    "dimension": { "weight": 0.49, "height": 1, "length": 1, "width": 1 },
    "items": [
        { "name": "综合维生素片", "barcode": null, "quantity": 6, "price": 150, "brand": null,
        "quantityUom": "50G", "hsCode": "2104200000", "countryOfOrigin": "United States", "goldjet": { "goodsPtcode": "27000000" } },
        { "name": "牙膏", "barcode": null, "quantity": 3, "price": 10, "brand": null,
        "quantityUom": "50G", "hsCode": "2104200000", "countryOfOrigin": "United States", "goldjet": { "goodsPtcode": "27000000" } }],
    "shipFrom": { "firstName": "Zonghai", "lastName": "Liang", "address1": "6804 NE 79th Ct.", "address2": "foobar", "city": "纽约", "state": "纽约州", "country": "US", "zip": "EC1N 2SW", "tin": "tin", "phone": "123456", "countryCode": "US", "email": "a@b.com" },
    "shipTo": { "firstName": "小", "lastName": "张", "address1": "天河区^^^中山大道", "address2": null, "city": "广州市", "state": "广东省", "country": "CN", "zip": "1000", "tin": null, "phone": "123456", "countryCode": null, "email": "a@b.com" },
    "bill": { "firstName": "小明", "lastName": "王", "address1": "天河区^^^中山大道", "address2": null, "city": "广州市", "state": "广东省", "country": "CN", "zip": null, "tin": null, "phone": "123456", "countryCode": null, "email": "a@b.com" }
};
var pkg = new nomadPilotCli.ModelPackage.constructFromObject(packageData);
pkg.orderRef += Date.now()
//  https://jsrun.net/app/sfz
pkg.shipTo.idCard = "420101197301115218"
pkg.bill.idCard = "42010119940927595X"

var callback = function (error, data, response) {
    if (error) {
        console.error(error);
    } else {
        console.log("API called successfully. Returned data: " + data.data);
        console.log(data);
    }
};
/* POST */
api.ship(carrier, pkg, callback);

/* GET */
api.queryShip(carrier, pkg.orderRef, pkg.sellerOrderRef, callback);

/* DELETE */
api.cancelShip(carrier, pkg.orderRef, callback);
```

## Documentation for API Endpoints

All URIs are relative to *https://nomad.samarkand-global.cn/pilot*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*NomadPilotCli.BatchApi* | [**addParcel**](docs/BatchApi.md#addParcel) | **POST** /ship/{carrier}/batch/{batch_id}/add-to-batch | batch
*NomadPilotCli.BatchApi* | [**createBatch**](docs/BatchApi.md#createBatch) | **POST** /ship/{carrier}/create-batch | batch
*NomadPilotCli.BatchApi* | [**removeParcel**](docs/BatchApi.md#removeParcel) | **POST** /ship/{carrier}/batch/{batch_id}/remove-from-batch | batch
*NomadPilotCli.BatchApi* | [**scanBatch**](docs/BatchApi.md#scanBatch) | **POST** /ship/{carrier}/batch/{batch_id}/create-scan-form | batch
*NomadPilotCli.CallbackApi* | [**callback**](docs/CallbackApi.md#callback) | **POST** /callback/{store} | callback
*NomadPilotCli.CarriersApi* | [**queryCarrier**](docs/CarriersApi.md#queryCarrier) | **GET** /carriers/ | queryCarrier
*NomadPilotCli.FreightForwardApi* | [**freightForward**](docs/FreightForwardApi.md#freightForward) | **POST** /freight-forward/{carrier} | freightForward
*NomadPilotCli.FreightForwardApi* | [**putFreightForwardProduct**](docs/FreightForwardApi.md#putFreightForwardProduct) | **PUT** /freight-forward/product/{carrier} | freightForward
*NomadPilotCli.FreightForwardApi* | [**queryFreightForward**](docs/FreightForwardApi.md#queryFreightForward) | **GET** /freight-forward/{carrier} | queryFreightForward
*NomadPilotCli.InventoryApi* | [**getInventoryProduct**](docs/InventoryApi.md#getInventoryProduct) | **GET** /inventory/product/{carrier} | inventory
*NomadPilotCli.InventoryApi* | [**postInventoryProduct**](docs/InventoryApi.md#postInventoryProduct) | **POST** /inventory/product/{carrier} | inventory
*NomadPilotCli.InventoryApi* | [**putInventoryProduct**](docs/InventoryApi.md#putInventoryProduct) | **PUT** /inventory/product/{carrier} | inventory
*NomadPilotCli.InventoryPurchaseApi* | [**deleteInventoryPurchase**](docs/InventoryPurchaseApi.md#deleteInventoryPurchase) | **DELETE** /inventory/purchase/{carrier} | inventory_purchase
*NomadPilotCli.InventoryPurchaseApi* | [**getInventoryPurchase**](docs/InventoryPurchaseApi.md#getInventoryPurchase) | **GET** /inventory/purchase/{carrier} | inventory_purchase
*NomadPilotCli.InventoryPurchaseApi* | [**postInventoryPurchase**](docs/InventoryPurchaseApi.md#postInventoryPurchase) | **POST** /inventory/purchase/{carrier} | inventory_purchase
*NomadPilotCli.QuickShipApi* | [**quickShip**](docs/QuickShipApi.md#quickShip) | **POST** /quick-ship/{carrier} | quickShip
*NomadPilotCli.ShipApi* | [**cancelShip**](docs/ShipApi.md#cancelShip) | **DELETE** /ship/{carrier}/order/{seller_order_ref} | cancelShip
*NomadPilotCli.ShipApi* | [**putShip**](docs/ShipApi.md#putShip) | **PUT** /ship/{carrier} | ship
*NomadPilotCli.ShipApi* | [**queryShip**](docs/ShipApi.md#queryShip) | **GET** /ship/{carrier}/order/{seller_order_ref} | queryShip
*NomadPilotCli.ShipApi* | [**ship**](docs/ShipApi.md#ship) | **POST** /ship/{carrier} | ship
*NomadPilotCli.ShipConfirmApi* | [**shipConfirm**](docs/ShipConfirmApi.md#shipConfirm) | **POST** /ship/{carrier}/confirm | shipConfirm


## Documentation for Models

- [NomadPilotCli.Address](docs/Address.md)
- [NomadPilotCli.AddressRequired](docs/AddressRequired.md)
- [NomadPilotCli.AddressShip](docs/AddressShip.md)
- [NomadPilotCli.ApiResponse](docs/ApiResponse.md)
- [NomadPilotCli.ApiResponseCallback](docs/ApiResponseCallback.md)
- [NomadPilotCli.ApiResponseConnectorResponse](docs/ApiResponseConnectorResponse.md)
- [NomadPilotCli.ApiResponseData](docs/ApiResponseData.md)
- [NomadPilotCli.ApiResponseGeneral](docs/ApiResponseGeneral.md)
- [NomadPilotCli.ApiResponseInventory](docs/ApiResponseInventory.md)
- [NomadPilotCli.CallbackBody](docs/CallbackBody.md)
- [NomadPilotCli.DeliveryStatus](docs/DeliveryStatus.md)
- [NomadPilotCli.Dimension](docs/Dimension.md)
- [NomadPilotCli.Goldjet](docs/Goldjet.md)
- [NomadPilotCli.HaikuDeliveryOrder](docs/HaikuDeliveryOrder.md)
- [NomadPilotCli.InlineObject](docs/InlineObject.md)
- [NomadPilotCli.InlineObject1](docs/InlineObject1.md)
- [NomadPilotCli.InventoryBase](docs/InventoryBase.md)
- [NomadPilotCli.InventoryProduct](docs/InventoryProduct.md)
- [NomadPilotCli.InventoryPurchase](docs/InventoryPurchase.md)
- [NomadPilotCli.InventoryPurchaseItem](docs/InventoryPurchaseItem.md)
- [NomadPilotCli.InventoryResponseProduct](docs/InventoryResponseProduct.md)
- [NomadPilotCli.InventoryResponsePurchase](docs/InventoryResponsePurchase.md)
- [NomadPilotCli.ModelPackage](docs/ModelPackage.md)
- [NomadPilotCli.Pack](docs/Pack.md)
- [NomadPilotCli.PackBased](docs/PackBased.md)
- [NomadPilotCli.PackageFreight](docs/PackageFreight.md)
- [NomadPilotCli.PackageItem](docs/PackageItem.md)
- [NomadPilotCli.PackageItemQuick](docs/PackageItemQuick.md)
- [NomadPilotCli.PackageItems](docs/PackageItems.md)
- [NomadPilotCli.PackageItemsQuick](docs/PackageItemsQuick.md)
- [NomadPilotCli.PackagePut](docs/PackagePut.md)
- [NomadPilotCli.PackagePutRequired](docs/PackagePutRequired.md)
- [NomadPilotCli.PackageQuick](docs/PackageQuick.md)
- [NomadPilotCli.PackageRequired](docs/PackageRequired.md)
- [NomadPilotCli.PackageUpdate](docs/PackageUpdate.md)
- [NomadPilotCli.PackageUpdateRequired](docs/PackageUpdateRequired.md)
- [NomadPilotCli.ProductFreight](docs/ProductFreight.md)


## Documentation for Authorization



### ca_key


- **Type**: API key
- **API key parameter name**: x-ca-key
- **Location**: HTTP header



### ca_stage


- **Type**: API key
- **API key parameter name**: x-ca-stage
- **Location**: HTTP header

---
_Source: https://npm.io/package/nomad_pilot_cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
