Introduction to the SAP Subscription Billing APIs
The APIs for SAP Subscription Billing enable IT administrators and developers to automate activities and to build custom integrations to 3rd party applications, for example.
If you’re just getting started with APIs and need some guidance about where to begin, then keep reading. In this blog post, we’ll provide you with a brief overview of the available information sources and summarize the first steps to take with our APIs.
Your main source of information is the API Package on the SAP Business Accelerator Hub. There you’ll find all the APIs for retrieving and managing the different objects and business documents of the solution, from the business configuration data to the billing data.
- API reference with all endpoints and operations by category.
- Schema view with all object structures and field definitions.
Among other things, through the API page you also have the possibility of trying out GET operations of the API in a sandbox environment.
If you’re totally new to the SAP Business Accelerator Hub, then we recommend that you check out the Getting Started page for an introduction to this information-packed website.
The API Guide of SAP Subscription Billing extends the contents of the API references on the SAP Business Accelerator Hub with tips, how-tos, info on processes and so on. The structure of each chapter mirrors the structure of the corresponding API reference, with an article for the details on each endpoint and operation.
The API Guide is available on the Help Portal page of SAP Subscription Billing, under Integrate.
Calling the APIs
So that’s where to find information, but how do you begin using the SAP Subscription Billing APIs? In the API Guide you’ll find a Getting Started chapter that summarizes the prerequisites and steps to access them in your own environments.
After completing the setup, you just need to do this to start calling the APIs:
- Get the service key.
- Generate an access token.
Try Out in Your Environment
You can also call the APIs directly in the SAP Business Accelerator Hub instead. This might be useful if you just need to try out an endpoint with your own data, or to occasionally trigger a few operations in your environment, for example. Let’s see what this looks like:
Get the Credentials from the Service Key
No matter which interface you’re using, you always need the service key. A service key enables access to a service, in this case, the SAP Subscription Billing APIs.
In your subaccount in the SAP BTP cockpit, access the list of service instances and look for the instance of the APIs:
In the details you’ll find a section for service keys, where you can display the data of the one you need:
For the SAP Business Accelerator Hub, you’ll need these credentials:
- Client ID
- Client secret
- Identity zone
Add Your Environment to the API
Log in to the SAP Business Accelerator Hub, open the API that you want to use and go to Try Out.
The sandbox environment is always available. To add your own environment to the list, expand the list and choose Add New Environment.
Now you just need to name the environment and enter the credentials from the service key:
In the scope section you can also choose whether the environment shall be available for future sessions or only for the current one.
Once you’ve configured the environment, you can start.
You’ll find more details about these steps under Trying Out APIs in a Configured Environment on the SAP Help Portal.
We hope that this blog post helped clarify how to get started with our APIs.