Services and API endpoints
~140 @Injectable services. Grouped by base URL below; endpoint paths are relative to
that base. Base-URL values per environment:
environment configuration keys. Conventions:
HTTP layer and services.
All requests carry X-Session-Token via AuthInterceptor. Additional headers are
noted where they exist.
internalApiUrl — the primary API
Suppliers
suppliers/services/supplier.service.ts (SupplierService, + mock)
| Endpoint | Purpose |
|---|---|
|
List/search ( |
|
Supplier details. |
|
Save details. |
|
Supplier auth token (login-as-supplier). |
|
Account-health snapshot. |
|
One advance. |
|
Statements for a fund-recovery entry. |
|
Run a report ( |
Also exposes getSupplierBalance, saveItemPart (partial update), and the constants
SEARCH_DEBOUNCE_TIME = 800, supplierKeyColumnName = 'supplier_key',
supplierDepositTransactionColName = 'supplier_deposit_transactions'.
Supplier lifecycle
| Service | Endpoints |
|---|---|
|
|
|
|
|
|
|
|
|
No HTTP — status→badge-class dictionaries. |
Payments and accounts
| Service | Endpoints |
|---|---|
|
|
|
|
|
|
|
Payment history for a config. |
|
Plaid-derived bank information. |
Fees, funding and contracts
| Service | Endpoints |
|---|---|
|
|
|
Supplier funding record. |
|
|
|
|
|
|
|
|
|
|
Advances
supplier-advances/service/supplier-advances.service.ts — mostly under
supplier_instant_advance/:
POST supplier_instant_advance/:key/create_request
GET supplier_instant_advance/:key/{active_advance,advance_liability,advance_request}
GET supplier_instant_advance/:key/{ml_offer,ml_offer_details,re_offer_eligibility,requests_history}
GET supplier_instant_advance/offer_details
POST supplier_instant_advance/:key/re_offer
POST supplier_instant_advance/{update_uw_request,update_offer_request}
POST supplier_instant_advance/:key/manually_update_request_uw_data/:advanceOfferRequestKey
GET supplier_instant_advance/:key/advance_line_history
GET supplier_instant_advance/advance_line/{:key/last,:advanceLineKey}
POST supplier_instant_advance/:proposedAdvanceLineKey/retract
GET suppliers/:key/supplier_advances
GET suppliers/:key/advance_line/:advanceLineKey/uw_history
PATCH suppliers/:key/advance_line/:advanceLineKey/update
Underwriting and compliance
| Service | Endpoints |
|---|---|
|
|
|
|
|
Compliance action records. |
|
Background reports (requires |
|
Underwriting documents. |
|
Initial-underwriting persistence. |
Onboarding
| Service | Endpoints |
|---|---|
|
|
|
Document verification. |
|
The services/product matrix. |
|
Onboarding templates. |
|
Additional owners. |
|
Supplier 2FA (flag |
Cards
| Service | Endpoints |
|---|---|
|
|
|
|
|
|
|
|
|
|
Marketplaces
| Service | Endpoints |
|---|---|
|
|
|
|
|
|
|
Amazon-lending loans. |
Processes and approval
| Service | Endpoints |
|---|---|
|
|
|
|
|
|
|
|
Reports
| Service | Endpoints |
|---|---|
|
|
|
|
Users, permissions, lookups
| Service | Endpoints |
|---|---|
|
|
|
|
|
|
Other internalApiUrl consumers
supplier-email-preferences.service.ts
(GET/PUT suppliers/:key/email_preference),
supplier-referral.service.ts (uses supplierReferralUrl for the link base),
shared/pyb-documents/pyb-documents.service.ts (also pybDocumentsApiUrl),
crm-tools/services/action-tab-calculator.service.ts,
crm-tools/services/emails.service.ts (also messagingUrl),
shared/search-overlay/search-engine-service-3-0/search-engine.service.ts
(GET suppliers?search3=…),
manage/batch-imports/service/batch-imports.service.ts,
shared/layout/app-stage-info/app-stage-info.component.ts.
cliApiUrl
| Service | Endpoints |
|---|---|
|
CLI operations. |
|
CLI action runner. |
|
|
|
Holds a |
actionsToolsUrl — CRM and settings
| Service | Endpoints |
|---|---|
|
|
|
|
|
|
|
Comment CRUD. |
|
|
|
|
|
Calls this base directly from a component — the only such case. |
eventLoggerUrl
| Service | Endpoints |
|---|---|
|
|
|
|
eventRulesOldUrl
manage/event-rules/events.service.ts (+ events-mock.service.ts.ts, sic):
POST event_rules/
GET event_rules/ GET event_rules/:uuid/
PUT event_rules/:uuid/ DELETE event_rules/:uuid/
GET event_rules/history/?limit&order_by&q[&last]
(es) Elasticsearch client against `<base>es`, index `em_events`
Header X-InstanceId: '8001' (hardcoded literal). Imports environment
directly.
messagingUrl
| Service | Endpoints |
|---|---|
|
|
|
Email-related reads. |
|
SMS sending. Also uses |
authToolsApiUrl
suppliers/services/supplier-auth-token.service.ts — supplier auth tokens;
…/smsnumbers/sms-numbers-provider.service.ts — SMS number provisioning.
workflowApiUrl (+ workflowGciId)
suppliers/services/workflow/b2b-workflow.service.ts:
SSE tasksMonitoring
GET getLastExecution?gci=<gci>[&name=…]
GET getListOfActivities?id=<encoded>&gci=<gci>
POST executeWorkflow?gci=<gci> Content-Type: application/x-www-form-urlencoded
Plus downloadFile / downloadPdfFile (blob via file-saver). See
real-time streams.
automaticMarketplaceApiUrl
supplier-underwriting/supplier-underwriting.service.ts and
…/real-time-validation/real-time-validator.service.ts (+ mock).
marketplaceApiUrl
suppliers/services/supplier-marketplaces.service.ts —
POST /platforms/:marketplaceKey/update_sales_data (note the double slash from the
leading /).
Document backends
| Base URL | Service | Notes |
|---|---|---|
|
|
B2B documents. |
|
|
Behind the |
|
|
Deposit-account documents. |
|
Configured; used by file-download paths. |
— |
— |
|
Routes between backends based on |
evaApiUrl, supplierUrl, supplierReferralUrl
Not HTTP APIs from this app’s perspective:
-
shared/eva/eva.service.ts— builds the iframe URL and thePYBEvaTokencookie. -
suppliers/services/login-as-supplier/login-as-supplier.service.ts— navigates to the supplier site. -
suppliers/services/supplier-referral.service.ts— builds referral links.
Services with no HTTP
SupplierStatusesService (badge dictionaries), MessageService (canned messages),
TableEventsService (bus), CancelEmitService (bus),
CardFormgroupMessageService, CsvExportService, DialogService,
ErrorParserService, ErrorVisualizationService, Logger,
LayoutService, PeriodsCalculationsService,
ProductMatrixInitializeTablesService, EmailsStatusService,
RulesUtilsService, AgGreedDataReshaperService,
DataTableAgGridHeaderTemplateRendererService,
HeadersWithSummedValuesSettingService, FilteringPanelService,
DynamicFormControlService, ElasticHighlightsService,
ResizeIframeService, CommunicationService, EvaCommunicationService,
FeatureFlagsService / -Admin / -Eva, HttpCacheLocalStorage,
DynamicEmbedderService, GameService (Tetris),
ActionTabCalculatorService (HTTP), CookieService, SseService.
Response envelopes
| Shape | Where |
|---|---|
Bare array/object |
Internal API lookups. |
|
Internal API list endpoints — |
|
Actions Tools, event rules, global settings. |
Elasticsearch hits |
|
Conventions and hazards
| Item | Detail |
|---|---|
Base URLs |
Always from |
Hardcoded credential |
|
|
|
|
|
Global serialisation casing |
|
Double slashes |
|
Singular |
Delete-account and gateway endpoints, where every neighbour is |
Service-level toasts |
|