• Executes a REST request against the Admin API.

    Type Parameters

    • T

    Parameters

    • method: string

      Request's HTTP method.

    • path: string

      Path of the REST resource.

    • session: AdminSession

      Shopify Admin session including token and Store FQDN.

    • Optional requestBody: T

      Request body of including REST resource specific parameters.

    • searchParams: {
          [name: string]: string;
      } = {}

      Search params, appended to the URL.

      • [name: string]: string
    • apiVersion: string = 'unstable'

      Admin API version.

    Returns Promise<RestResponse>