The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
5
votes
1answer
514 views

Marketing Cloud REST API - Contact Delete operation is not currently enabled

Tried to delete a contact in Marketing Cloud through the API /contacts/v1/contacts/actions/delete?type=ids { "values": [ "1131976968" ], "DeleteOperationType": "ContactAndAttributes" } ...
0
votes
1answer
618 views

Where Could I find the refresh_token

I found we need refresh token for renewing access token for REST API. But i couldn't find refresh token in response of my request. How can I get refresh token.Here is my code in PHP. $postData = ...
1
vote
0answers
18 views

Post processing slowness on dev org

We have build custom API on slaesforce. This API is call from C# multilayered application. it stats 1000 threads and hit the custom api almost at same time. Salesforce receive and process all this ...
0
votes
0answers
59 views

Getting change data capture events in Python

I am trying to figure out how to subscribe to streaming channel and get cdc events in Python, after success in creating new PushTopic and StreamingChannel. I saw some code examples in Java and NodeJS,...
4
votes
1answer
378 views

possible to access REST API of another SF instance with portal user from scheduled class?

I have a scenario where I'd like a user of another SF instance to register in our portal, then have a scheduled class on their end reach out to a REST endpoint on our end. Upon reviewing the oAuth ...
1
vote
0answers
30 views

How to get all the attributes for a given contact key from data extension based on dataextensionid

We need to get all the attribute values for a given contact key from the data extension. We are trying to find it out via RESTAPI. Is there a way to get all the attributes via dataextension id. I ...
0
votes
1answer
58 views

Retrieving data extension external key via Rest API

Step 1 I am passing the Journey ID in the call to get the data extension ID Get https://xxxxxxxx.rest.marketingcloudapis.com/interaction/v1/eventDefinitions/{5b3c1a00-0bbc-4484-b7be-21234567890} ...
1
vote
0answers
89 views

How to filter attribute set in response

I am querying a data extension Method: GET https://xxxx.rest.marketingcloudapis.com/contacts/v1/attributeSets/name:Test_Journey_4_DataExtension_Copy Response { "id": "xxxxx", "key": "...
0
votes
1answer
49 views

FATAL_ERROR System.JSONException: Malformed JSON: Expected '{' at the beginning of object

I am trying to test a REST API call, but getting FATAL_ERROR System.JSONException: Malformed JSON: Expected '{' at the beginning of object. Why do I get this error? How do I resolve it? Here is ...
0
votes
2answers
38 views

Assets REST API - target specific BU/MID [closed]

I have successfully downloaded and pushed an asset using REST API; I have my installed package enabled for 2 BU's now; How do I specify a BU/MID in my request?
0
votes
0answers
17 views

Test batch with multiples Callouts - HTTPMock [duplicate]

I have a Class that integrate Api , there are many Callouts in there. And I have a Batch Class that running on functions of this class. My question is about the test class. test class: @...
1
vote
2answers
8k 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
455 views

How to create Live Agent Chat Invitation with REST API

We need some guidance with the Live Agent REST API Chat Invitation. We scoured the REST API documentation but found nothing to guide us with implementing the chat invitation (Only info for Deployment ...
0
votes
1answer
418 views

If-Modified-Since header not working

I am trying to use the If-Modified-Since header with SObject Describe https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/describe_global_with_ifmodified_header.htm I want to ...
0
votes
1answer
48 views

Is there any way to pop up softphone screen from data coming from REST API?

I have developed Open CTI lightning (softphone) in Salesforce as a pop up for incoming and outgoing call. I am facing this problem as the telephone system vendor they do not have adapter to ...
2
votes
1answer
258 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 ...
1
vote
1answer
442 views

Unable to add photoURL through REST API

I am trying to create an contact through REST API and gave PhotoURL with value as twitter photo url. Now, I got the below response. I am unable to find settings to enable this option. Can anyone ...
0
votes
2answers
87 views

Marketing Cloud API CORS problem

I would highly appreciate if anyone could help me in handling CORS policy for Salesforce Marketing Cloud API requests… The situation is following: I need to make direct API calls to Marketing Cloud ...
0
votes
0answers
42 views

Securing endpoint with JWT Token

I have a requirement where I have integrated an external endpoint with Salesforce so that the data will be sent whenever the status of any account record is updated. The POST call is working fine but ...
0
votes
2answers
43 views

messageDefinitionSends: View sent emails in the MC interface

I'm sending emails using this endpoint: POST /messaging/v1/messageDefinitionSends/{triggeredSendDefinitionId}/send While the emails are sent, if I go to the MC interface / Overview, I don't see any ...
0
votes
0answers
35 views

restAPI failure code 401

I use the mobileSDK for iOS and want to do some query on standard objects in salesforce, which I did some times befor. Now I get an error witch the code 401, which mean that this is not authorized. ...
0
votes
1answer
41 views

Unable to distinguish between many rows of the same contact when executing the 'guide/v1/email' REST API call

My question relates to using the undocumented REST API Call Guide in Marketing Cloud. https://www.exacttargetapis.com/guide/v1/emails/{EMAIL_ID}/dataExtension/key:{EXTERNAL_KEY}/contacts/key:{KEY}/...
3
votes
3answers
8k views

Can we create multiple @Http Methods (REST) annotations of the same type in a single class?

In REST API, can we create multiple @Http Methods (for e.g. @HttpGet) annotations of the same type in a single class? i have a need where i need to write more than one get method in the same class? is ...
1
vote
1answer
63 views

Transactional Email API: Emails stuck in Queued status

Follow up to this question I've created a Send Definition, with the key definition_key, linked to the Data Extension data_ext. In this Data Extension, I've got one record, with the subscriber key ...
0
votes
1answer
57 views

How to pass @httppost parameters in apex integration?

I’m trying to integrate two salesforce orgs. How to pass httppost parameters of method from other salesforce org in apex code please find the below codes it tried but I am getting status 400 ...
1
vote
1answer
409 views

ExactTarget — SMS/ POST/message/optin

I'm trying to create a sms opt-in message through rest UI. Below is the JSON request I formed { "messageName":"TESTMESSAGE1234", "shortCode":"86288", "countryCode":"US", "keyword":"...
1
vote
2answers
10k views

Read GET/POST parameters in apex class when service is called from external client

I am new to salesforce. I created an apex class and exposed it as a Rest service. I want to post some parameters to that service from an external client(not vf page). One way is I append it to the url ...
1
vote
1answer
538 views

How to send Envelop to signing group. Rest API integration with Docusign

I'm integrating salesforce with docusign API by using REST API. I've to crate the Envelope to send the template, and Template should be sent to Signing group. How can i send Template to signing group ...
1
vote
1answer
106 views

InvalidUrl Bulk API creating a bulk job using postman

URI i'm using is: https://yourInstance.salesforce.com/services/async/46.0/job so in my case example is https://cs89.salesforce.com/services/async/46.0/job but it still says InvalidUrl. X-Session-Id ...
0
votes
1answer
44 views

Customer.io: webhook access_token update

I'm trying to create a webhook from customer.io that will connect to Salesforce via the REST api. As part of that, I need to grab the access_token. This is fine for a while, but the token will ...
0
votes
0answers
19 views

QueryMore (or similar functionality) for custom rest api

We are trying to implement a custom rest api for a custom object which has more than 2000 records. We are doing pagination based on CreatedDate of the records and display 200 records each page. We ...
0
votes
1answer
75 views

How to send multipart formdata from remote function api?

I am trying to build the multipart request on client side itself because to avoid the need to send the files back to apex for processing. Also at a time 10 files needs to be sent via rest api, so ...
0
votes
2answers
676 views

INVALID_FIELD error for soql query on user object using rest api

I have the "View Setup and Configuration" permission but still I am not able to fetch the profileid/isactive on User object I am trying to fetch active user records grouped by profile name using rest ...
3
votes
1answer
38 views

Deployment of metadata via REST vs old style SOAP deployment

So now it's possible to deploy metadata using Rest approach (vs old-school classic and heavy SOAP one): https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_rest_deploy.htm ...
1
vote
2answers
460 views

Pagination or Chunking support for Fuel SDK

My requirement is to retrieve all the data for Exact Target objects. The Fuel SDK supports retrieval of data using both REST as well as SOAP apis. The REST api has pagination support so for objects ...
2
votes
1answer
80 views

Difference between Authorization Code and Access Token [closed]

Can you please explain the difference between authorization code, access token and bearer token? I've been looking for this on Google but didn't clear things for me. From REST API dev guide all I ...
0
votes
0answers
25 views

How to verify certificate in an inbound API call when using Mutual TLS

I have a incoming API call from an external system that uses Mutual TLS. I want to verify if the CA signed cert in the inbound api call to Salesforce is from the right client that has access to our ...
2
votes
2answers
45 views

Which endpoints are supported for OAuth2 token authorization?

Documentation says that for OAuth2 token authorization URL like login.salesforce.com should be used For authorization: https://login.salesforce.com/services/oauth2/authorize For token requests: https:...
2
votes
1answer
193 views

Transactional Email API: TriggeredSend definition not enabled for this route

I've created a Send Definition, with the key definition_key, linked to the Data Extension data_ext. In this Data Extension, I've got one record, with the subscriber key subscriber_key and the email ...
0
votes
1answer
472 views

Unable to authenticate with salesforce standard REST API from a different web page using ajax

I want to connect with standard REST API from a different domain using ajax call. Below is the ajax function I am using. function call_API() { $.ajax({ url : URL, ...
1
vote
0answers
29 views

How can one leverage the Salesforce UI API to create dynamic Lightning components?

Having reviewed the Salesforce UI API, I know it is possible to create custom UIs based on Salesforce meta-data. The use cases that have been shown are front end apps, usually built with React or a ...
2
votes
0answers
258 views

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

I'm working creating a trigger API event in Journey builder from landing pages. I am currently able to get the accessToken using clientId & clientSecret, but then I tried to pass subscriberkey &...
0
votes
1answer
76 views

How to elegantly handle asynchronous pushes from Salesforce to external system via a REST API [closed]

The key word in the question is elegantly; I'm an experienced developer familiar with the mechanics of asynchronous programming, REST APIs, database triggers, programming idioms and design patterns. ...
1
vote
0answers
53 views

File upload to content builder using SSJS API from MC landing page lead to 500 error?

I coded to upload image (png) to content builder from MC landing page form using HTTP.Post of SSJS. once it done, get file url from response to store in data extension. While using this page, ...
2
votes
1answer
146 views

Apex REST API - Unable to set StatusCode to 429

I am trying to set the status code to 429 for Too many request using the code below: if(Limits.getQueries() < Limits.getLimitQueries()){ upsert UpdateData; } ...
3
votes
1answer
443 views

Solution to Tokenized Sending limitations in Salesforce Marketing Cloud(SFMC)

So our Prospect want to implement Tokenized Sending Features because they don't want to store data in SFMC before sending Email/SMS and want to use REST API to push data into SFMC but again they want ...
0
votes
0answers
18 views

How to get Salesforce standard api errors from Salesforce itself?

I need to know is there any way to retrieve Salesforce standard api errors which is using from other services from Salesforce itself? ( Those errors can be missing some parameters or somethings using ...
2
votes
1answer
109 views

REST GET API response does not contain null fields

I have written a REST API endpoint for Account object for GET operation. The code is below - @httpget global static list<Account> doget(){ RestRequest req = RestContext.request; RestResponse ...
1
vote
1answer
164 views

Apex Rest - Api error handling HTTP status codes

I am trying to handle multiple error codes in my REST service. Can anyone guide me if I am doing this correctly. try { if(Limits.getDmlRows() < Limits.getLimitDmlRows()){ ...
1
vote
1answer
416 views

Issue for Create trigger send for cloud portals

Failed to start the selected triggered send(s): A problem occurred Starting the following Triggered Sends. Please contact Customer Service for additional information.Name : NewTestDemo\ External Key : ...