ShippingApi - functional programming interface

  • Parameters

    • Optionalconfiguration: Configuration

    Returns {
        cancelShipment(
            shipmentId: string,
            xAmznShippingBusinessId?: CancelShipmentXAmznShippingBusinessIdEnum,
            options?: RawAxiosRequestConfig,
        ): Promise<
            (
                axios?: AxiosInstance,
                basePath?: string,
            ) => AxiosPromise<CancelShipmentResponse>,
        >;
        directPurchaseShipment(
            body: DirectPurchaseRequest,
            xAmznIdempotencyKey?: string,
            locale?: string,
            xAmznShippingBusinessId?: DirectPurchaseShipmentXAmznShippingBusinessIdEnum,
            options?: RawAxiosRequestConfig,
        ): Promise<
            (
                axios?: AxiosInstance,
                basePath?: string,
            ) => AxiosPromise<DirectPurchaseResponse>,
        >;
        generateCollectionForm(
            body: GenerateCollectionFormRequest,
            xAmznIdempotencyKey?: string,
            xAmznShippingBusinessId?: GenerateCollectionFormXAmznShippingBusinessIdEnum,
            options?: RawAxiosRequestConfig,
        ): Promise<
            (
                axios?: AxiosInstance,
                basePath?: string,
            ) => AxiosPromise<GenerateCollectionFormResponse>,
        >;
        getAccessPoints(
            accessPointTypes: GetAccessPointsAccessPointTypesEnum[],
            countryCode: string,
            postalCode: string,
            xAmznShippingBusinessId?: GetAccessPointsXAmznShippingBusinessIdEnum,
            options?: RawAxiosRequestConfig,
        ): Promise<
            (
                axios?: AxiosInstance,
                basePath?: string,
            ) => AxiosPromise<GetAccessPointsResponse>,
        >;
        getAdditionalInputs(
            requestToken: string,
            rateId: string,
            xAmznShippingBusinessId?: GetAdditionalInputsXAmznShippingBusinessIdEnum,
            options?: RawAxiosRequestConfig,
        ): Promise<
            (
                axios?: AxiosInstance,
                basePath?: string,
            ) => AxiosPromise<GetAdditionalInputsResponse>,
        >;
        getCarrierAccountFormInputs(
            xAmznShippingBusinessId?: GetCarrierAccountFormInputsXAmznShippingBusinessIdEnum,
            options?: RawAxiosRequestConfig,
        ): Promise<
            (
                axios?: AxiosInstance,
                basePath?: string,
            ) => AxiosPromise<GetCarrierAccountFormInputsResponse>,
        >;
        getCarrierAccounts(
            body: GetCarrierAccountsRequest,
            xAmznShippingBusinessId?: GetCarrierAccountsXAmznShippingBusinessIdEnum,
            options?: RawAxiosRequestConfig,
        ): Promise<
            (
                axios?: AxiosInstance,
                basePath?: string,
            ) => AxiosPromise<GetCarrierAccountsResponse>,
        >;
        getCollectionForm(
            collectionFormId: string,
            xAmznShippingBusinessId?: GetCollectionFormXAmznShippingBusinessIdEnum,
            options?: RawAxiosRequestConfig,
        ): Promise<
            (
                axios?: AxiosInstance,
                basePath?: string,
            ) => AxiosPromise<GetCollectionFormResponse>,
        >;
        getCollectionFormHistory(
            body: GetCollectionFormHistoryRequest,
            xAmznShippingBusinessId?: GetCollectionFormHistoryXAmznShippingBusinessIdEnum,
            options?: RawAxiosRequestConfig,
        ): Promise<
            (
                axios?: AxiosInstance,
                basePath?: string,
            ) => AxiosPromise<GetCollectionFormHistoryResponse>,
        >;
        getRates(
            body: GetRatesRequest,
            xAmznShippingBusinessId?: GetRatesXAmznShippingBusinessIdEnum,
            options?: RawAxiosRequestConfig,
        ): Promise<
            (
                axios?: AxiosInstance,
                basePath?: string,
            ) => AxiosPromise<GetRatesResponse>,
        >;
        getShipmentDocuments(
            shipmentId: string,
            packageClientReferenceId: string,
            format?: string,
            dpi?: number,
            xAmznShippingBusinessId?: GetShipmentDocumentsXAmznShippingBusinessIdEnum,
            options?: RawAxiosRequestConfig,
        ): Promise<
            (
                axios?: AxiosInstance,
                basePath?: string,
            ) => AxiosPromise<GetShipmentDocumentsResponse>,
        >;
        getTracking(
            trackingId: string,
            carrierId: string,
            xAmznShippingBusinessId?: GetTrackingXAmznShippingBusinessIdEnum,
            options?: RawAxiosRequestConfig,
        ): Promise<
            (
                axios?: AxiosInstance,
                basePath?: string,
            ) => AxiosPromise<GetTrackingResponse>,
        >;
        getUnmanifestedShipments(
            body: GetUnmanifestedShipmentsRequest,
            xAmznShippingBusinessId?: GetUnmanifestedShipmentsXAmznShippingBusinessIdEnum,
            options?: RawAxiosRequestConfig,
        ): Promise<
            (
                axios?: AxiosInstance,
                basePath?: string,
            ) => AxiosPromise<GetUnmanifestedShipmentsResponse>,
        >;
        linkCarrierAccount(
            carrierId: string,
            body: LinkCarrierAccountRequest,
            xAmznShippingBusinessId?: LinkCarrierAccountXAmznShippingBusinessIdEnum,
            options?: RawAxiosRequestConfig,
        ): Promise<
            (
                axios?: AxiosInstance,
                basePath?: string,
            ) => AxiosPromise<LinkCarrierAccountResponse>,
        >;
        oneClickShipment(
            body: OneClickShipmentRequest,
            xAmznShippingBusinessId?: OneClickShipmentXAmznShippingBusinessIdEnum,
            options?: RawAxiosRequestConfig,
        ): Promise<
            (
                axios?: AxiosInstance,
                basePath?: string,
            ) => AxiosPromise<OneClickShipmentResponse>,
        >;
        purchaseShipment(
            body: PurchaseShipmentRequest,
            xAmznIdempotencyKey?: string,
            xAmznShippingBusinessId?: PurchaseShipmentXAmznShippingBusinessIdEnum,
            options?: RawAxiosRequestConfig,
        ): Promise<
            (
                axios?: AxiosInstance,
                basePath?: string,
            ) => AxiosPromise<PurchaseShipmentResponse>,
        >;
        unlinkCarrierAccount(
            carrierId: string,
            body: UnlinkCarrierAccountRequest,
            xAmznShippingBusinessId?: UnlinkCarrierAccountXAmznShippingBusinessIdEnum,
            options?: RawAxiosRequestConfig,
        ): Promise<
            (
                axios?: AxiosInstance,
                basePath?: string,
            ) => AxiosPromise<UnlinkCarrierAccountResponse>,
        >;
    }

    • cancelShipment:function
      • Cancels a purchased shipment. Returns an empty object if the shipment is successfully cancelled. Usage Plan: | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see Usage Plans and Rate Limits in the Selling Partner API.

        Parameters

        • shipmentId: string

          The shipment identifier originally returned by the purchaseShipment operation.

        • OptionalxAmznShippingBusinessId: CancelShipmentXAmznShippingBusinessIdEnum

          Amazon shipping business to assume for this request. The default is AmazonShipping_UK.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<
            (
                axios?: AxiosInstance,
                basePath?: string,
            ) => AxiosPromise<CancelShipmentResponse>,
        >

    • directPurchaseShipment:function
      • Purchases the shipping service for a shipment using the best fit service offering. Returns purchase related details and documents. Usage Plan: | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see Usage Plans and Rate Limits in the Selling Partner API.

        Parameters

        • body: DirectPurchaseRequest
        • OptionalxAmznIdempotencyKey: string

          A unique value which the server uses to recognize subsequent retries of the same request.

        • Optionallocale: string

          The IETF Language Tag. Note that this only supports the primary language subtag with one secondary language subtag (i.e. en-US, fr-CA). The secondary language subtag is almost always a regional designation. This does not support additional subtags beyond the primary and secondary language subtags.

        • OptionalxAmznShippingBusinessId: DirectPurchaseShipmentXAmznShippingBusinessIdEnum

          Amazon shipping business to assume for this request. The default is AmazonShipping_UK.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<
            (
                axios?: AxiosInstance,
                basePath?: string,
            ) => AxiosPromise<DirectPurchaseResponse>,
        >

    • generateCollectionForm:function
      • This API Call to generate the collection form. Usage Plan: | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see Usage Plans and Rate Limits in the Selling Partner API.

        Parameters

        • body: GenerateCollectionFormRequest
        • OptionalxAmznIdempotencyKey: string

          A unique value which the server uses to recognize subsequent retries of the same request.

        • OptionalxAmznShippingBusinessId: GenerateCollectionFormXAmznShippingBusinessIdEnum

          Amazon shipping business to assume for this request. The default is AmazonShipping_UK.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<
            (
                axios?: AxiosInstance,
                basePath?: string,
            ) => AxiosPromise<GenerateCollectionFormResponse>,
        >

    • getAccessPoints:function
      • Returns a list of access points in proximity of input postal code. Usage Plan: | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see Usage Plans and Rate Limits in the Selling Partner API.

        Parameters

        Returns Promise<
            (
                axios?: AxiosInstance,
                basePath?: string,
            ) => AxiosPromise<GetAccessPointsResponse>,
        >

    • getAdditionalInputs:function
      • Returns the JSON schema to use for providing additional inputs when needed to purchase a shipping offering. Call the getAdditionalInputs operation when the response to a previous call to the getRates operation indicates that additional inputs are required for the rate (shipping offering) that you want to purchase. Usage Plan: | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see Usage Plans and Rate Limits in the Selling Partner API.

        Parameters

        • requestToken: string

          The request token returned in the response to the getRates operation.

        • rateId: string

          The rate identifier for the shipping offering (rate) returned in the response to the getRates operation.

        • OptionalxAmznShippingBusinessId: GetAdditionalInputsXAmznShippingBusinessIdEnum

          Amazon shipping business to assume for this request. The default is AmazonShipping_UK.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<
            (
                axios?: AxiosInstance,
                basePath?: string,
            ) => AxiosPromise<GetAdditionalInputsResponse>,
        >

    • getCarrierAccountFormInputs:function
      • This API will return a list of input schema required to register a shipper account with the carrier. Usage Plan: | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see Usage Plans and Rate Limits in the Selling Partner API.

        Parameters

        Returns Promise<
            (
                axios?: AxiosInstance,
                basePath?: string,
            ) => AxiosPromise<GetCarrierAccountFormInputsResponse>,
        >

    • getCarrierAccounts:function
    • getCollectionForm:function
      • This API reprint a collection form. Usage Plan: | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see Usage Plans and Rate Limits in the Selling Partner API.

        Parameters

        • collectionFormId: string

          collection form Id to reprint a collection.

        • OptionalxAmznShippingBusinessId: GetCollectionFormXAmznShippingBusinessIdEnum

          Amazon shipping business to assume for this request. The default is AmazonShipping_UK.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<
            (
                axios?: AxiosInstance,
                basePath?: string,
            ) => AxiosPromise<GetCollectionFormResponse>,
        >

    • getCollectionFormHistory:function
    • getRates:function
      • Returns the available shipping service offerings. Usage Plan: | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see Usage Plans and Rate Limits in the Selling Partner API.

        Parameters

        Returns Promise<
            (
                axios?: AxiosInstance,
                basePath?: string,
            ) => AxiosPromise<GetRatesResponse>,
        >

    • getShipmentDocuments:function
      • Returns the shipping documents associated with a package in a shipment. Usage Plan: | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see Usage Plans and Rate Limits in the Selling Partner API.

        Parameters

        • shipmentId: string

          The shipment identifier originally returned by the purchaseShipment operation.

        • packageClientReferenceId: string

          The package client reference identifier originally provided in the request body parameter for the getRates operation.

        • Optionalformat: string

          The file format of the document. Must be one of the supported formats returned by the getRates operation.

        • Optionaldpi: number

          The resolution of the document (for example, 300 means 300 dots per inch). Must be one of the supported resolutions returned in the response to the getRates operation.

        • OptionalxAmznShippingBusinessId: GetShipmentDocumentsXAmznShippingBusinessIdEnum

          Amazon shipping business to assume for this request. The default is AmazonShipping_UK.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<
            (
                axios?: AxiosInstance,
                basePath?: string,
            ) => AxiosPromise<GetShipmentDocumentsResponse>,
        >

    • getTracking:function
      • Returns tracking information for a purchased shipment. Usage Plan: | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see Usage Plans and Rate Limits in the Selling Partner API.

        Parameters

        • trackingId: string

          A carrier-generated tracking identifier originally returned by the purchaseShipment operation.

        • carrierId: string

          A carrier identifier originally returned by the getRates operation for the selected rate.

        • OptionalxAmznShippingBusinessId: GetTrackingXAmznShippingBusinessIdEnum

          Amazon shipping business to assume for this request. The default is AmazonShipping_UK.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<
            (
                axios?: AxiosInstance,
                basePath?: string,
            ) => AxiosPromise<GetTrackingResponse>,
        >

    • getUnmanifestedShipments:function
    • linkCarrierAccount:function
      • This API associates/links the specified carrier account with the merchant. Usage Plan: | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see Usage Plans and Rate Limits in the Selling Partner API.

        Parameters

        Returns Promise<
            (
                axios?: AxiosInstance,
                basePath?: string,
            ) => AxiosPromise<LinkCarrierAccountResponse>,
        >

    • oneClickShipment:function
      • Purchases a shipping service identifier and returns purchase-related details and documents. Usage Plan: | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see Usage Plans and Rate Limits in the Selling Partner API.

        Parameters

        Returns Promise<
            (
                axios?: AxiosInstance,
                basePath?: string,
            ) => AxiosPromise<OneClickShipmentResponse>,
        >

    • purchaseShipment:function
      • Purchases a shipping service and returns purchase related details and documents. Note: You must complete the purchase within 10 minutes of rate creation by the shipping service provider. If you make the request after the 10 minutes have expired, you will receive an error response with the error code equal to "TOKEN_EXPIRED". If you receive this error response, you must get the rates for the shipment again. Usage Plan: | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see Usage Plans and Rate Limits in the Selling Partner API.

        Parameters

        • body: PurchaseShipmentRequest
        • OptionalxAmznIdempotencyKey: string

          A unique value which the server uses to recognize subsequent retries of the same request.

        • OptionalxAmznShippingBusinessId: PurchaseShipmentXAmznShippingBusinessIdEnum

          Amazon shipping business to assume for this request. The default is AmazonShipping_UK.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<
            (
                axios?: AxiosInstance,
                basePath?: string,
            ) => AxiosPromise<PurchaseShipmentResponse>,
        >

    • unlinkCarrierAccount:function
      • This API Unlink the specified carrier account with the merchant. Usage Plan: | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see Usage Plans and Rate Limits in the Selling Partner API.

        Parameters

        Returns Promise<
            (
                axios?: AxiosInstance,
                basePath?: string,
            ) => AxiosPromise<UnlinkCarrierAccountResponse>,
        >