# SAP S/4HANA API Guide: Business Hub, OData, Public Cloud and Business Partner

> Source: https://netray.co/erp-help/sap-s4hana-api-business-hub-odata-public-cloud-business-partner
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: ERP Help

## Short answer

S/4HANA APIs are discovered in the SAP Business Accelerator Hub and mostly delivered as A2X OData services such as API_BUSINESS_PARTNER. On-premise you activate them in the Gateway; in the public cloud you create a communication user, system and arrangement for a communication scenario. PI/PO or Integration Suite sit in between for orchestration, and SAP Digital Manufacturing has its own APIs on BTP.

## Kind

how-to

## System

sap

## Erp

SAP S/4HANA

## Module

APIs / Integration

## Query

sap s4 hana api

## Alternate Queries

- sap s4 hana api integration
- sap s/4hana public cloud api
- sap bp api
- sap pi api
- api sap dm

## Applies To

SAP S/4HANA on-premise, private cloud edition and public cloud edition. Names and available services depend on release.

## Steps

### How to start with S/4HANA APIs

**Items:**

- Open the SAP Business Accelerator Hub (api.sap.com), choose S/4HANA, and search the business object. Check the API type: OData V2 or V4, SOAP, or event.
- On-premise or private cloud: activate the service in /IWFND/MAINT_SERVICE, then test with /IWFND/GW_CLIENT.
- Public cloud: open the Communication Management apps. Create a communication user, a communication system that represents the caller, and a communication arrangement for the scenario that contains the API.
- Note the endpoint, user and authentication method from the arrangement and call the service from your client or middleware.
- For business partners, use the Business Partner API with the A_BusinessPartner entity set, and its related address and role entities. Read before write, and fetch a CSRF token for writes.
- If the integration uses SAP Process Integration or Process Orchestration, build the interface in the Enterprise Services Repository and point the channel at the OData or SOAP endpoint. Check SAP's current maintenance statement for PI/PO.
- For SAP Digital Manufacturing, obtain a service key on BTP and use OAuth client credentials against the Digital Manufacturing APIs.
- Add monitoring and error handling: log the request id, retry on 5xx, never retry non-idempotent writes blindly.

## Sections

### Where APIs come from

**Body:**

The Business Accelerator Hub is the catalogue. For S/4HANA it lists released APIs with the entity model, the authentication options and a sandbox. The A2X (application to external) OData services are the main integration style for custom apps, with typical names such as API_BUSINESS_PARTNER, API_SALES_ORDER_SRV and API_PURCHASEORDER_PROCESS_SRV.

Only use released APIs. Calling an unreleased service or a table directly may work today and break at the next upgrade, and in public cloud it is simply not allowed.

### Public cloud: communication arrangements

**Body:**

In the public cloud edition you cannot activate services at will. Each API belongs to a communication scenario (for example, a scenario for business partner integration), and you expose it by creating the communication arrangement that references the scenario, a communication system and a communication user. This is the control point for who may call what.

Authentication is then basic, OAuth 2.0 or certificate-based, depending on the arrangement. Use OAuth or certificates for anything beyond a demo.

**Code:**

Communication Users            -> technical user and password/cert
Communication Systems          -> the caller
Communication Arrangements     -> scenario + system + user
GET /sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner?$top=5&$format=json

### Where PI/PO and DM fit

**Body:**

SAP PI/PO is the on-premise middleware that maps and routes messages between SAP and other systems; for new work SAP positions Integration Suite on BTP instead. Many plants still run PI/PO for existing interfaces, so check your maintenance dates before building new ones on it.

SAP Digital Manufacturing is a separate BTP product with its own APIs, used to exchange production orders, confirmations and shop-floor data with S/4HANA. It is called with OAuth tokens from a service key, not through the S/4 Gateway.

### Choosing between APIs, IDocs and events

**Body:**

Use OData for synchronous reads and small writes, IDocs or SOAP for established partner exchanges, and business events for decoupled notifications. Do not extract large histories by paging OData for hours; use extraction tools designed for bulk.

## Pitfalls

- Using unreleased APIs or tables, which break on upgrade and are blocked in public cloud.
- Building a new interface on PI/PO without checking its maintenance horizon.
- Sharing one communication user across many integrations.
- Missing the CSRF token flow on write calls.
- Bulk extraction through OData paging instead of a proper extraction tool.

## Ai Angle

An AI layer on S/4HANA uses these same released APIs, with the caller's role, so answers respect SAP authorisations. For on-prem S/4HANA, Netray places the private model beside the system, calls read-only services or CDS views, and shows each call. It adds a conversational layer without replacing your integration middleware.

## Faq

### Where do I find SAP S/4HANA APIs?

**Answer:** In the SAP Business Accelerator Hub at api.sap.com, filtered to S/4HANA. It lists released OData and SOAP APIs with entity models, authentication details and a sandbox for testing before you touch your own system.

### How do I enable an API in S/4HANA public cloud?

**Answer:** Create a communication user, a communication system and a communication arrangement for the scenario that contains the API, using the Communication Management apps. The arrangement gives you the endpoint and authentication details to use.

### What is the SAP Business Partner API?

**Answer:** API_BUSINESS_PARTNER is the OData service for business partners, customers and suppliers in S/4HANA, with the A_BusinessPartner entity and related address, role and bank entities. It is used to read and sync master data.

### Is SAP PI/PO still used for APIs?

**Answer:** Many landscapes still run it for existing interfaces, but SAP directs new integration to Integration Suite on BTP. Check SAP's current maintenance dates for your release before building new interfaces on PI/PO.

## Search terms

sap s4 hana api, sap s4 hana api integration, sap s/4hana public cloud api, api sap public cloud, sap bp api, sap pi api, api sap dm, api_business_partner

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
