# nomad-pilot-cli
This is the API descriptor for the Nomad Pilot API, responsible for shipping and logistics processing.
Developed by `Samarkand Global <https://samarkand.global>`_ in partnership with `SF Express <https://www.sf- express.com/cn/sc/>`_, `eSinotrans <http://www.esinotrans.com/haitao.html>`_.
Read the documentation online at `Nomad API Suite <https://api.samarkand.io/>`_ and Check out the detailed `changelog <https://gitlab.com/samarkand-nomad/nomad_readme/-/raw/master/history/nomad_pilot.md>`_.
- Install for node with ``npm install nomad_pilot_cli`` - Install for python with ``pip install nomad-pilot-cli``

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1.29.1
- Package version: 1.29.1
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

## Requirements.

Python 2.7 and 3.4+

## Installation & Usage
### pip install

If the python package is hosted on a repository, you can install directly using:

```sh
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)

Then import the package:
```python
import nomad_pilot_cli
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import nomad_pilot_cli
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python
from __future__ import print_function
import time
import nomad_pilot_cli
from nomad_pilot_cli.rest import ApiException
from pprint import pprint

configuration = nomad_pilot_cli.Configuration()
# Configure API key authorization: ca_key
configuration.api_key['x-ca-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-ca-key'] = 'Bearer'

# Defining host is optional and default to https://nomad.samarkand-global.cn/pilot
configuration.host = "https://nomad.samarkand-global.cn/pilot"
# Enter a context with an instance of the API client
with nomad_pilot_cli.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = nomad_pilot_cli.FreightForwardApi(api_client)
    carrier = 'carrier_example' # str | Carrier to ship with
status = 'CREATED' # str | package status, 2 available options: [CREATED, PROCESSED] (default to 'CREATED')
page_no = 1 # int | Page number, between 1 and 1000 (default to 1)
page_size = 10 # int | Page size, options: [1, 10, 50, 100] (default to 10)
tracking_refs = [] # list[str] | String name of tracking reference by Express Company. One or more tracking references: [SF1026045099931, SF1025950147480] (optional) (default to [])
created_range = 'created_range_example' # str | the time range of package update, use ISO_8601 format here, e.g. 2020-07-10T13:00:00Z/2020-07-11T15:30:00Z (optional)

    try:
        # queryFreightForward
        api_response = api_instance.query_freight_forward(carrier, status, page_no, page_size, tracking_refs=tracking_refs, created_range=created_range)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling FreightForwardApi->query_freight_forward: %s\n" % e)
    
```

## Documentation for API Endpoints

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

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*FreightForwardApi* | [**query_freight_forward**](docs/FreightForwardApi.md#query_freight_forward) | **GET** /freight-forward/{carrier} | queryFreightForward
*QuickShipApi* | [**quick_ship**](docs/QuickShipApi.md#quick_ship) | **POST** /quick-ship/{carrier} | quickShip
*ShipApi* | [**cancel_ship**](docs/ShipApi.md#cancel_ship) | **DELETE** /ship/{carrier}/order/{order_ref} | cancelShip
*ShipApi* | [**put_ship**](docs/ShipApi.md#put_ship) | **PUT** /ship/{carrier} | ship
*ShipApi* | [**query_ship**](docs/ShipApi.md#query_ship) | **GET** /ship/{carrier}/order/{order_ref} | queryShip
*ShipApi* | [**ship**](docs/ShipApi.md#ship) | **POST** /ship/{carrier} | ship
*ShipConfirmApi* | [**ship_confirm**](docs/ShipConfirmApi.md#ship_confirm) | **POST** /ship/{carrier}/confirm | shipConfirm


## Documentation For Models

 - [Address](docs/Address.md)
 - [AddressRequired](docs/AddressRequired.md)
 - [AddressShip](docs/AddressShip.md)
 - [ApiResponse](docs/ApiResponse.md)
 - [ApiResponseConnectorResponse](docs/ApiResponseConnectorResponse.md)
 - [ApiResponseData](docs/ApiResponseData.md)
 - [ApiResponseGeneral](docs/ApiResponseGeneral.md)
 - [Dimension](docs/Dimension.md)
 - [Goldjet](docs/Goldjet.md)
 - [Pack](docs/Pack.md)
 - [PackBased](docs/PackBased.md)
 - [Package](docs/Package.md)
 - [PackageItem](docs/PackageItem.md)
 - [PackageItemQuick](docs/PackageItemQuick.md)
 - [PackageItems](docs/PackageItems.md)
 - [PackageItemsQuick](docs/PackageItemsQuick.md)
 - [PackageQuick](docs/PackageQuick.md)
 - [PackageRequired](docs/PackageRequired.md)
 - [PackageUpdate](docs/PackageUpdate.md)
 - [PackageUpdateRequired](docs/PackageUpdateRequired.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


## Author

paul@samarkand.global


