SAP API Business Hub Request Generator
The SAP API Business Hub lets you try released S/4HANA APIs against a sandbox before you touch a real tenant. This generator builds the matching cURL and HTTP requests so you can test calls, check payloads and copy the pattern into your own client.
Fill in
cURL
curl -X GET "https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner?$top=5&$select=BusinessPartner,BusinessPartnerFullName,BusinessPartnerCategory&$filter=BusinessPartnerCategory%20eq%20%272%27&$format=json" \ -H "APIKey: YOUR_API_KEY" \ -H "Accept: application/json"
Raw HTTP
GET /s4hanacloud/sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner?$top=5&$select=BusinessPartner,BusinessPartnerFullName,BusinessPartnerCategory&$filter=BusinessPartnerCategory%20eq%20%272%27&$format=json HTTP/1.1 Host: sandbox.api.sap.com APIKey: YOUR_API_KEY Accept: application/json
Metadata call
curl -X GET "https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_BUSINESS_PARTNER/$metadata" \ -H "APIKey: YOUR_API_KEY" \ -H "Accept: application/xml"
Tenant call (replace APIKey with the tenant authentication)
curl -X GET "https://sandbox.api.sap.com/sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner?$top=5" \ -H "Authorization: Bearer <access token>" \ -H "Accept: application/json"
The sandbox on SAP Business Accelerator Hub uses an APIKey header with your personal key from the API page, and returns sample data only. A real S/4HANA Cloud tenant uses its own host and OAuth or basic authentication through a communication arrangement, not the API key. Package paths and API names change, so confirm on the API reference page before you code.
Need help with SAP API integration?
Ask for a short conversation on connecting your SAP APIs to a private AI assistant with read-only access.
Optional. The tool and every export work without this. No spam.
How to use the generator
Pick the sandbox host to try an API with your key, or a tenant host for a real call. Enter the service path and entity set from the API reference page, add the query options and copy the cURL or HTTP block. Run it in a terminal or import it into a REST client to see the JSON response.
Sandbox versus a real tenant
The sandbox accepts an APIKey header and returns demo data, which is ideal for learning response shapes and writing mappings. A real S/4HANA Cloud tenant needs a communication scenario, communication system and communication user or OAuth client before an API can be called, and the host is specific to your tenant.
- Sandbox: APIKey header, sample data, rate limited
- Tenant: communication arrangement, OAuth or basic authentication
- Same OData service path, different host and security
- Test write calls only in non-production tenants
Reading the response
OData V2 responses wrap data in a d object, with a results array for collections. Use $select to keep payloads small and $top to limit rows. Use the $metadata output to confirm property names and key fields before you build mappings or write code against them.
Common mistakes
Using the sandbox key against a tenant host, forgetting to URL encode the filter, assuming sandbox data equals your data, and committing API keys to source control are frequent. Keep keys in environment variables and rotate them if they leak.
Frequently Asked Questions
What header does the SAP API Business Hub sandbox use?
The sandbox uses an APIKey header containing the personal key shown on the API page after you log in. The same key works across sandbox APIs, and it returns demo data only, not your own system data.
Can I use the sandbox key against my own S/4HANA Cloud system?
No. Your tenant uses its own host and authentication set up through a communication arrangement, with OAuth or basic authentication. The API Business Hub key is only for the shared sandbox.
How do I find the right service path?
Open the API reference page on the SAP Business Accelerator Hub, select the resource, and read the base path and entity sets shown there. For S/4HANA released APIs it normally starts with /sap/opu/odata/sap/.
Is it safe to share generated cURL commands?
Only after removing the API key or token. Treat keys like passwords, store them in environment variables, and never paste them into tickets or chat. Rotate the key if it was exposed.
If you want a private assistant that explains API payloads and drafts safe read calls against your SAP landscape, Netray can build one that runs in your environment.
Related Tools
SAP OData Service URL Builder
Generate a correct SAP Gateway OData V2 request URL with query options, test it in a browser or REST client, then reuse it in your code.
SAPSAP CPI iFlow Design Template
A fill-in design document for an SAP Cloud Integration iFlow, covering adapters, mappings, exception handling and monitoring, ready to hand to reviewers.
SAPSAP RFC Destination Setup Checklist (SM59)
Work through every step of creating and securing an RFC destination in SM59, from connection type to authorization and testing.
SAPIDoc to EDI X12 Mapping Worksheet (INVOIC to 810)
An editable mapping sheet that pairs IDoc segments and fields with X12 segments and elements, with rules and open questions, exported as an Excel spec.
More SAP tools
See allKeep exploring
Free tools
- SAP Business One Service Layer $batch Request GeneratorGenerate the raw HTTP for a Service Layer session: Login, a $batch with a changeset that deletes, updates or creates several records in one transaction, and Logout.
- SAP S/4HANA Production Order Tables and Join SQL GeneratorGet the production order tables for S/4HANA and generate the join SQL for order headers, operations and components.
- SAP Work Center Master Data Request TemplateA request form for creating or changing an SAP PP work center, covering basic data, capacity, scheduling and costing so master data gets it right the first time.
ERP fixes and how-tos
- SAP S/4HANA API Guide: Business Hub, OData, Public Cloud and Business PartnerA guide to SAP S/4HANA APIs: the Business Accelerator Hub, A2X OData, the Business Partner API, public cloud communication arrangements, PI/PO and Digital Manufacturing.
- SAP S/4HANA API Documentation: Where It Is and How to Use ItWhere to find S/4HANA API documentation (SAP Business Accelerator Hub), OData vs SOAP, authentication on cloud and on-prem, and key manufacturing APIs.
- API Creation Process in SAP S/4HANA: From CDS View to OData ServiceHow to create a custom API in SAP S/4HANA: CDS view entity, service definition, service binding, activation, authorization and when to use the Business Hub.
Runs with your ERP
- SAP Sapience Manufacturing Hub and S/4HANA: equipment data for electronicsHow PDF Solutions' Sapience Manufacturing Hub brings semiconductor and electronics equipment data into SAP S/4HANA. Integration, data flows and pitfalls.
- BlackLine with SAP S/4HANA: reconciliations and close automationHow BlackLine, sold by SAP as Account Substantiation and Automation and Intercompany Financial Hub, automates reconciliations on S/4HANA and ECC finance data.
- SAP Commerce Cloud B2B with SAP S/4HANA: webshop to ERP integrationHow SAP Commerce Cloud B2B connects to S/4HANA via SAP Integration Suite: master data to the webshop, orders back to the ERP, setup steps and pitfalls.
AI on your ERP
- SAP BTP and a Private LLM: Where the Generative AI Hub Fits and Where It Doesn'tWhere SAP BTP's Generative AI Hub fits and where a self-hosted LLM belongs instead. CAP, Integration Suite, and an architecture decision framework.
- AI for Siemens Insights Hub (MindSphere): Asset Data Joined to ERP, Answered in Plain EnglishConnect Siemens Insights Hub (MindSphere) asset and time series data to your ERP with a private LLM, so engineers can ask grounded questions without data leaving.
Integrations
- How to build an MCP server for SAP Business OneBuild a Model Context Protocol server for SAP Business One: tools to expose, Service Layer auth, stdio versus HTTP, permission scoping and audit logging.
- How to add AI agents to SAP Business ByDesignHow to add AI agents to SAP Business ByDesign: a tool layer over its web services and custom OData, with human approval before any write. Steps, flows, pitfalls.
Software
- Siemens Insights HubWhat Siemens Insights Hub (formerly MindSphere) is: an industrial IoT and analytics platform for machine data, with integrations, limits and alternatives.
- IFS CloudIndependent guide to IFS Cloud, the ERP and enterprise asset and service platform: modules, integration options, limitations, alternatives and AI use cases.