DEVELOPER DOCUMENTATION

WeProfit developer API reference

The WeProfit API exposes permitted store data for your own reports and integrations. Start by listing stores, then request the order, event or profit data for the store you need.

Authentication and the first request

The API base URL is https://api.weprofit.com/v1/dev. Create a personal access token in the Developer page’s API tokens card. Send it in the Authorization header as a Bearer token. Keep the token in your server environment, not storefront JavaScript or a public repository.

The token follows its owner’s store permissions. Staff need developer access and the relevant analytics or events permission. Revoked or expired tokens are rejected.

List accessible stores. Set WEPROFIT_API_TOKEN privately in your environment.
curl https://api.weprofit.com/v1/dev/stores \
  -H "Authorization: Bearer $WEPROFIT_API_TOKEN"

Choose a store from the response

Use an ID returned by the stores endpoint for subsequent requests. The following values are illustrative and contain no customer data.

Illustrative GET /stores response
{
  "items": [{
    "id": "STORE_ID",
    "name": "Example store",
    "platform": "shopify",
    "currency": "USD",
    "timezone": "America/New_York",
    "role": "owner"
  }]
}

Reporting endpoints

All paths below are relative to the API base and require bearer authentication. Replace :storeId with an accessible active store ID. The table covers reporting reads. The REST API also supports ad-spend updates and webhook subscription management; it is not an entirely read-only API.

WeProfit reporting API endpoints
Method and pathPurposeOptional query parameters
GET /meUser identity and non-secret token metadataNone
GET /storesAccessible active stores and their IDsNone
GET /stores/:storeId/summaryVisitors, sessions, purchases, revenue, coverage and profit summaryfrom, to
GET /stores/:storeId/ordersOrders, attribution and per-network delivery statusfrom, to, limit, cursor and order filters
GET /stores/:storeId/eventsNormalized events, source, channel, consent state and valuefrom, to, limit, cursor and event filters
GET /stores/:storeId/profitRevenue, refunds, product costs, fees, shipping, spend and net profitfrom, to
GET /stores/:storeId/profit/timeseriesDaily profit and cost seriesfrom, to
GET /stores/:storeId/profit/ad-spendSpend by day, network and campaignmonth, formatted YYYY-MM

Dates, filters and pagination

Provide from and to as inclusive UTC dates in YYYY-MM-DD format. If omitted, the reporting range defaults to today and the preceding six days. Set both dates explicitly for repeatable comparisons. The ad-spend endpoint instead uses month and defaults to the current UTC month.

Order and event lists default to 50 rows and accept up to 200. Results are newest first. Pass the returned nextCursor unchanged to fetch another page. Data can change during pagination, so this does not provide a frozen snapshot.

  • Order filters include order_id, status, financial_status, tracked, link_method, link_confidence, channel, currency, min_total, max_total and sent_to.
  • Event filters include event_name, event_id, source, channel, country, url_contains, consent_state, currency, min_value and max_value.
  • Both lists support visitor_id and session_id. Event filters also support checkout_token and cart_token.
Request a bounded profit period with an illustrative store ID
curl "https://api.weprofit.com/v1/dev/stores/STORE_ID/profit?from=2026-09-01&to=2026-09-07" \
  -H "Authorization: Bearer $WEPROFIT_API_TOKEN"

Read several stores in one request

GET /summary, /orders, /events, /profit and /profit/timeseries accept a required stores query containing up to 50 comma-separated store IDs. Supply the same date and filter options as the corresponding single-store request.

Batch responses contain results with independent success or error entries for each store. A denied store does not invalidate the others. Summary, order and event successes place their payload under data; profit successes expose their profit fields alongside storeId and ok. Each store’s order or event result has its own nextCursor.

Interpret profit fields correctly

Profit reports use recorded and estimated cost inputs. Cancelled orders are excluded from the profit calculation and reported separately. The margin is null when net revenue is zero.

Timeseries returns days with order or ad-spend activity, not a zero-filled calendar. Its netProfit includes refunds even though each timeseries item does not expose a separate refunds field. Use the aggregate profit endpoint when you need the explicit refund total.

Rate limits and common errors

Current limits are 240 requests per minute and 20,000 requests per day per token. Reduce request frequency and use bounded retries when rate limited. Avoid retrying invalid credentials or permissions without correcting the cause.

API error handling
HTTP statusMeaningNext action
400 validation_errorInvalid dates, filters or other query inputCorrect the request parameters.
401 unauthorizedMissing, revoked or expired tokenUse an active token and the Bearer header.
402 plan_requiredThe store does not have the required billing entitlementReview store billing and any over-cap restriction.
403 forbiddenInsufficient permissionAsk the owner to review the token user’s access.
404 store_not_foundStore unavailable to this requestUse an accessible active ID from GET /stores.
429 rate_limitedToken request limit reachedBack off and reduce request volume.

Give your ads better conversion data.

All 10 networks included. Plans from $19/month per store.

Start your 14-day free trial