Class
Client for the Transportation & Cargo API.
Configure additional code reading with TransportAPIOptions.disableAdditionalCode,
which sends X-Disable-Additional-Code for OCR engines from 7.3.20.46.
The deprecated disableISOCode option remains a fallback when the new option is omitted.
The deprecated disableChecksumCheck option only affects older OCR engines.
Properties
| Name | Type | Description |
|---|
apiUrl | string | - |
options | TransportAPIOptions | - |
supportedAPIVersion | string | - |
Members
constructor
(options: TransportAPIOptions) => TransportAPIClient
Parameters
| Name | Type | Description |
|---|
options | TransportAPIOptions | - |
(imageDataOrPaths: string | Buffer | ReadStream[]) => FormData
Parameters
| Name | Type | Description |
|---|
imageDataOrPaths | string | Buffer | ReadStream[] | - |
(formData: FormData) => Headers
Parameters
| Name | Type | Description |
|---|
formData | FormData | - |
getImageBytes
(imagePathOrBuffer: string | Buffer | ReadStream) => Buffer | Stream
Parameters
| Name | Type | Description |
|---|
imagePathOrBuffer | string | Buffer | ReadStream | - |
getParametrizedApiUrl
() => any
selectApiBaseUrl
() => string
send
(imageDataOrPaths: string | Buffer | ReadStream[]) => Promise
Parameters
| Name | Type | Description |
|---|
imageDataOrPaths | string | Buffer | ReadStream[] | - |
validateOptions
(options: TransportAPIOptions) => void
Parameters
| Name | Type | Description |
|---|
options | TransportAPIOptions | - |
Source: transport/index.ts:19