Main Sapo API client

Constructors

Properties

blogs: Blogs
collections: Collections
customers: Customers
fulfillments: Fulfillments
inventory: Inventory
metafields: Metafields
orders: Orders
pages: Pages
priceRules: PriceRules
products: Products
webhooks: Webhooks

Methods

  • Complete OAuth flow and get access token

    Parameters

    • store: string
    • callbackUrl: string

    Returns Promise<string>

  • Make a DELETE request

    Type Parameters

    • T

    Parameters

    • path: string
    • Optional params: Record<string, any>

    Returns Promise<T>

  • Make a GET request

    Type Parameters

    • T

    Parameters

    • path: string
    • Optional params: Record<string, any>

    Returns Promise<T>

  • Get OAuth authorization URL

    Parameters

    • store: string
    • scopes: Scope[]

    Returns string

  • Make a POST request

    Type Parameters

    • T

    Parameters

    • path: string
    • Optional data: any

    Returns Promise<T>

  • Make a PUT request

    Type Parameters

    • T

    Parameters

    • path: string
    • Optional data: any

    Returns Promise<T>

  • Set access token for authenticated requests

    Parameters

    • token: string

    Returns void

  • Set store URL for API requests

    Parameters

    • store: string

    Returns void

  • Verify webhook HMAC signature

    Parameters

    • query: Record<string, string>
    • hmac: string

    Returns boolean