FAQs OData Services SAP Hybris Cloud for Customer PUBLIC
TABLE OF CONTENTS FAQS ODATA SERVICES... 3 1. How to access the SAP Hybris Cloud for Customer OData API of your tenant?...3 2. How to access the metadata of the OData API of your tenant?...3 3. How to access Odata API reference for all the objects?...3 4. Can ODATA V2 services be consumed in Cloud for Customer OData services?...3 5. Is Initially Received At field available in standard OData service Cloud for Customer OData?...3 6. How to create Contact Communication Data while creating Contacts using OData services?...3 7. Is it possible to retrieve the Organisational Structure data using OData services?...3 8. What are the different supported HTTP operations in OData?...4 9. What is the use of Null checkbox while creating a Custom OData service?...4 10. What is the use of Include Code Description checkbox while creating a Custom OData service?...4 11. What is the use of Enable Search checkbox while creating a Custom OData service?...4 12. How to use $count filter with $filter while using GET fucntion?...4 13. Is it possible to Update/Delete/Export TextCollection Nodes via Dataworkbench?...4 14. How to Use Methods And Filters in OData Services?...4 15. Is Cross-Origin Resource Sharing (CORS) Enabled for OData Services?...4 2
FAQS ODATA SERVICES 1. How to access the SAP Hybris Cloud for Customer OData API of your tenant? You can access the OData API of your tenant by following the URL pattern: https://<your_tenant>/sap/c4c/odata/v1/c4codata 2. How to access the metadata of the OData API of your tenant? You can access the metadata of the OData API of your tenant with the URL pattern: https://<yourtenant>/sap/c4c/odata/v1/c4codata/$metadata 3. How to access Odata API reference for all the objects? You can access Odata API reference for all the objects with the URL pattern: https://help.sap.com/saphelp_sapcloudforcustomer/en/odata_apis/index.html#ed2431cb0d484cd8a9fe 60699856197b.html 4. Can ODATA V2 services be consumed in Cloud for Customer OData services? You can use the same URL https:// <CloudTenant>/sap/c4c/odata/v1/c4codata/ for accessing ODATA V2 in Cloud for Customer 5. Is Initially Received At field available in standard OData service Cloud for Customer OData? You can use the field RequestedStart as a workaround. Addition of field Initially Received At will be available in one of our future releases. 6. How to create Contact Communication Data while creating Contacts using OData services? You have to first create AccountContactRelationship and then you can create ContactCommunicationData by adding communication data for Contacts 7. Is it possible to retrieve the Organizational Structure data using OData services? There is no OData API to retrieve Organizational Structure. 3
8. What are the different supported HTTP operations in OData? Below are the supported HTTP operations in OData GET POST PUT PATCH DELETE - Used to retrieve a single entity instance or multiple entity instances - Used to create entity instances - Used to completely replace/overwrite and existing entity instance - Used to replace/overwrite existing entity instance. The key difference between PUT and PATCH is that PUT overwrites the complete entity whereas PATCH only updates only attributes of the entity that are part of the payload - Used to delete an entity record $batch - Used to perform multiple query, create, update and delete operations with explicit transaction boundaries specified via Changesets as a part of the payload Deep Insert - Used with POST. Allows the creation of complete entity (header entry, child entries etc.) with a single POST request 9. What is the use of Null checkbox while creating a Custom OData service? The Null checkbox will mark a property nullable as True, which makes the property as mandatory 10. What is the use of Include Code Description checkbox while creating a Custom OData service? Include Code Description checkbox will add the description of Property value in the metadata. Example Property - Category Code and Category Code Text 11. What is the use of Enable Search checkbox while creating a Custom OData service? The Enable Search checkbox will enhance the property to the filter $search. The $search will look for the value in that property also. 12. How to use $count filter with $filter while using GET function? http://<tenanturl>/sap/c4c/odata/v1/c4codata/$count?$filter=accountid eq 'XX' 13. Is it possible to Update/Delete/Export TextCollection Nodes via Dataworkbench? Only Import is possible, Update can be done if External Keys are used via Import option itself. 14. How to Use Methods and Filters in OData Services? You can refer to the KBA 2330688 - How to Use Methods and Filters in OData Services 15. Is Cross-Origin Resource Sharing (CORS) Enabled for OData Services? You can refer to the KBA 2487655 - Is Cross-Origin Resource Sharing (CORS) Enabled for OData Services? 4
www.sap.com/contactsap 2017 SAP SE or an SAP affiliate company. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an SAP affiliate company. The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors. National product specifications may vary. These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP or its affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty. In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation, and SAP SE s or its affiliated companies strategy and possible future developments, products, and/or platform directions and functionality are all subject to change and may be changed by SAP SE or its affiliated companies at any time for any reason without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, and they should not be relied upon in making purchasing decisions. SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. All other product and service names mentioned are the trademarks of their respective companies. See http://www.sap.com/corporate-en/legal/copyright/index.epx for additional trademark information and notices.