Salesforce SAPI

(0 reviews)

home

Salesforce SAPI

This Salesforce System API implements to create or update End User Person Accounts, Data Feed Exceptions and to execute Composite Requests.

This endpoint returns the JSON media type payload.

This API has 4 endpoints.

  1. GET: /status
  2. POST : /endUserPersonAccounts
  3. PUT : /endUserPersonAccounts
  4. POST: /dataFeedExceptions
  5. POST: /compositeRequest

Architecture Diagram:

resources/MicrosoftTeams-image%20%289%29-80246ecc-b2cc-4bcb-8c82-4178fe4f1413.png

Endpoints:

Get status of Application

GET: /status

To check the health of the API

This endpoint displays the status of the application in Json format.
TopicDetails
1.Operation DescriptionCheck the current status of API
2.URI/api/status
3.MethodGET
4.Response{ "application": "cupa-marketing-preference-xapi-dev", "version": "v1", "environment": "dev", "status": "Running", "timestamp": "2023-02-02T07:41:43.227Z+00:00" }
5.Synchronous/AsynchronousSynchronous
6.ProtocolHTTPs
7.URLhttps://apis-sandbox.cambridgeassessment.org.uk/cupa-marketing-preference-batch-dev/api/status
8.Mode of Communication☐ Batch ☐ Message☒ Real Time
9.Interface Pattern☐ Publish / Subscribe ☒ Request / Reply

Create End User Person Accounts

POST: /endUserPersonAccounts

This endpoint is used to create person account in Salesforce.

Sample input message:

[
    {
        "sourceSystem": "File-Maker",
        "businessStream": "Academic",
        "firstName": "Max",
        "lastName": "Mule",
        "salutation": "Mr.",
        "jobRole": "Author; Lecturer; Author",
        "country": "United Kingdom",
        "emailId": "max.mule@mulesoft.com",
        "orcId": "123456",
        "coreRefId": "123456",
        "grId": "123456",
        "createdDate": "2022-09-19",
        "institution": "Cambridge University",
        "emailOptIn": "Undefined",
        "emailOptInType": "Sales Soft Opt-In",
        "leadSource": "Commercial Relationship;Commercial Relationship",
        "leadSourceDetails": "journal_author",
        "communicationSubscriptions": "",
        "journalMnemonics": "AIE; ZYG",
        "libAlerts": {
            "dateAdded": "2022-01-01",
            "subjects": "56;87",
            "countryCodes": "te_IN"
        }
    }
]
TopicDetails
1.Operation DescriptionCreate new End User Person Account record in salesforce
2.URI/api/endUserPersonAccounts
3.MethodPOST
4.Synchronous/AsynchronousSynchronous
5.ProtocolHTTPs
6.URLhttps://apis-sandbox.cambridgeassessment.org.uk/cupa-salesforce-sapi-dev/api/endUserPersonAccounts
7.Mode of Communication☐ Batch ☐ Message☒ Real Time
8.Interface Pattern☐ Publish / Subscribe ☒ Request / Reply

Update End User Person Accounts

PUT: /endUserPersonAccounts

This endpoint is used to update person account in Salesforce.

Sample input message:

[
    {
        "id": "0015t00000yxTBCAA2",
        "sourceSystem": "File-Maker",
        "businessStream": "Academic;ELT",
        "firstName": "Maxer",
        "lastName": "Mule",
        "salutation": "Mr.",
        "jobRole": "Author; Lecturer; Author",
        "country": "United Kingdom",
        "emailId": "max.mule@mulesoft.com",
        "orcId": "123456",
        "coreRefId": "123456",
        "grId": "123456",
        "createdDate": "2022-09-19",
        "institution": "Cambridge University",
        "emailOptIn": "Undefined",
        "emailOptInType": "Sales Soft Opt-In",
        "leadSource": "Commercial Relationship;Commercial Relationship",
        "leadSourceDetails": "journal_author",
        "limitedUse": false,
        "communicationSubscriptions": "",
        "journalMnemonics": "AIE; ZYG",
        "libAlerts": {
            "dateAdded": "2022-01-01",
            "subjects": "56;87",
            "countryCodes": "te_IN"
        }
    }
]
TopicDetails
1.Operation DescriptionUpdate End User Person Account record in salesforce
2.URI/api/endUserPersonAccounts
3.MethodPUT
4.Synchronous/AsynchronousSynchronous
5.ProtocolHTTPs
6.URLhttps://apis-sandbox.cambridgeassessment.org.uk/cupa-salesforce-sapi-dev/api/endUserPersonAccounts
7.Mode of Communication☐ Batch ☐ Message☒ Real Time
8.Interface Pattern☐ Publish / Subscribe ☒ Request / Reply

Create Data Feed Exceptions

POST: /dataFeedExceptions

This endpoint is used to post exception information in salesforce dataFeedException object.

Sample input message:

[
    {
        "orchestrarion": "Mulesoft",
        "appName": "cupa-salesforce-sapi",
        "sourceSystem": "Lib-Alert",
        "feedItems": "{\n  sourceSystem: \"File-Maker\",\n  businessStream: \"Academic\",\n  firstName: \"Max\",\n  lastName: \"Mule\",\n  salutation: \"Mr.\",\n  jobRole: \"Author; Lecturer\",\n  country: \"United Kingdom\",\n  emailId: \"max.mule@mulesoft.com\",\n  orcId: \"123456\",\n  coreRefId: \"corereferenceid\",\n  grId: \"123456\",\n  createdDate: \"2022-09-19\",\n  institution: \"Cambridge University\",\n  emailOptIn: \"Opted-In\",\n  emailOptInType: \"Sales Soft Opt-In\",\n  leadSource: \"Commercial Relationship\",\n  leadSourceDetails: \"journal_author\",\n  limitedUse: true,\n  communicationSubscriptions: \"General Academic Communications\",\n  journalMnemonics: \"AIE; ZYG\",\n  libAlerts: {\n    dateAdded: \"2022-09-19\",\n    subjects: \"61; 62; 63; 64; 65\",\n    countryCodes: \"te_IN\"\n  }\n}",
        "statusCode": "INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST",
        "message": "Job Role (ASF): bad value for restricted picklist field: Lecture"
    }
]
TopicDetails
1.Operation DescriptionCreate Data Feed Exceptions in Salesforce
2.URI/api/dataFeedExceptions
3.MethodPOST
4.Synchronous/AsynchronousSynchronous
5.ProtocolHTTPs
6.URLhttps://apis-sandbox.cambridgeassessment.org.uk/cupa-salesforce-sapi-dev/api/dataFeedExceptions
7.Mode of Communication☐ Batch ☐ Message☒ Real Time
8.Interface Pattern☐ Publish / Subscribe ☒ Request / Reply

Execute Composite Request

POST: /compositeRequest

This endpoint is used to execute Composite Request.

Sample input message:

{
    "allOrNone": true,
    "collateSubrequests": false,
    "compositeRequest": [
        {
            "method": "GET",
            "url": "/services/data/v56.0/sobjects/Product2/Article_Number__c/QPB-22-0028",
            "referenceId": "refProduct"
        },
        {
            "method": "GET",
            "url": "/services/data/v56.0/sobjects/Account/0015t00000yxTBCAA2",
            "referenceId": "refAccount"
        }
    ]
}
TopicDetails
1.Operation DescriptionTo execute composite request in Salesforce
2.URI/api/compositeRequest
3.MethodPOST
4.Synchronous/AsynchronousSynchronous
5.ProtocolHTTPs
6.URLhttps://apis-sandbox.cambridgeassessment.org.uk/cupa-salesforce-sapi-dev/api/compositeRequest
7.Mode of Communication☐ Batch ☐ Message☒ Real Time
8.Interface Pattern☐ Publish / Subscribe ☒ Request / Reply

Reviews