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
1
vote
1answer
37 views

Converting SOAP callouts to REST callouts

I am completely new to this Integration concepts. I did the trailheads around the Apex Integration Services and Lightning Platform API basics. These trails are pretty straight forward with source URLs,...
3
votes
0answers
28 views

Marketing Cloud API - Contact Delete Request's status enum

I'm trying to use the delete request API (https://developer.salesforce.com/docs/atlas.en-us.mc-apis.meta/mc-apis/ContactsDeleteStatus.htm) However I could not found any documents regarding the status ...
-2
votes
0answers
25 views

How to get the list of SObjects which are show during creating of workflow rule? [on hold]

I want to fetch the list of Sobject which are shown while creating Workflow rule.I want to fetch this object with REST API.
1
vote
1answer
22 views

Future class error - First error: Argument cannot be null

I have a requirement where I need to send JWT token as a part of my request body. I have created a JWT class and an Apex rest class to acheive the required scenario. Below are the classes Apex Rest ...
-1
votes
0answers
35 views

Regarding blank space in named credentials url for Integration

I am doing integration between Salesforce and AWS S3 using named credentials. When I'm setting endpoint as callout:Named_Credentials_Name/File_Name, I am getting error if File Name contains any blank ...
2
votes
1answer
18 views

SObject tree/SObject collections composite api limits

With regards to standard composite API (containing up to 25 subrequests) we have information re: API consumption here; https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/...
0
votes
0answers
8 views

Unable to Find Custom Notification Types ID

Even though my environment is in api version 46.0, custom notification types does not appear as in the docs. The sObject does not pop up when queried via Workbench (same query as a recent mothership ...
-2
votes
0answers
30 views

Create Dynamic Keys for REST response

I am looking for some guidance how to create dynamic keys for REST service payload. So the incoming request could be /services/apexrest/<Object>?startDate=2019-01-01&endDate=2019-04-30 ...
-1
votes
1answer
13 views

Update customerKey of Content & Data Extension in Email Send Definition for a Transactional Message [on hold]

I created an Email Send Definition for a Transactional Message and I need to update the Email Content as well as the data Extension Customer Key. I created it via API as described in this ...
1
vote
0answers
17 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
15 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,...
1
vote
2answers
50 views

SF Bearer Token behaves differently for different REST API Methods

I'm currently dealing with an authentication issue with two different Salesforce REST API endpoints. We are trying to consume the API from inside a Visualforce page in a Salesforce community. To do ...
1
vote
0answers
85 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
23 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
18 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
15 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
0answers
22 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
35 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
1answer
42 views

How to upload an image as a binary file via the Linkedin API v2 with a 'POST' request

I want to know how to make a proper 'POST' request to upload an image as a binary file to Linkedin via their API. This is what they say in their documentation (https://docs.microsoft.com/en-us/...
0
votes
1answer
25 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 ...
0
votes
0answers
36 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
36 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
27 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
2answers
33 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
1answer
37 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 ...
0
votes
1answer
39 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}/...
0
votes
1answer
33 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
17 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 ...
1
vote
1answer
42 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 ...
1
vote
1answer
41 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 ...
1
vote
1answer
34 views

Upserting Person Accounts using External IDs in Contact object

I am trying to upsert a record in Salesforce using the REST API. My endpoint looks something like this https://demoaccount--dev.my.salesforce.com/services/data/v45.0/sobjects/Account/...
3
votes
1answer
30 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 ...
0
votes
1answer
42 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 ...
2
votes
1answer
37 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
12 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
1answer
58 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 ...
2
votes
2answers
37 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:...
1
vote
0answers
21 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 ...
1
vote
0answers
35 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
71 views

REST API for firing a Triggered send

I am trying to use the REST Call to fire a triggered send. My Package is a Server to Server and I am using the V2 for authentication and i get a bearer generated. When I actually do the POST Call ...
2
votes
1answer
131 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; } ...
0
votes
0answers
17 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
43 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
57 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
0answers
26 views

Google Direction api is giving bad response [closed]

From today morning we are receiving bad response from direction api in Salesforce: Here is the response : // normal response waypoint_order: Array(23) 0: 3 1: 9 2: 8 3: 10 4: 19 5: 21 6: 22 7: 1 8: ...
1
vote
0answers
20 views

Web Server OAUTH flow without user interaction [duplicate]

I am trying to access Salesforce resources , through another application using an integration user. There is no user intervention to click/approve/allow the authentication. All needs to happen through ...
0
votes
1answer
48 views

STATUS_CODE returned for the response: 403 STATUS_MESSAGE returned for the response: Forbidden

Can someone please guide me how to resolve the access forbidden 403 status code error ? What can i do to at least hit the end point? I am executing the code anonymously in developer console string ...
1
vote
0answers
30 views

Rest API Call to enter contact into a Journey failed with Not Authorized Error

I am trying to insert a contact into a Journey using Fire event Rest API call. Article I refereed: https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/postEvent.htm I ...
0
votes
1answer
57 views

using oauth2 web app in marketing cloud

i have a web app authenticated app, i manage to get an auth code, after which i get an access token but when i use the access token i get 403 with no explanation. this is the url i use to get the ...
1
vote
0answers
59 views

What is needed to call SQL Server Stored Procedure from Salesforce? [closed]

I've been asked to call a Stored Procedure from Salesforce. What is needed to call SQL Server stored procedures from Salesforce?