Let me provide a comprehensive solution for REST API invoice creation with tax calculation in Oracle Fusion Cloud 23B.
Understanding Tax Regime Code Mapping:
The REST API uses internal tax regime codes that differ from UI display names. To find the correct codes:
- Navigate to Setup and Maintenance > Tax Configuration
- Search for your tax regime (e.g., US Sales Tax)
- Note the exact value in ‘Tax Regime Code’ field
- Common pattern: UI shows ‘US Sales Tax’, code is ‘US_SALES_TAX’ (underscore, not hyphen)
REST API Payload Validation Requirements:
The API requires more explicit tax information than the UI:
{
"InvoiceNumber": "INV-2024-001",
"InvoiceAmount": 5000.00,
"Supplier": "ACME-CORP",
"SupplierSite": "ACME-MAIN",
"Lines": [
{
"LineNumber": 1,
"LineAmount": 5000.00,
"TaxClassificationCode": "TAXABLE_GOODS",
"ShipToLocationId": 300000123456789
}
]
}
Critical Tax Configuration Elements:
Tax Regime Code Mapping:
Query the correct codes using this approach:
- Use Setup and Maintenance work area
- Search: ‘Manage Tax Regimes’
- Export regime codes to CSV for reference
- Common format: Country code + tax type (e.g., ‘US_SALES_TAX’, ‘CA_GST_HST’)
Tax Classification at Line Level:
Tax must be specified per invoice line, not at header:
- Include ‘TaxClassificationCode’ in each line object
- Use codes from ‘Manage Tax Classifications’ setup
- Match classification to your item categories
- Examples: ‘TAXABLE_GOODS’, ‘EXEMPT_SERVICES’, ‘ZERO_RATED’
Party Tax Profile Resolution:
The API derives tax profile from supplier site configuration:
- Ensure supplier site has tax organization type assigned
- Verify tax registration numbers are configured
- API automatically uses site’s default tax profile
- No need to explicitly pass party tax profile ID in most cases
External System Integration Best Practices:
Pre-Validation Query:
Before submitting invoices, query tax setup:
GET /fscmRestApi/resources/11.13.18.05/taxRegimes
Cache valid regime codes in your external system
Payload Structure:
- Always include ShipToLocationId at line level
- Omit TaxRegimeCode from header (let API derive from supplier site)
- Include TaxClassificationCode at line level
- Specify currency code explicitly
Error Handling:
Common validation errors and fixes:
- ‘Invalid tax regime’: Use underscore format (US_SALES_TAX)
- ‘Tax classification not found’: Verify code is active and not end-dated
- ‘Missing tax jurisdiction’: Ensure ship-to location has valid address
Testing Approach:
- Create one invoice manually in UI with tax
- Query that invoice via REST API GET endpoint
- Examine the returned JSON structure for tax fields
- Use that structure as template for your POST payloads
- Start with simple single-line invoices before complex multi-line
Role and Security:
Verify your integration user has:
- ‘Payables Invoice Entry’ duty role
- ‘Tax Configuration Manager’ role for tax data access
- Access to all required business units and legal entities
The key to successful tax calculation via REST API is understanding that the API requires explicit line-level tax classification and uses internal code formats. Unlike the UI which provides dropdowns and auto-derivation, the REST API expects your external system to provide complete tax context in the payload structure.
This draft is based on general Oracle Fusion Cloud knowledge. It has not been verified against your specific version and environment. Practitioners: verify the steps and share your experience below.