Search

Search data

Search a single resource using Metorik's existing store search system.
You must provide both the resource to search and the query string. Any
returned *_at timestamps are in UTC.

GET /api/v1/store/search

Search data

curl --request GET \
  --url 'https://{baseUrl}/api/v1/store/search' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "resource": "<string>",
  "data": [
    {
      "order_id": 1,
      "customer_id": 1,
      "order_number": "<string>",
      "order_name": "<string>",
      "status": "<string>",
      "order_created_at": "<string>",
      "order_updated_at": "<string>",
      "order_paid_at": "<string>",
      "order_completed_at": "<string>",
      "currency": "<string>",
      "billing_address_first_name": "<string>",
      "billing_address_last_name": "<string>"
    }
  ]
}

No response description.

Authorizations

  • Authorization string required header

    Generate a store API key from the store's Metorik API settings in Metorik, and choose the scopes needed for the endpoints you want to call.

Query Parameters

  • count integer

    Number of results to return. Min 1, max 25. Defaults to 10 when omitted. Example: null

  • query string required

    Search query. Minimum 3 characters. Example: Jarvis

  • resource string enum required

    Resource to search. Example: customers

Headers

  • Accept string required

    Response format header. Example: application/json

Response

application/json
  • oneOf options 8 variants oneOf

    Exactly one option applies.

    + Show Child Attributes
    • option 1 object

      orders

      + Show Child Attributes
      • resource string
      • data[] object array
        + Show Child Attributes
        • order_id integer
        • customer_id integer
        • order_number string
        • order_name string
        • status string
        • order_created_at string
        • order_updated_at string
        • order_paid_at string
        • order_completed_at string
        • currency string
        • billing_address_first_name string
        • billing_address_last_name string
        • billing_address_company string
        • billing_address_phone string
        • billing_address_address_1 string
        • billing_address_address_2 string
        • billing_address_city string
        • billing_address_state string
        • billing_address_postcode string
        • billing_address_country string
        • billing_address_email string
        • shipping_address_first_name string
        • shipping_address_last_name string
        • shipping_address_company string
        • shipping_address_phone string
        • shipping_address_address_1 string
        • shipping_address_address_2 string
        • shipping_address_city string
        • shipping_address_state string
        • shipping_address_postcode string
        • shipping_address_country string
        • payment_method string
        • payment_method_title string
        • shipping_method_title string
        • customer_note string
        • created_via string
        • total integer
        • total_items integer
        • total_refunds integer
        • net number
        • net_original number
        • resource_link string
        • line_items[] object array
          + Show Child Attributes
          • line_item_id integer
          • name string
          • sku string
          • product_id integer
          • variation_id string nullable
          • quantity integer
          • tax_class string nullable
          • price integer
          • subtotal integer
          • subtotal_tax integer
          • total integer
          • total_tax integer
          • price_original integer
          • subtotal_original integer
          • subtotal_tax_original integer
          • total_original integer
          • total_tax_original integer
          • meta array
          • cogs integer
    • option 2 object

      customers

      + Show Child Attributes
      • resource string
      • data[] object array
        + Show Child Attributes
        • customer_id integer
        • full_name string
        • first_name string
        • last_name string
        • email string
        • customer_created_at string
        • customer_updated_at string
        • billing_address_first_name string
        • billing_address_last_name string
        • billing_address_company string
        • billing_address_address_1 string
        • billing_address_address_2 string
        • first_order_date string
        • last_order_date string
        • order_count integer
        • item_count integer
        • total_spent number
        • average_order number
        • subscription_count integer
        • billing_address_city string
        • billing_address_state string
        • billing_address_postcode string
        • billing_address_country string
        • billing_address_phone string
        • shipping_address_first_name string
        • shipping_address_last_name string
        • shipping_address_company string
        • shipping_address_address_1 string
        • shipping_address_address_2 string
        • shipping_address_city string
        • shipping_address_state string
        • shipping_address_postcode string
        • shipping_address_country string
        • shipping_address_phone string
        • role string
        • metorik_profile boolean
        • resource_link string
    • option 3 object

      subscriptions

      + Show Child Attributes
      • resource string
      • data[] object array
        + Show Child Attributes
        • subscription_id integer
        • status string
        • customer_id integer
        • billing_period string
        • billing_interval integer
        • start_date string
        • next_payment_date string
        • trial_end_date string nullable
        • end_date string nullable
        • cancelled_date string nullable
        • total integer
        • total_items integer
        • total_mrr integer
        • resource_link string
        • requires_manual_renewal boolean
        • payment_method string
        • payment_method_title string
    • option 4 object

      refunds

      + Show Child Attributes
      • resource string
      • data[] object array
        + Show Child Attributes
        • refund_id integer
        • order_id integer
        • refund_created_at string
        • reason string
        • amount number
        • amount_original number
        • line_items_total integer
        • shipping_total integer
        • total_tax number
        • resource_link string
        • currency string
        • refunded_by integer
        • refunded_by_email string
    • option 5 object

      products

      + Show Child Attributes
      • resource string
      • data[] object array
        + Show Child Attributes
        • product_id integer
        • title string
        • sku string
        • product_created_at string
        • product_updated_at string
        • resource_link string
        • type string
        • status string
        • stock_quantity integer
        • in_stock boolean
        • current_price integer
        • regular_price integer
        • sale_price integer
        • image string
    • option 6 object

      variations

      + Show Child Attributes
      • resource string
      • data[] object array
        + Show Child Attributes
        • variation_id integer
        • product_id integer
        • name string
        • sku string
        • atts[] object array
          + Show Child Attributes
          • name string
          • option string
        • variation_created_at string
        • variation_updated_at string
        • resource_link string
        • current_price integer
        • regular_price integer
        • sale_price integer
        • stock_quantity integer
        • in_stock boolean
        • product object
          + Show Child Attributes
          • product_id integer
          • title string
          • sku string
    • option 7 object

      categories

      + Show Child Attributes
      • resource string
      • data[] object array
        + Show Child Attributes
        • category_id integer
        • name string
        • parent_category_id string nullable
        • slug string
        • resource_link string
        • description string
        • products integer
        • net_items_sold integer
        • net_sales number
    • option 8 object

      coupons

      + Show Child Attributes
      • resource string
      • data[] object array
        + Show Child Attributes
        • coupon_id integer
        • code string
        • status string
        • coupon_created_at string
        • coupon_updated_at string
        • resource_link string
        • amount integer
        • discount_type string
        • date_expires string nullable
        • usage_count integer