Welcome to the GOAL REST API Reference. This documentation covers all RESTful services, contracts, schemas, and workflows implemented across the GOAL backend ecosystem (Lumen 11 / PHP 8.2).
All endpoints adhere to common architectural standards for security, tenancy, serialization, and error recovery:
x-app-stage, x-app-uid), standard ActionResult envelope, ID vs UUID resolution, and status flags (A, I, D).| Module | Documentation Link | Scope & Highlights |
|---|---|---|
| Sales & Commercial Orders | Sales & Orders API | B2B orders, order lines, promotion applications, order lifecycle (confirm, approve, cancel), and discounts. |
| Route Workload & Rebalance Scenarios | Customer Route Workload & MCP API | L4 route workload balance, portfolio/seller weekly load, draft-only territory polygons, and rebalance scenario approval workflow. |
| Pre-Sale & Mobile Orders | Pre-Sale & Mobile Orders API | Field SFA sync, offline bulk order ingestion, visit execution, live supervisor tracking, and KPI widgets. |
| Purchasing & Procurement | Purchasing & Supplier Master API | Supplier master data (/purchase/master/suppliers), role classifications, gallery media, supplier products, brands, categories, and SAP B1 purchase invoices. |
| Financial & Accounting | Financial & Accounting API | General Ledger (GL) journal entries, SAP B1 OJDT/JDT1 posting, double-entry validation, drafts, and CSV batch imports. |
| Inventory & Warehouses | Inventory & Warehouses API | Multi-warehouse stock balances, SKU product catalog, goods movements, transfers, and price lists. |
| WMS / WHMS (Warehouse Management) | WMS / WHMS API | Zones, locations, barcodes, LPNs, receipts, putaway, waves, picking, double verification, stowage assets (OPE-ALM-FOR-003), and non-dispatched (OPE-ALM-FOR-004). |
| WMS Inventory Counts & Audit | WMS Inventory Counts API | Physical inventory audit (OPE-ALM-PRO-003), 5 selection modes, mobile counting/recounting, UoM/barcode/dimensions enrichment, line reconciliation, immutable logs, and OPE-ALM-FOR-005/006/007. |
| Delivery & Dispatch Planning | Delivery Planning API | Delivery zones, delivery windows v2, child routes, customer visit schedules, and dispatch sheets (HRep). |
| Third-Party Integrations | Integrations API | SAP Business One (SB1), BEES B2B, SUNAT SIRE (RVIE/RCE), and GPrint desktop bridge. |
| Telemetry & GPS Tracking | Telemetry API | Device tracking, batch coordinate ingestion, offline buffering, TimescaleDB hypertable, and road-snapping. |
| Real-Time Events & Notifications | Notifications & Events API | Soketi WebSockets, real-time alert broadcasts, acknowledgement receipts, and outgoing webhooks. |
/v1/purchase)The Purchasing & Supplier Master Module provides dedicated REST APIs for vendor master records, commercial roles, supplier product catalogs, and SAP Business One purchase invoices:
| Domain / Portal | Documentation Link | Scope & Highlights |
|---|---|---|
| Supplier Master Data | Purchasing & Supplier Master API | Complete supplier CRUD (/purchase/master/suppliers), dual ID/UUID resolution, search, sort, soft-delete, and restore. |
| Supplier Role Matrix | Purchasing & Supplier Master API | Fine-grained roles (is_goods_supplier, is_service_supplier, is_distributor, is_wholesaler, is_manufacturer, etc.). |
| Catalog & Media Affiliations | Purchasing & Supplier Master API | Supplied SKU inventory list (/products), distinct brands (/brands), categories (/categories), and logo/gallery management (/upload-image). |
| SAP B1 Purchase Invoices | Purchasing & Supplier Master API | Real-time SAP Business One purchase invoices (OPCH/PCH1) lookup by supplier CardCode. |
/v1/financial)The Financial & Accounting Module provides dedicated REST APIs for General Ledger vouchers, journal entry drafts, and ERP queue ingestion:
| Domain / Portal | Documentation Link | Scope & Highlights |
|---|---|---|
| Journal Entries (OJDT / JDT1) | Financial & Accounting API | Direct SAP B1 entries viewer (/journals/{id}), multi-entry CSV file import (/journals/import), and reversal cancellation (/journals/{id}/cancel). |
| Journal Entry Drafts | Financial & Accounting API | Staged accounting vouchers CRUD (/journal-entry-drafts), multi-currency lines, cost-center assignments (profit_code), and balance audit. |
| Batch Ingestion & Enqueueing | Financial & Accounting API | Bulk drafts ingestion (/journal-entry-import/bulk) and confirmation dispatch (/journal-entry-import/confirm/{id}) via LegacyJournalImportJob. |
/v1/sales)The Sales & Commercial Orders Module provides dedicated REST APIs for commercial orders, master force automation, leads, invoices, and store operations:
| Entity / Domain | Documentation Link | Scope & Highlights |
|---|---|---|
| Orders & Lines | Sales & Orders API | B2B orders lifecycle, order lines, promotion applications, transitions (confirm, approve, cancel), and discounts. |
| GOAL Orders v1 & Statuses | GOAL Orders v1 & Order Statuses API | Native GOAL orders (/v1/sales/orders), UUID resolution, Operations Dashboard, GBoni recalculation (R12/R13), bulk actions, and /v1/sales/master/order-statuses. |
| Sales Master Data | Sales Master Data API | 22 sub-routes: Territories & GIS polygons, Sales Teams, Zones, Portfolios, Sellers, Routes, Delivery Zones, Catalog rules, and Channels. |
| Sales Master Data | Sales Team Group Product Measures API | Per-group sellable product presentations (for_sale, mobile_app, web_app) and sync. |
| Sales Master Data | Sales Team Customers Management API | Geolocation level-4 territory & portfolio auto-assignment, hierarchical commercial config, weekly 7-day visits, and immutable audit logs. |
| Draft Customers & Leads | Draft Customers API | Prospect customer intake, pre-flight data validation, route placement, and supervisor approval workflow. |
| Store Operations | Sales Store API | Storefront catalog browsing, SKU stock availability, and selling business units. |
| Invoices & Billing | Invoices & Billing API | Official invoice lifecycle, cancellation/reversal, and high-volume CSV batch SAP ingestion. |
/v1/pre-sale)The Pre-Sale & Mobile Orders Module provides dedicated REST APIs for mobile devices, offline synchronization, live routing, and performance analysis:
| Domain / Portal | Documentation Link | Scope & Highlights |
|---|---|---|
| Mobile SFA Sync & Orders | Pre-Sale & Mobile Orders API | Offline master data hydration (/master-data), bulk orders upload (orders-bulk), no-sale visits (nosales-bulk), and presale order management. |
| Live Monitoring & Customers | Pre-Sale Monitoring & Customers API | Supervisor field tracking (/monitoring/sellers, /polygons, /customer-locations), on-site GPS updates, and customer credit queries. |
| Statistics Widgets & Reports | Pre-Sale Statistics & Reports API | Real-time executive KPI widgets (status, zone, pending billing, retained), seller daily/monthly reports, and active promotions. |
The Inventory & Supply Chain Module provides individual REST APIs for all warehouse, product master, pricing, movement, catalog, and taxonomy entities:
| Entity | Documentation Link | Scope & Highlights |
|---|---|---|
| Products & Resources | Products API | Full SKU catalog lifecycle, picker search, stock balances, recent costs, price renewal, barcode packaging, and /product-resources/* lookups. |
| Warehouses & Depots | Warehouses API | Physical warehouse CRUD, stock balances (/{id}/stock), incoming purchase orders, SAP B1 OWHS sync, and map upload. |
| Price Lists & Tiers | Price Lists API | Commercial price lists, customer tiers, line items (/{id}/lines), bulk renewals, and SAP B1 OPLN/ITM1 synchronization. |
| Stock Transactions | Transactions API | Inter-warehouse stock transfers (stock-transfers), dispatch validation, and adjustments/entries/exits (goods-movements). |
| Brands Master | Brands API | Commercial brands catalog, SVG/PNG logo upload, soft-deletion, and restore lifecycle. |
| Commercial Lines | Lines API | Commercial product lines (product_lines) for reporting and ERP grouping. |
| Product Categories | Categories API | Hierarchical category trees (product_categories), parent-child nesting, subcategories, and gallery image codes. |
| Store Classifications | Classifications API | E-commerce and B2B store navigation categories (product_clasifications), hierarchical classifications, and autocomplete search. |
| Dynamic Attributes | Attributes API | Extensible product attributes (product_attributes), attribute groups, and presentation measures for technical specifications. |
| Unit Measures & KPIs | Unit Measures API | Physical units (unit_measures), KPI volumetric conversion ratios (HL hectoliters), and product packaging rows. |
| Tax stack (SAP) | Inventory tax stack API | Mirror OVTG/OSTA/OSTC, product sale/purchase tax codes, SAP pull/push. |
| Accounting Groups | Accounting Groups API | SAP Business One Item Groups (OITB), General Ledger account mappings for inventory valuation, COGS, variance, and revenues. |
| Product Catalogs | Product Catalogs API | Dynamic rule-based catalog engine, inclusion/exclusion filter expressions, materialized lines compilation, and cross-channel distribution. |
/v1/base)The Base Module provides individual REST APIs for all organizational master data and business partner entities:
| Entity | Documentation Link | Scope |
|---|---|---|
| Business Partners | Business Partners API | Customer/Supplier/Employee roles, credit lines, sales team links, and SAP B1 sync. |
| Temporary Partners | Temporary Business Partners API | Provisional clients, field leads, fast on-boarding, mass import, and recovery. |
| Addresses | Business Partner Addresses API | Delivery drop-off points, GPS coordinates, reverse-geocoding Ubigeo fix, and SAP sync. |
| Resources & Lookups | Business Partner Resources API | Live SUNAT RUC query, RENIEC DNI, tax ID types, and geographic directories. |
| Contacts | Business Partner Contacts API | Legal representatives, purchasing managers, billing directors, phone/email lists. |
| Groups | Business Partner Groups API | Commercial groups (SAP OCRG), segmentation tiers, and channel pricing. |
| Divisions | Divisions Master API | Business units, product categories, configuration schemas, and brand images. |
| Branches | Branches Master API | Regional distribution centers (CDs), warehouses, SAP zones, and receipt series. |
| Companies | Companies Master API | Holding entities, subsidiaries, corporate hierarchies, and logo branding. |
| Payment Terms | Payment Terms Master API | Commercial maturities, credit days, discount conditions, and SAP OCTG terms. |
| Payment Term Groups | Payment Term Groups API | Macro cash vs credit condition groups and autocomplete search. |
| Receipt Types | Receipt Types API | SUNAT official vouchers (01 Factura, 03 Boleta, 07 NC, 09 Guía) and series trees. |
| Common Resources | Common Resources API | Global cached lookup dictionaries: price lists, fleet vehicles, sellers, zones. |
| Global Incidences | Global Incidences API | Polymorphic audit trail, incident observations, discrepancies, and notes. |