Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [rest-api]

REpresentational State Transfer (REST), or RESTful, web services provide interoperability between computer systems on the Internet. The Salesforce REST API provides a powerful, convenient, and simple Web services API for interacting with Force.com.

1
vote
1answer
32 views

How to get our Salesforce org ready for APIs?

I need some guidance to understand how a certain API will work and the process of making it so. We have a third party online e-learning app (called bksb) where learners do assessments and we manually ...
0
votes
1answer
168 views

Upload Attachment via Rest API

I use standard Rest API (/services/data/v39.0/sobjects/Attachment) to upload attachment from our Support Portal and get saved in case object which works fine, but when I try to open the attachement ...
1
vote
1answer
57 views

Unauthorized endpoint error due to port 444?

I am getting error during callout although I have added the url in remote sites. Can this be due to port 444 which other system has provided? What I can do to fix this as this is external system url ...
2
votes
1answer
144 views

How to connect to a third party REST API using OAuth?

I have a third party REST API that needs to be called from Salesforce, using OAuth for authentication. Is this actually possible? If so, how? I really can't find anything useful on the web. For me, it ...
2
votes
1answer
281 views

Fetch dependent picklist values depending on record type

I have a two picklists PL1 and PL2. PL1 is controlling picklist and PL2 is dependent picklist. I want to fetch values of PL1 in Apex depending on recordTypes in Apex method, which I already have ...
2
votes
1answer
28 views

How to access specific mailing address field on person account through API?

I am trying to find out how to access each component of the mailing address on our person account object. The mailing address is on the contact but it's being display through the account. I'm having ...
0
votes
1answer
70 views

Fuel-Rest API using Content Builder send to Data Extension

Is this even possible yet? I have gotten my script up to the point of creating HTML emails in Content Builder and as I understand it, I have three options from there: Send it to a Journey step. My ...
0
votes
2answers
141 views

C# REST API “PATCH” workaround

Has anyone had any luck getting a PATCH or other method to update an object to work in the REST API in C#? Whenever I try to use patch I get this response StatusCode: 405, ReasonPhrase: 'Method Not ...
0
votes
1answer
32 views

Content Builder REST API - Retrieve Email and approvals

Does anyone know how to retrieve email and its approval status? I checked on marketing cloud documentation but couldn't find the property to do so. I am trying to retrieve and filter for email that ...
2
votes
0answers
61 views

Getting FullName from Tooling API gives FIELD_INTEGRITY_EXCEPTION

I need to get the API names of all layouts in my salesforce org.I have used composite metadata api to perform queries in batch of 5 and then get the FullName.It works fine but i get a field integrity ...
0
votes
1answer
45 views

How to parse the response in Rest Service [closed]

I am getting response with below format from external system and I struggling to parse this response because this format is build by external system not in salesforce. Response: NEW_ITEM-...
1
vote
1answer
61 views

Understanding the refresh token workflow

I am new to Salesforce and my current goal is to ensure that my application never is prompted to give user credentials when making an API call. I see that this is the point of the refresh token, but I'...
2
votes
0answers
26 views

Automatic field reversal on API actions

I've got a Python app that's using the simple-salesforce Salesforce API client. One operation that it performs is automatic re-assignment of contact owners based on the owner of the respective account,...
3
votes
0answers
59 views

Generating email in Marketing cloud but sending it out to another system, not the recipient

We are using Salesforce and Marketing cloud to process data, create a campaign, populate a template and send emails. Pretty much as you'd expect. Separately, we have an internal system that is ...
1
vote
1answer
63 views

cURL “event not find” error with Salesforce Access_Token

I have an error with this cURL command: curl https://myInstance.my.salesforce.com/services/data/v44.0/ -H "Authorization: Bearer 00D1l0000008e75!AQMAQJiLSTqCI5o..O5u3MJ9cDVg8hJJdIUe63mXGN.X..." -H "X-...
0
votes
1answer
91 views

How to transfer files from Salesforce to Sharepoint Online [closed]

The use case would be that a file is uploaded to Salesforce but it should be saved in Sharepoint. How do I do it? I saw a post about making a REST call and having that do the trick but I don't ...
1
vote
1answer
24 views

How to Display Report Table in a Third Party Web App

New to salesforce, here! I would like to display a Report from SalesForce in a third party app. It is effectively just a datatable. I've been reading various documents in the developer site but I ...
0
votes
3answers
115 views

Creating an endpoint in salesforce for our external service to access data

I started reading on REST API’s and have created this class to view order tracking information: @RestResource(urlMapping=‘/Tracking/*') global without sharing class TrackingRest_Service { @...
1
vote
0answers
54 views

Using Named Credential URL in Apex Class returning null static resource in test class

I am implementing Named Credentials to replace how we do callout for a certain endpoint. One of my current test methods looks something like this: @isTest private static void test_method1() { ...
0
votes
1answer
32 views

How do I specify profile mappings on a PackageInstallRequest?

I have created an unmanaged package containing a Salesforce Platform Profile named "Foo". In the org where I am attempting to install the package, I have also created a Salesforce Platform Profile ...
-2
votes
1answer
22 views

How to get all opportunities owned by a salesforce account using their rest api?

I see there are ways to create, delete, read individual opportunities here: https://developer.salesforce.com/docs/api-explorer/sobject/Opportunity How to get all opportunities owned by a salesforce ...
0
votes
1answer
72 views

REST API apex - send and receive within a same class

I'm wondering, Is there an option to receive data with @HTTPGET --> Make some manipulation on this data --> Create new REST request and send it to different URL - On the same Class? Thanks
2
votes
1answer
73 views

What is the best way to run test classes from Apex code? SOAP Apis or Rest API?

To run all tests or specific test classes we can use both the APIs SOAP and Rest API. Below are the differences that I noticed when done research on both. All test SOAP - Possible, Without ...
0
votes
1answer
270 views

REST api to upload multiple notes and attachments at once

I am working on an app that allows customers to upload images, video, (even gif) into my app. Once the case is processed on my app, I want to place those media files into Salesforce. I have a case ...
2
votes
0answers
31 views

Bug: blank locationsNotCovered returned from REST: /tooling/runTestsSynchronous/

Starting a few days ago SFDC sandboxes upgraded to Winter 19 started to return blank locationsNotCovered node in /tooling/runTestsSynchronous/ result For example - a basic call with 1 test class like ...
0
votes
1answer
130 views

Trouble Using Bulk API 2.0 Multipart Request

I am sending up this payload --BOUNDARY Content-Type: application/json; charset=utf-8 Content-Disposition: form-data; name="job" {"columnDelimeter":",","contentType":"CSV","lineEnding":"\r\n","object"...
0
votes
1answer
127 views

Permissions needed for calling REST API

I am working on an assignment where I need to expose Contact data to a webservice via REST API. I was able to get the REST API call working thru Postman/SoapUI only when the Profile has the View All ...
3
votes
1answer
53 views

How to save webhooks page data to Salesforce custom object?

In my requirement my webhook url having some data. when i am updating or inserting some data in my webhook page i want to save those data automatically in salesforce custom objects. Is there a way to ...
1
vote
0answers
41 views

Getting field names from QueryResult when child records are empty - How does Workbench do it?

I'm querying via the REST API (in Apex, because I'm calling another org, amongst other reasons) and using a wacky recursive algorithm on the first returned record to parse out the field names. And no, ...
0
votes
1answer
17 views

Do we need separate authentication grant to access different salesforce object?

We have a soql query which we run against the api that works on User object Select Id,Name from User; we are trying to enhance the query to retrieve the profile.name and role.name using the same ...
0
votes
2answers
95 views

Authenticate Docusign API using APEX

We have been working on org where there's a one-time manual setup page to authenticate with Docusign API using Oath flow and store the Access token and Refresh token in a custom setting. If any other ...
0
votes
0answers
29 views

Email Preview using REST API [duplicate]

I have written a SSJS code to preview the rendered email. <script runat="server"> Platform.Load("core", "1"); var url = 'https://auth.exacttargetapis.com/v1/requestToken'; ...
0
votes
1answer
27 views

I can not link Note to a contact

I am writing a very simple plugin which creates Contact and associate a note to it. I noticed that to add a note to a contact, I should first create the contact after that add the note here is my ...
0
votes
0answers
209 views

Issue in upload PDF through Document's REST api

For learning purpose, I am trying to upload a PDF through a REST api. I tried to write apex code for the same, I am able to insert/upload pdf but the PDF is corrupted. I am unable to open the ...
1
vote
1answer
424 views

MUTUAL_AUTHENTICATION_FAILED

When I am trying to insert records to Salesforce using ARC(OAuth2) getting below error Error: This session could not be mutually authenticated for use with the REST API { "message": "This session ...
2
votes
2answers
82 views

REST: Why does the response have a status of 200 but a statusCode of 406?

I have a simple api on Salesforce that returns some basic User data when called. It works fine however I noticed that the http status and statusCode are different. Is there something specific I have ...
2
votes
0answers
94 views

Getting Error while try to trigger API event in Journey From Landing pages using ssjs?

I'm working on to trigger API event in journey/Journey builder from landing pages. For now, I can able to get accessToken using clientId & clientSecret and then I tried to pass subscriberkey & ...
0
votes
2answers
216 views

Save multiple records on one API call

There's an image of investment declaration form. This module is in web application project, where an employee can declare his yearly investment and finally save it. After saving the document page my ...
1
vote
1answer
63 views

What are the design patterns how to do a batch callout

I know some basics on callouts but would like some advice on doing multiple callouts. Requirements: I have an external system where guests are registered this could be large amounts. I have to get ...
0
votes
1answer
68 views

Is it possible to create a complex filter with additional operands in Python FUEL SDK?

I am able to create a somewhat complex filter in Python using FuelSDK from_filter = {'Property' : 'EventDate', 'SimpleOperator' : 'greaterThan', 'DateValue' : fromDate} to_filter = {'Property' : '...
1
vote
0answers
218 views

Send multipart/form-data to apex @HttpPost service

How I am currently doing this is, sending a raw JSON through Postman. This JSON is used to create a Case record in Salesforce. In order to attach a file to that case, the JSON contains a base64 ...
0
votes
1answer
37 views

how can aggregate the response returned by multiple calls in the list

I am making callout and getting the response. I am fetching the records in the batch of 200 so if there is 400 records there would be 2 callouts and getting data but the issue is second callout ...
0
votes
1answer
74 views

Returning a PageReference from @HttpGet

How can I render a Visualforce page from an @HttpGet method? HttpGet methods do not support return type of System.PageReference My controller method looks like this: @RestResource(urlMapping='/...
1
vote
0answers
29 views

Please provide an example of creating a recurring event using new Lightning model [closed]

Winter'19 release has made the new recurring event model available which is very different from the original model for series. Could someone please provide a REST API (v44) or APEX example of creating ...
0
votes
2answers
33 views

How to do or store a 1 time callout to a custom setting

I have an integration where I need to get the agency of my endpoint. Once I have the agency this wil be used for all the rest of the callouts. I would like some advice for the following: Is there a ...
0
votes
1answer
34 views

How do I filter support knowledge articles by type using REST API?

I can get a list of all articles types using https://xx.my.salesforce.com/services/data/v44.0/support/knowledgeArticles/ I want to get a list of articles of type Problem_Error__kav, How_To__kav only. ...
1
vote
2answers
363 views

How to create & update email using REST API - Salesforce Marketing Cloud?

I want to create as well as update an email using REST API. I am using following documentation links: POST /asset/v1/content/assets PUT /asset/v1/content/assets/{id} (https://developer.salesforce....
1
vote
1answer
83 views

Update a relationship via REST API

I've got an Account object on which I've created a multiple relationship Online_quotes1__r that accepts OnlineQuote__c objects. Now I'd like to relate my OnlineQuote__c objects with Account via REST ...
2
votes
1answer
49 views

Unable to get Knowledge Articles for pageNumber=2 using REST API

I am able to get first page Knowledge Articles using REST API. https://XXXX.my.salesforce.com/services/data/v44.0/support/knowledgeArticles The result has articles for page 1 "currentPageUrl": "/...
0
votes
1answer
49 views

How to make Test Coverage 100%? HttpGet method

How can I test this for 100% coverage? @HttpGet global static List<Box__c> getBox(){ RestRequest req = RestContext.request; String boxId = req.params.get('Id'); if(boxId == null) ...