1. API Reference
  • API Reference
    • Introduction
  • Website Integration
    • Leads Creation API
      POST
  • Call Center Integration
    • DataFetch API
      GET
  1. API Reference

Introduction

About#

The autoX API enables you to interact with your automotive data programmatically. Use this API to build integrations, automate dealer operations, or develop custom applications on top of your autoX instance on SAP Cloud ERP. This page documents the REST resources available in autoX, including HTTP response codes and example requests and responses.
The autoX API is built on open standards and exposed via SAP's services layer, enabling programmatic access to your automotive dealer data across sales, service, parts, and fleet operations.

Standard SAP APIs#

All standard SAP APIs for your S/4HANA landscape – including business partners, materials, sales orders, and more – are documented on the SAP Business Accelerator Hub.
The APIs documented in this reference are specific to autoX and extend or complement the standard SAP APIs available on the hub.

Base URL#

The base URL of the autoX API depends on the endpoint. Each endpoint is served through one of the following two patterns – refer to the endpoint's documentation to identify which applies.

SAP Cloud ERP#

Endpoints under this pattern follow the Open Data Protocol (OData) conventions, exposed via SAP S/4HANA's OData services layer. All resources are addressed as HTTP endpoints following OData conventions for querying, inserting, updating, and deleting data.
Requests are made directly to your SAP S/4HANA instance. The service root follows this structure:
https://<your-sap-instance>/sap/opu/odata/sap/<SERVICE_NAME>/
If you are accessing autoX within your corporate network or through VNet peering on SAP RISE, refer to this SAP Community guide to locate your SAP instance URL.
If your SAP instance is exposed publicly through API Management in SAP Integration Suite, the base URL follows this structure instead:
https://<your-integration-suite-tenant>/sap/opu/odata/sap/<service_name>/
To discover all available entity sets for a given service, append $metadata to the service root:
GET https://<your-sap-instance>/sap/opu/odata/sap/<service_name>/$metadata

SAP Integration Suite#

Some endpoints are exposed through SAP Integration Suite (Cloud Platform Integration). In this scenario, the base URL is your CPI tenant URL and the path is specific to the integration flow:
https://<your-integration-suite-tenant>/http/api/<endpoint>

Authentication#

The autoX API uses HTTP Basic Authentication. Include an Authorization header with your SAP credentials encoded in Base64 on every request.
Authorization: Basic <base64(username:password)>
Example using cURL:
curl -X GET \
"https://<your-sap-instance>/sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner" \
-H "Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=" \
-H "Accept: application/json"
Keep credentials secure. Never expose your SAP username or password in client-side code or public repositories. Use environment variables or a secrets manager instead.

Authorization#

Authorization is role-based and managed within SAP. Users must be assigned the appropriate SAP roles for the modules they need to access. Contact your SAP system administrator to manage role assignments.

OData Endpoints#

The following conventions apply to OData endpoints exposed directly from SAP S/4HANA.

Query options#

OData provides a set of reserved $-prefixed System Query Options that control which data is returned and how it is shaped. These are appended to the resource URI as query string parameters.
ParameterDescriptionExample
$selectReturn only the specified Properties.$select=BusinessPartner,FirstName,LastName
$filterFilter Entries by a condition.$filter=BusinessPartnerCategory eq '1'
$orderbyOrder Entries by one or more Properties.$orderby=CreationDate desc
$topReturn only the first N Entries.$top=20
$skipSkip the first N Entries.$skip=40
$expandExpand a Navigation Property inline in the response.$expand=to_BusinessPartnerAddress
$inlinecountInclude a count of Entries in the Collection alongside results.$inlinecount=allpages
$formatRequest the response format. Prefer the Accept header instead.$format=json
System Query Options can be combined freely. For example, to retrieve the first 10 Entries from the A_BusinessPartner Collection filtered by category, returning only key Properties:
GET https://<your-sap-instance>/sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner?$filter=BusinessPartnerCategory eq '1'&$top=10&$select=BusinessPartner,FirstName,LastName

Pagination#

Use $top and $skip together to page through a Collection. $top sets the page size; $skip offsets the starting Entry.
Page 1: GET .../A_BusinessPartner?$top=25&$skip=0
Page 2: GET .../A_BusinessPartner?$top=25&$skip=25
Page 3: GET .../A_BusinessPartner?$top=25&$skip=50
To retrieve the total count of Entries in a Collection, include $inlinecount=allpages in your request. The response will contain a __count field alongside the results.

Ordering and filtering#

The $orderby System Query Option accepts one or more comma-separated Property names, each optionally followed by asc (default) or desc.
$orderby=CreationDate desc, LastName asc
The $filter System Query Option supports standard OData comparison and logical operators:
OperatorDescriptionExample
eqEqual$filter=BusinessPartnerCategory eq '1'
neNot equal$filter=BusinessPartnerCategory ne '2'
gt / geGreater than / or equal$filter=CreationDate ge datetime'2024-01-01T00:00:00'
lt / leLess than / or equal$filter=CreationDate le datetime'2024-12-31T00:00:00'
and / orLogical operators$filter=BusinessPartnerCategory eq '1' and IsMarkedForArchiving eq false
substringofString contains$filter=substringof('John', FirstName)
startswithString starts with$filter=startswith(LastName, 'Smi')
String values must be wrapped in single quotes. Numeric and boolean values are passed unquoted. Date values use the OData datetime literal format as shown above.

Status Codes#

The autoX API uses standard HTTP status codes. Successful responses return 2xx; client errors return 4xx; server errors return 5xx.
CodeDescription
200 OKThe request succeeded and the response body contains the requested data.
201 CreatedA new resource was successfully created.
204 No ContentThe request succeeded but there is no response body (e.g. after a delete or update).
400 Bad RequestThe request was malformed, contained invalid query options, or was missing required fields.
401 UnauthorizedAuthentication credentials are missing or invalid. Check your Authorization header.
403 ForbiddenThe authenticated user does not have the required SAP role to perform this operation.
404 Not FoundThe requested resource or Entry does not exist.
405 Method Not AllowedThe HTTP method is not supported on this endpoint.
406 Not AcceptableThe requested response format is not supported. Check your Accept header.
500 Internal Server ErrorAn unexpected error occurred. Contact your SAP system administrator if the issue persists.
OData error responses include a structured error body with a code and message field:
{
  "error": {
    "code": "ABC/123",
    "message": {
      "lang": "en",
      "value": "Entity not found."
    }
  }
}
SAP Integration Suite endpoints: CPI integration flows return standard HTTP status codes where explicitly configured. If no custom error handling is defined in the integration flow, CPI defaults to returning 500 for any processing failure regardless of the underlying cause. Refer to each endpoint's documentation for its specific error behaviour.
Next
Leads Creation API
Built with