Salesforce SAPI
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.
- GET: /status
- POST : /endUserPersonAccounts
- PUT : /endUserPersonAccounts
- POST: /dataFeedExceptions
- POST: /compositeRequest
Architecture Diagram:
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.
Topic | Details | |
---|---|---|
1. | Operation Description | Check the current status of API |
2. | URI | /api/status |
3. | Method | GET |
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/Asynchronous | Synchronous |
6. | Protocol | HTTPs |
7. | URL | https://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"
}
}
]
Topic | Details | |
---|---|---|
1. | Operation Description | Create new End User Person Account record in salesforce |
2. | URI | /api/endUserPersonAccounts |
3. | Method | POST |
4. | Synchronous/Asynchronous | Synchronous |
5. | Protocol | HTTPs |
6. | URL | https://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"
}
}
]
Topic | Details | |
---|---|---|
1. | Operation Description | Update End User Person Account record in salesforce |
2. | URI | /api/endUserPersonAccounts |
3. | Method | PUT |
4. | Synchronous/Asynchronous | Synchronous |
5. | Protocol | HTTPs |
6. | URL | https://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"
}
]
Topic | Details | |
---|---|---|
1. | Operation Description | Create Data Feed Exceptions in Salesforce |
2. | URI | /api/dataFeedExceptions |
3. | Method | POST |
4. | Synchronous/Asynchronous | Synchronous |
5. | Protocol | HTTPs |
6. | URL | https://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"
}
]
}
Topic | Details | |
---|---|---|
1. | Operation Description | To execute composite request in Salesforce |
2. | URI | /api/compositeRequest |
3. | Method | POST |
4. | Synchronous/Asynchronous | Synchronous |
5. | Protocol | HTTPs |
6. | URL | https://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 |