Hierarchy

  • Shipments

Properties

impersonating: boolean = false

Methods

  • Description

    enables impersonation by calling the subsequent method with the stored impersonation token

    Example

    Shipments.As().List() // lists Shipments using the impersonated users' token
    

    Returns Shipments

  • Create a new shipment. If ID is provided and an object with that ID already exists, a 409 (conflict) error is returned. Check out the docs for more info

    Type Parameters

    • TShipment extends Shipment<any, any, any, TShipment>

    Parameters

    Returns Promise<RequiredDeep<TShipment>>

  • Delete a shipment. Check out the docs for more info

    Parameters

    • shipmentID: string

      ID of the shipment.

    • requestOptions: RequestOptions = {}

    Returns Promise<void>

  • Delete a shipment item. Check out the docs for more info

    Parameters

    • shipmentID: string

      ID of the shipment.

    • orderID: string

      ID of the order.

    • lineItemID: string

      ID of the line item.

    • requestOptions: RequestOptions = {}

    Returns Promise<void>

  • Get a single shipment item. Check out the docs for more info

    Type Parameters

    • TShipmentItem extends ShipmentItem<any, any, any, TShipmentItem>

    Parameters

    • shipmentID: string

      ID of the shipment.

    • orderID: string

      ID of the order.

    • lineItemID: string

      ID of the line item.

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredDeep<TShipmentItem>>

  • Get a list of shipments. Check out the docs for more info

    Type Parameters

    • TShipment extends Shipment<any, any, any, TShipment>

    Parameters

    • listOptions: {
          filters?: Filters;
          orderID?: string;
          page?: number;
          pageSize?: number;
          search?: string;
          searchOn?: ("ID" | "BuyerID" | "Shipper" | "DateShipped" | "DateDelivered" | "TrackingNumber")[];
          sortBy?: ("ID" | "BuyerID" | "Shipper" | "DateShipped" | "DateDelivered" | "!ID" | "OwnerID" | "!OwnerID" | "!BuyerID" | "Cost" | "!DateShipped" | "!Shipper" | "!DateDelivered" | "!Cost")[];
      } = {}
      • Optional filters?: Filters

        An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???'

      • Optional orderID?: string

        ID of the order.

      • Optional page?: number

        Page of results to return. Default: 1. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.

      • Optional pageSize?: number

        Number of results to return per page. Default: 20, max: 100.

      • Optional search?: string

        Word or phrase to search for.

      • Optional searchOn?: ("ID" | "BuyerID" | "Shipper" | "DateShipped" | "DateDelivered" | "TrackingNumber")[]

        Comma-delimited list of fields to search on.

      • Optional sortBy?: ("ID" | "BuyerID" | "Shipper" | "DateShipped" | "DateDelivered" | "!ID" | "OwnerID" | "!OwnerID" | "!BuyerID" | "Cost" | "!DateShipped" | "!Shipper" | "!DateDelivered" | "!Cost")[]

        Comma-delimited list of fields to sort by.

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredObjectDeep<ListPage<TShipment>>>

  • Get a list of shipment items. Check out the docs for more info

    Type Parameters

    • TShipmentItem extends ShipmentItem<any, any, any, TShipmentItem>

    Parameters

    • shipmentID: string

      ID of the shipment.

    • listOptions: {
          filters?: Filters;
          page?: number;
          pageSize?: number;
          search?: string;
          searchOn?: [];
          sortBy?: [];
      } = {}
      • Optional filters?: Filters

        An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???'

      • Optional page?: number

        Page of results to return. Default: 1. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.

      • Optional pageSize?: number

        Number of results to return per page. Default: 20, max: 100.

      • Optional search?: string

        Word or phrase to search for.

      • Optional searchOn?: []

        Comma-delimited list of fields to search on.

      • Optional sortBy?: []

        Comma-delimited list of fields to sort by.

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredObjectDeep<ListPage<TShipmentItem>>>

  • Create or update a shipment. If an object with the same ID already exists, it will be overwritten. Check out the docs for more info

    Type Parameters

    • TShipment extends Shipment<any, any, any, TShipment>

    Parameters

    Returns Promise<RequiredDeep<TShipment>>

  • Create or update a shipment item. Check out the docs for more info

    Type Parameters

    • TShipmentItem extends ShipmentItem<any, any, any, TShipmentItem>

    Parameters

    • shipmentID: string

      ID of the shipment.

    • shipmentItem: ShipmentItem<any, any, any>

      Required fields: OrderID, LineItemID, QuantityShipped

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredDeep<TShipmentItem>>

  • Set a ship from address. Use only when the address is not to be saved/reused. To use a saved address (i.e. from the Addresses resource), PATCH the shipment's FromAddressID property instead. Check out the docs for more info

    Type Parameters

    • TShipment extends Shipment<any, any, any, TShipment>

    Parameters

    • shipmentID: string

      ID of the shipment.

    • address: Address<any>

      Required fields: Street1, City, State, Zip, Country

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredDeep<TShipment>>

  • Set a ship to address. Use only when the address is not to be saved/reused. To use a saved address (i.e. from the Addresses resource), PATCH the shipment's ToAddressID property instead. Check out the docs for more info

    Type Parameters

    • TShipment extends Shipment<any, any, any, TShipment>

    Parameters

    • shipmentID: string

      ID of the shipment.

    • address: Address<any>

      Required fields: Street1, City, State, Zip, Country

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredDeep<TShipment>>

Generated using TypeDoc