You are on page 1of 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 on@gmail.com
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