Statistics
Order statistics
Get order statistics
get/shops/{SHOP_ID}/analytics/sale
Request
- Base URLhttps://pos.pages.fm/api/v1
- URLhttps://pos.pages.fm/api/v1/shops/{SHOP_ID}/analytics/sale
- AuthAPI key in query parameter api_key
Path parameters
SHOP_IDinteger required
Example:4
Shop ID
Query parameters
sincestring date-time
Example:2024-01-01T00:00:00Z
Start date
untilstring date-time
Example:2024-12-31T23:59:59Z
End date
split_by[]string[]
Group statistics by one or more dimensions. Each value is a <Table>.<field> key.
- Time.hour / Time.day / Time.month / Time.year — by date bucket
- Order.source / Order.order_sources — by order source / account
- Order.status — by order status code
- Order.warehouse_id — by warehouse
- Order.post_id — by Facebook post
- Order.partner_id — by shipping carrier
- Order.marketplace_id — by e-commerce marketplace
- Order.country_code / Order.province_id / Order.district_id / Order.commune_id / Order.region_filter — by shipping geography
- Order.tag — by order tag
- Order.is_wholesale / Order.is_livestream — wholesale / livestream flag
- Order.livestream_manager_ids — by livestream manager
- Order.total_price — by order total price bucket
- Order.ads_or_normal / Order.ad_account_id / Order.ad_id — ad partitioning
- User.id / User.sale_group / User.department_id — by staff / sale group / department
- Customer.id / Customer.level_id / Customer.new — by customer / level / new vs. old
- Variation.id / Variation.product_id — by variation / product
- Variation.category / Variation.supplier / Variation.brand_id / Variation.tag — by product taxonomy
- Variation.price_range / Variation.quantity_range — by product price/quantity bucket
- Variation.upsale / Variation.quantity — upsell flag / sold quantity
- UTM.p_utm_source / UTM.p_utm_campaign / UTM.p_utm_medium / UTM.p_utm_term / UTM.p_utm_content — by UTM tag
- Promotion.default / Promotion.advance / Promotion.combo — by promotion / combo
- Ads.ad_id / Ads.ad_set_id / Ads.ad_campaign_id — by ad / ad set / campaign
[ "Time.day" ]
filterobject
Filter applied to the order set. Object keyed by <Table>.<field>; each value is an array of strings. Append _exclude to a key to negate it (e.g. Order.status_exclude, Variation.category_exclude). Append _and to AND-combine multi-valued list filters (e.g. Variation.tags_and). Common keys:
- Variation.id / Variation.product_id — by variation / product
- Variation.category / Variation.supplier / Variation.brand_id / Variation.brand — by product taxonomy
- Variation.tag / Variation.tags / Variation.attribute — by product tag / attribute
- Variation.price_range / Variation.quantity_range / Variation.quantity — by product price/quantity
- Variation.upsale / Variation.one_time_product / Variation.is_bonus_product / Variation.product_price_of_zero / Variation.unlink_ecommerce — flag filters
- Order.source / Order.source_exclude / Order.order_sources — order source
- Order.status — order status code
- Order.warehouse_id / Order.post_id / Order.partner_id / Order.shop_partner_id / Order.marketplace_id — operational filters
- Order.country_code / Order.province_id / Order.district_id / Order.commune_id / Order.region_filter / Order.region_filter_phil — shipping geography
- Order.tag / Order.is_wholesale / Order.is_livestream / Order.received_at_shop / Order.is_upsale_order — order flags
- Order.total_price / Order.revenue — by total/revenue bucket
- Order.ad_id / Order.ads_source / Order.ad_account_id / Order.ads_or_normal — ads filters
- Order.order_currency — order currency
- Order.id / Order.project — by order id / project
- Order.p_utm_source / Order.p_utm_campaign / Order.p_utm_medium / Order.p_utm_term / Order.p_utm_content / Order.utm_affiliate / Order.link — UTM filters
- Order.instant / Order.N24H / Order.GSGN — service partner filters
- Order.livestream_manager_id / Order.livestream_manager_ids — livestream manager
- User.id / User.sale_group / User.department_id / User.pke_mkter / User.assigning_seller_id / User.assigning_care_id / User.item_assign_seller_id — staff filters
- Customer.id / Customer.level_id / Customer.gender / Customer.tag / Customer.conversation_tags / Customer.new / Customer.referral_code — customer filters
- Promotion.default / Promotion.advance / Promotion.id / Promotion.combo — promotion filters
{
"Variation.product_id": [
"4a6fc152-5989-4202-83d4-a11a2ab28078"
],
"Order.status": [
"3"
]
}success_statusstring
Example:send_to_partner
Success status
success_recordstring
Example:inserted_at
Success record
user_typestring
Example:create
User type
returned_recordstring
Example:inserted_at
Returned record
select_fields[]string[]
Select fields
[ "cod", "price", "order_count" ]
Response
Success
Changes
No recorded changes to this operation across all 15 revisions of this API.