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.

Filter by
Sorted by
Tagged with
0
votes
1answer
19 views

Automation to exit contacts mid-journey

I'm looking to create an automation that exits contacts contained in a data extension from an active journey. I came across the contact exit API documentation (https://developer.salesforce.com/docs/...
2
votes
0answers
30 views

Submitting a Lead through the Composite endpoint of the REST API is not triggering the correct Lead assignment rule

I'm working on an API that submits leads and associated objects to Salesforce via the Salesforce REST API using the composite request endpoint. Issue When inserting a lead as part of a composite ...
1
vote
0answers
19 views

Session to connected app

I would like an API to behave dyanamically based on which Connected App is calling it. Is there a way to identify from the user session which connected App was used to create the session? I can then ...
0
votes
0answers
24 views

Primarykeys in Data Extension Upsert REST API

I would like to know an alternative of using the PrimaryKey attribute row value that contains a colon character, the API returns the following error: { "message": "Parameter {primaryKeys} is invalid....
1
vote
1answer
31 views

Querying Salesforce Campaigns for Newly Added Contacts

I'd like to pull all of the contacts who have recently been added to a campaign using HTTP requests (from an external application). My current method is using a GET request with the URL /sobjects/...
6
votes
4answers
1k views

API Access to Trailhead Data

Trailhead seems to have an API to access trailhead data about badges, project, modules, roles, users etc. but it requires an API key to use. Does anybody know how to get any API key to use this API? ...
2
votes
0answers
175 views

Sending 100KB attachment via HTTPRequest throws System.UnexpectedException

I'm trying to upload an attachment from SF to a third party server using REST API, First, my third party does not support base64 content-transfer so I cannot send from SF a base64 attachment. ...
2
votes
1answer
471 views

Customer Sending an Attachment Live Agent with REST API

I'm trying to integrate my apps with salesforce Live Agent through REST API. I already read the Guide here (https://resources.docs.salesforce.com/212/latest/en-us/sfdc/pdf/live_agent_rest.pdf), but I ...
-2
votes
0answers
19 views

I want to access Json data in APEX [duplicate]

Returning data of Api is - JSON DATA [{"country":"World","cases":5335342,"todayCases":37135,"deaths":340607,"todayDeaths":1182,"recovered":2178230,"active":2816505,"critical":44602,"...
0
votes
2answers
777 views

Read Timeout error while making an API Inbound call to Salesforce

Getting Read Timeout error while making an API Inbound call to Salesforce. Is it possible to check at Salesforce is receiving connections.
2
votes
1answer
949 views

how to upload contact/lead profile image through REST API?

I have byte array data of user image and what is best way to upload contact/lead profile photo and what is the REST API for uploading the same. I have also social site photo url. is there any API to ...
1
vote
2answers
23 views

What is the best way to determine when a campaign has had a new contact added to it?

If I want to use Salesforce's REST API to return campaigns who have recently had members added to them, what is the easiest way to do so? I am trying to do this externally, using authentication ...
1
vote
3answers
10k views

OAuth2 token request failing

My access token request is failing with the following error response in HTTP Response. { error: "invalid_client_id" error_description: "client identifier invalid" } I am trying with the Username-...
0
votes
1answer
37 views

Updating CampaignMember Record via RESTful web service

Also new at APEX and this is my first crack at it. I want to update some fields on the CampaignMember object when I catch a Webhook on a force.com site. I have the Webhook working, however I am having ...
0
votes
0answers
15 views

How to disable the creation of feed items when a task is created via the REST API

We have an integration between our phone system (3CX) and Salesforce. It logs calls into Salesforce using the REST API: /services/data/v37.0/sobjects/task RequestType="Post" Those tasks have the user ...
0
votes
1answer
25 views

How do I tie Event Notification Service notifications to events in MC

We have just setup Event Notification Service and a callBack URL. I know how to tie messages called from the Transactional Messaging service, via the definitionKey. However, for other messaging that ...
5
votes
1answer
2k views

REST API using SessionId throws “not valid for use with the REST API” for Community users

Following are the steps I am doing: Get the Salesforce Session ID through SAML Handshake using SAML attributes Trigger REST API using that session ID curl https://my-communities.force.com/...
-1
votes
1answer
15 views

How to send HTML text in the body of Rest API callout

I am trying to send HTML text in the request body for Rest API callout. I came to know that you cannot use Escape quotation marks used around HTML attributes like as it breaks the JSON body. In Apex ...
0
votes
1answer
12 views

FTP authentification access via rest API

A third company provide me with an ftp host username, passwd and port to access some data. If I enter to the ftp via web browser I can access just putting user and passwd. If I try to enter via rest ...
2
votes
1answer
623 views

How to return full report (>2000 rows) using rest api?

I am unable to fetch a full report using the Salesforce REST analytics API. As was posted on another question, I am using the following solution(python): reportFilter = { "reportMetadata": {"...
0
votes
1answer
2k views

Invoking REST callous in batchjob?

i'm getting the records from third party in sfdc cases. for that i have developed a rest callout.but i'm stuched at for calling third party records i invoked in endpoint url in my rest callout like ...
1
vote
1answer
23 views

Sending post request from one org to another

I have two SFDC orgs - org1 and org2. I want to send a POST request from org1 to org2. I've already created a connected app on org2 and have named credentials + auth provider set up on org1. More ...
1
vote
0answers
30 views

Whitelist ionic://localhost in Salesforce Org for CORS

We are doing REST calls from JavaScript in an IONIC mobile app. Which calls the APIs of Salesforce by using a connected App. On the development machine, we are able to call the standard Salesforce ...
0
votes
1answer
19 views

How do I get a particular Contacts LoggedCalls using the REST API?

Salesforce Newbie here. I need to get a particular contacts logged calls using the REST API. I realized that Calls are under in the Tasks Object with the Property TaskSubtype So when I hit https://...
-2
votes
0answers
12 views

Push salesforce custom object record into marketing cloud data extension (Is this possible with rest api?) [closed]

We want to write a custom code using rest api to insert a custom object record into marketing cloud data extension how can i do this ??
0
votes
1answer
48 views

Marketing Cloud - Sharing App events/stats with Salesforce from the Client Application

My Salesforce Marketing Cloud use-case: When the user taps on a button in my iOS application, I need to send a push notification to the user. Sometimes the Push notification/Email communication with ...
3
votes
1answer
913 views

Get Instance Url with valid OAuth Access Token

How do I get the Instance URL with just a valid OAuth Access Token? I don't have any other information, for example, I don't have the client_id or client_secret. If I make an assumption that the ...
1
vote
1answer
55 views

Access token - expiration semantics

I am currently working on exposing the SF data as an API so the external system can consume it. I created a account for the external system to access the data through the API. Salesforce provides the ...
2
votes
1answer
554 views

Can i get report data which is visible to a particular user via salesforce analytics?

I've gone through Salesforce Analytics Rest Api and implemented an apex class which will make rest call services/data/v32.0/analytics/reports/<reportId>?includeDetails=true and get report data ...
0
votes
0answers
30 views

How to post data to my rest-api using jQuery-Ajax http request [closed]

I am finding it difficult to post data to my rest-api using Jquery-Ajax http request. Here is my code: $('button').click(function(e) { e.preventDefault(); postData() }) ...
0
votes
2answers
15 views

Error posting request to add attachment via chatter rest api. version 30.0: “Unrecognized field attachment”

I am trying to post an attachment into the chatter feed of a bug item in GUS. Working with api version 30.0, and using the api reference for this version at: https://developer.salesforce.com/docs/...
0
votes
1answer
385 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"...
1
vote
1answer
1k views

Uploading a file to Chatter - REST API

I'm trying to upload a file to Chatter files using the REST API but I'm getting the following error : Binary data included but file attachment information is missing. If providing rich JSON/XML ...
0
votes
1answer
18 views

How to parse multiple value for same param in custom REST API

So I have custom REST API with Get method where request parameter is PublicGroup Name and Response is list of Users from that publicGroup. @RestResource(urlMapping='/GetUsers/*') Global with sharing ...
0
votes
0answers
21 views

SharePoint Integration Through Apex [closed]

We have to upload a file from Salesforce to SharePoint. Since this can be achieved only through REST API, we tried the same as per this but we are getting error 'no_oauth_state: state was not sent ...
0
votes
0answers
20 views

Browser error when clicking custom button [closed]

I created a custom button named 'Approve' to set Final_Calculation__c field to true, and when this field is true, it will call future method call out (POST) to SAP to get gross profit value from SAP. ...
1
vote
1answer
30 views

Pull Data to SFMC from Salesforce

How to pull an record type object data to SFMC from SFDC using API integration? As MC Connect doesn't support record type objects to synchronize in SFMC. Are there any sample Codes for API or any ...
4
votes
2answers
1k views

Sharepoint Integration From Apex

We need to upload files to sharepoint and able to view the uploaded files to sharepoint in salesforce. So we cant achieve this in File Connect, where it is not supporting two way synchronisation. So ...
1
vote
1answer
424 views

Named credential: How do I set up JWT

This is my first time setting up Named credentials with JWT, and I am a little bit confused. Currently to test the external api I am using postman: Method:Post: https://api.xxx.com.au/login { "...
0
votes
2answers
24 views

How to Test the Performance of Rest web services in Salesforce( at the same time there is multi requests), Is there any tool?

lets say if 10 users hitting web service at same time(concurrency),then how we can check performance. Please share your Ideas Thanks in Advance..
0
votes
1answer
154 views

Deploying Metadata with rest resources

As of API 43 there seems to have been some rest resources added to the metadata api. This Documentation Seems to be lacking the ability to tell me how they want me to send the zip package with the ...
0
votes
2answers
380 views

Marketing Cloud sending Content Builder Email to List

I have created a list (using SOAP API) and know the ID of this. The HTML Email exists in Content Builder, I know the name and the ID. How can I send the email to the list. This is not a triggered ...
1
vote
0answers
25 views

Adding attachment on chatter feed via chatter rest api: How to write contents of binary file in the request

I am uploading files (attachments) to Chatter for specific items, based on [this][1] rest api reference. The image files are being created but are not usable, cannot be opened as image files from GUS....
0
votes
1answer
1k views

REST API - To create/update a row in Data Extension not working

I am using following URL to create REST API request to create/update a record in the data extension: https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/...
0
votes
0answers
22 views

Restrict object access based on owner ID

I wonder if there is a Salesforce OOTB service that given a user ID, it will return only the objects that the user owns, for example using -https://cloudcraze.atlassian.net/wiki/spaces/CCRZDOCS48/...
1
vote
1answer
35 views

Error while executing composite api requests from the workbench

I am trying to make a composite api request through workbench, where I get the error as referenceId' is a required field Below is the request body: {"compositeRequest" : [{ "method" : "POST", "url"...
3
votes
2answers
3k views

How to update picklist using REST API

Would anyone have an example on how to update a picklist? I have a System Custom Field that I want to append add new items to as it comes up. The details of the field are the following: Field Label:...
1
vote
0answers
18 views

INVALID_TYPE ERROR while querying using REST API

I'm trying to run a query using REST API (RestSharp). This is my query: [SELECT Id FROM Account] This is my code: RestClient m_Client = new RestClient("https://my_instance.salesforce.com"); string ...
0
votes
0answers
23 views

Finding a value in a data extension via REST API

I'm trying to find value based on the following logic: Give me Subscriber Key where UserID = 12345. I would like to use REST API because after I have got the Subscriber Key I can use it to trigger an ...
0
votes
1answer
35 views

How to do basic auth to acces external url and advoid System.HttpResponse[Status=Forbidden, StatusCode=403]

I have a basic auth which I have working with Postman but when I do this with apex I get an Forbidden error. The variables userKeyVal and userSecretVal are filled correctly, my url is correct and I ...

1
2 3 4 5
54