If you look at the API docs for SAP S/4 HANA Cloud, you'll notice that the /customers resource does not include a POST method. This is because you create customers using POST /business-partners
. Follow the steps below to create a customer.
- Call the
POST /business-partners
endpoint with this body (replacing values with your own):{ "BusinessPartnerCategory": "1", "BusinessPartnerGrouping": "0001", "FirstName": "WeMake", "LastName": "Integrations", "BusinessPartnerFullName": "WeMake Integrations", "CorrespondenceLanguage": "EN", "IsMale" : true, "to_BusinessPartnerAddress": [ { "Country": "DE", "StreetName": "Dietmar-Hopp-Allee 16", "PostalCode": "69190", "CityName": "Walldorf", "to_AddressUsage": [ { "AddressUsage": "XXDEFAULT" } ] } ], "to_BusinessPartnerTax": [ { "BPTaxType": "DE0", "BPTaxNumber": "DE012345678" } ], "to_BusinessPartnerRole": { "results": [ { "BusinessPartnerRole": "FLCU01" } ] } }
- In the response, find
BusinessPartner
, and copy the value (the Business Partner id). - Call the
GET/business-partners/{id}?expand=to_Customer
endpoint, using theBusinessPartner
value from the previous step as the id. - In the response, find
Customer
(nested into_Customer
), and copy the value (the Customer id). - Call the
GET/customer/{id}
endpoint, using theCustomer
value from the previous step as the id. - Use
PATCH/customers/{id}
to add details to the customer.