Billion Integration
Overview
Billion is our marketplace syndication subsystem for publishing vehicles, managing availability and prices, and ingesting reservations placed on the marketplace into Power‑Rent.
- Vehicle sync: own and static vehicles
- Companies/brands/models/locations sync
- Orders ingest + status updates
- Terms and legal documents for marketplace (Terms of Use, Rental Agreement, Consent)
- Moderation and publish flows for SEO-ready pages
Data model and schema
- SDL:
server/graphql/schema/billion.graphql - Core entities:
BillionCompany,BillionBrand,BillionModel,BillionCity,BillionCountry,BillionVehicle,BillionOrder - Queries (selection):
billionCompanies,billionCompanyById,billionDashboardbillionVehicles,billionStaticVehicles,billionVehicle(id),billionVehicleSearchbillionOrders,billionVehicleOrders- Terms and legal:
billionTermsOfUse,billionRentalAgreement,billionConsentForPersonalData
- Mutations (selection):
- Admin/catalog:
createBillionBrand/City/Country,updateBillionBrand/City/Country,deleteBillion* - Static vehicles lifecycle:
createStaticVehicle,updateStaticVehicle,publishBillionStaticVehicle,updateBillionVehicleStaticSlug - Status/moderation:
updateVehicleBillionStatus,setBillionDisableStatus,disableBillionVehicle - Integration switches:
turnOnBillionIngration,turnOffBillionIntegration - Content & configs:
saveConfigurations,saveCommissions,updateBillionTermsOfUse,updateBillionRentalAgreement,updateBillionConsentForPersonalData
- Admin/catalog:
See full list in schema/schema.gql under the Billion* types and mutations.
Public APIs (marketplace endpoints)
- Inventory feed:
pages/api/public/get-available-vehicles.js - Vehicle details:
pages/api/public/get-vehicle-by-id.js - Prices/availability:
pages/api/public/get-prices-by-interval.js - Order intake:
pages/api/public/post-order.jspages/api/public/create-order-from-billion.js
- Helpers:
- Delivery price calculators:
pages/api/public/calculate-delivery-price-for-billion.js,pages/api/public/calculate-delivery-price-for-multiple-vehicles.js
- Delivery price calculators:
GraphQL resolvers
- Integration actions:
server/graphql/resolvers/mutation/Billion/integrationActions/** - Vehicles:
server/graphql/resolvers/mutation/Billion/VehicleStatic/*andupdateBillionVehicle.resolver.js - Orders:
server/graphql/resolvers/mutation/Billion/OrderView/*, hooks underserver/graphql/resolvers/mutation/Billion/BillionHooks/* - Queries:
server/graphql/resolvers/query/Billion/**
Admin/UI
- Pages under
/billion/*:- Vehicles:
pages/billion/vehicles,pages/billion/vehicles/[billionVehicleId] - Static vehicles:
pages/billion/vehicles-static,pages/billion/vehicles-static/[billionVehicleStaticId] - Companies, brands, models, cities, countries
- Orders:
pages/billion/order/[id]
- Vehicles:
- Settings UI:
components/pages/Settings/Integrations/Billion/*(enable/disable, locations, delivery price ratios)- Vehicle forms:
components/pages/AddVehicle/**/BillionData/*
Ingestion and order flow
- Marketplace fetches inventory and prices via public endpoints
- Order is placed →
post-order.js/create-order-from-billion.jsmap payload →createOrder - Price reconciliation via calculators and
UpdateOrder...resolvers - Status updates propagate via hooks (
BillionHooks/*) and revalidate caches/pages
Moderation and SEO
- Static vehicle flows allow pre-publishing and moderation:
VehicleStatic/* - Slug editors and localized content for SEO:
VehicleBillionSlugEditor.js,VehicleBillionLocalizedTitle.js,VehicleBillionDescription.js
Legal documents (PDF content)
- Queries for marketplace-specific documents:
billionTermsOfUse,billionRentalAgreement,billionConsentForPersonalData - See feature docs:
[PDF & Documents](../pdf-and-documents.md)
Ops / Flags
- Feature flags and environment switches used in resolvers: see
constants/features.jsandserver/graphql/helpers/getFeatureFlags.js
Testing
- Resolver tests:
_tests_/billionVehiclesSearch.resolver.test.js,_tests_/billionVehicleLink.resolver.test.js - Integration library tests:
turnOnBillionIntegration-lib.test.js
How to use (quick start)
- Turn on integration in Settings → Integrations → Billion
- Publish static/own vehicles and verify data completeness
- Confirm public endpoints return your inventory and pricing
- Place a test order via marketplace → verify order appears under
/billion/order/[id]
File index (quick reference)
- SDL:
server/graphql/schema/billion.graphql - Public endpoints:
pages/api/public/*billion*,pages/api/public/post-order.js - Resolvers:
server/graphql/resolvers/**/Billion/**,server/graphql/resolvers/query/Billion/** - UI:
pages/billion/**,components/pages/Settings/Integrations/Billion/*
Related
- Architectural overview:
docs/development/project-description/17-billion-integration.md - See also:
Widget,Site Constructor,Feature Flags