0% found this document useful (0 votes)
62 views4 pages

API Document

The document provides details on authenticating with and utilizing the Salesforce API for a client, including obtaining an access token via OAuth 2.0 using a username and password to access methods, with an example of calling a DemandUpsert endpoint to create a demand record in Salesforce along with sample request and response bodies. It also outlines next steps for SAP development including setting up tables to store endpoints and credentials and developing code to fetch tokens and pass demand data.

Uploaded by

Muhammad Uzair
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views4 pages

API Document

The document provides details on authenticating with and utilizing the Salesforce API for a client, including obtaining an access token via OAuth 2.0 using a username and password to access methods, with an example of calling a DemandUpsert endpoint to create a demand record in Salesforce along with sample request and response bodies. It also outlines next steps for SAP development including setting up tables to store endpoints and credentials and developing code to fetch tokens and pass demand data.

Uploaded by

Muhammad Uzair
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Sales Force API

1. Document purpose
The document will provide the analyst and developers with the technical specifica on required to u lize
the Salesforce API’s capability designed for client name.

2. Requirement
Demand Upsert API.

3. Authen ca on

A user account (username, password) will be provided to any client which will use the API. This account
will undergo the Salesforce system's authoriza on before any available methods can be accessed. The
web services will u lize the OAuth 2.0 authoriza on by providing an authoriza on grant and obtaining
the access token from the Salesforce server.

3.1 Authentication Method

Endpoint https://zkt.salesforcesandbox.com/services/oauth2/token
Request Type POST
Headers No Headers required
Body form data

grant_type password Must be the word "password" for this authen ca on flow.
client_id The Consumer Key from the connected app defini on.
client_secret The Consumer Secret from the connected app defini on.
username End-user's username.
password End-user’s password

grant_type password
client_id
6HDG9Gdzj3taRxuNOb_8WSQSkmGEa8EtO81BiuqaUqfm2oPQfVQwkPR5lZW7R6ZaN2CmmbK1THSIFs3PTsidZ
client_secret H56AD09E3A6BED4D50B3B2BBCDCB4F4FD7F85DFA19A6FDA3FA5E5FCA1D856H7S
username integra [email protected]
password API@2023
Sales Force API

Endpoint : h ps://sapsandbox.my.salesforce.com/services/apexrest/DemandUpsert/
Sales Force API
Sample Request Body

{
"demandSFDCId": "",
"accountingDocNO":"222222",
"salesOrderNumber":"0030018495",
"amount": "4444.99",
"bookingSFDCId": "",
"fiscalYear":"2023",
"companyCode":"214",
"demandExternalID":"",
"cancelledInvoice":"",
"documentType":"Demand",
"longText":"Demand Rest API",
"docDate":"2023-06-02",
"postingDate":"2023-06-02",
"createdOnSAP":"2023-06-02",
"creditNoteAmount":"99999",
"debitNoteAmount":"77777",
"debitNoteNO1":"2434",
"debitNoteNO2":"",
"debitNoteNO3":"",
"debitNoteNO4":"",
"debitNoteNO5":"",
"crebitNoteNO1":"0909",
"crebitNoteNO2":"",
"crebitNoteNO3":"",
"crebitNoteNO4":"",
"crebitNoteNO5":"",
"fileTitle":"Text.pdf",
"versionData":"”
}

Sample Response Body


{
"status": "Success",
"message": "Demand has Created successfully!",
"demandSFDCId": "a0M1m000007TkOJEA0"
Sales Force API
SAP Development:
 Create Table Maintenance To store the End points and Login creden als
 Create Func on Group and Func on to Fetch the Token
 Create Fm to pass demand le er data.

You might also like