Skip to main content

Get Current Buyer

GET 

/api/portal/me

Return the authenticated buyer and the customer account they order for. A buyer belongs to exactly one account, so there is nothing to switch between — ship-to is chosen from the account's address book at checkout. branding is the merchant's resolved, buyer-safe portal branding — the same object as Get Portal Branding (logo_url, mark_url, display_name, primary_color, nav_color, on_primary_color, on_nav_color, support_email, version), with SKU defaults filled in. landing_page is where the portal sends the buyer after sign-in: catalog or home. special_order_list.available says whether the merchant's Special order list is on (and non-empty), so the nav entry can show without another request. account.allow_backorder is the resolved answer for this account — the account's own override if it has one, otherwise the merchant's portal-wide default. An individual product can still differ; read availability.backorderable per catalog line.

Buyer portal token

Called by a B2B portal buyer with the bearer token POST /api/portal/auth/login returns (or the buyer's feed key) — not with a staff Personal Access Token.

view_as is null for the buyer's own session. During a merchant staff view it holds session_id, staff_user_id, staff_name, expires_at and can_view_margins (whether the staff user may see the staff-only margin overlay — a flag, never a cost) — the portal shows a read-only staff-view banner from it.

read_only is true when the buyer has the Viewer role. A Viewer can browse the catalog, prices, orders and invoices, but every write is refused with 403 and reason: "viewer_read_only" (see the collection overview). Use the flag to hide ordering, cart, list, quote, return, payment, address and feed-key actions up front.

account.ship_to_policy says where the buyer may ship: saved_only (saved addresses only), may_add_saved (new addresses are added to the address book) or may_ship_anywhere (also one-time addresses that are not saved unless checkout sends save_address: true).

account.dropship describes the account's dropship program. When it is off this is just {"enabled": false}. When on it carries what an order needs: display_name (the retailer name parcels ship under), intake_channels (how orders may be sent: portal, csv, api, edi, rep), fee_per_order and fee_per_unit, the shipping charge (shipping_charge_mode none/flat/rate_table/actual, shipping_flat_amount, shipping_free_over), default_shipping_method_id and allowed_shipping_method_ids, the ship-by commitment (sla_business_days after the sla_cutoff_time local cut-off), exempt_minimums, allow_international, retailer_manages_branding (whether the account's company admins may edit Dropship Branding) and feed_safety_stock (units held back per product in the dropship inventory feed).

During a staff "View as buyer" session, view_as is an object: session_id, staff_user_id, staff_name, expires_at (slides forward with activity), idle_minutes (the idle window, 60), ends_by (the hard cap the view can never be extended past) and can_view_margins. It is null on a buyer's own login.

branding is the brand of the store the buyer's account belongs to (or the default brand); branding.store_slug names that store.

Request​

Responses​

OK

Response Headers
    Content-Type