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
0answers
7 views

REST API: Last email sent/received

Using the REST API I'm trying to pull, for a certain contact, when was the last date of email communication with them - last email sent to them. My logic was to query a contact's activity history, ...
0
votes
0answers
46 views

How to use ampscript from Marketing Cloud to make a callout to salesforce rest api?

Anyone know how to use ampscript from Marketing Cloud to make a callout to salesforce rest api? The REST API I need to call from ampscript is listed below: /services/data/v45.0/query?q=SELECT ID , (...
1
vote
1answer
43 views

Issue while creating Apex class using API

I'm using REST API to create Apex Class in Salesforce org. It worked in my testing for multiple orgs, but for a customer I'm getting this error - Can not create Apex Class on an active organization. ...
0
votes
0answers
13 views

Salesforce REST API Update Order

I am trying to update an order, using the REST API. What is wrong with my request? POST https://na82.salesforce.com/services/data/v30.0/commerce/sale/order/8011R00000AHdHkQAL?_HttpMethod=PATCH HTTP/1....
0
votes
1answer
17 views

Generate JWToken from salesforce using Consumer Secret

I am trying to connect to an API and based on their requirement, JWToken is required to make a call and the JWToken must be signed using the provided consumer secret. Now, they have a sample code in ...
-1
votes
1answer
57 views

Retrieve subscriber status changes via API

I need to get the information about subscriber status change using SFMC API. Is there an API call that can get current status of subscriber along with the date on which the status was last modified? ...
0
votes
0answers
23 views

Create dynamic rest api url in apex

I have a requirement where I have 4 fields in which a user will fill phone numbers. On clicking save it will make a Rest API call. The 4 phone numbers have to go in an array in the URL as shown below. ...
0
votes
1answer
27 views

Rendering Visual Force page as PDF via the REST api

The documentation suggests that a Visual Force page can easily be rendered with apex: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_output_pdf_render_in_apex.htm // ...
0
votes
1answer
24 views

Access values from Object retrieve by REST callout

I'm retrieving this response from a REST callout for Layouts and I want to access a current key of this Object: This is how I managed response: Map<String,Object> tokenResponse = (Map<...
2
votes
1answer
132 views

Execute Apex on Record Load Trigger?

I am working with a custom rest api that connects to our billing service, We are wanting to, when we load a salesforce record, for it to execute an apex script. We want to use that script to query ...
0
votes
2answers
29 views

Catch block code coverage for @HttpPost and @HttpGet REST API

I have some code in my catch block for both @Post and @Get methods. I need to cover catch block to get to 75% for GET, got catch block covered for POST Here is an example : // POST my JSON : [ ...
0
votes
0answers
40 views

Could not get any response using Postman

I have been making a post call to Account from postman but I am unable to create a Account. But I am successfully create a push Topic.
0
votes
1answer
52 views

Marketing Cloud Rest API and Business Units

We have our main BU (business unit) at the top of the tree, and one of the other BUs is TEST. In TEST we have created an Installed Package and in that installed package we have added a Server-to-...
2
votes
1answer
24 views

Unable to fetch complete records from bulk query batch result

I am using simple-salesforce python library using REST to call bulk services which is working fine till calling but for large dataset library continuously poll the batch status and spit all result (in ...
0
votes
2answers
43 views

What sourceApplicationExtensionId should I pick when I create event definition

We are building an application that should be distributed in the Salesforce AppExchange. Part of it is allowing the marketer to trigger journeys based on a custom event that we provide, something we ...
0
votes
1answer
17 views

How to use an external API in formula field

I'm trying to create a formula field wich use an external API in one of my object. I'm trying to GET the number of followers of an instagram account directly in the formula field. To do that, I ...
0
votes
1answer
47 views

Not getting access token to call Rest API from postman

This is my request URL https://login.salesforce.com/services/oauth2/authorize?client_id=**clientId**&client_secret=**clientSecret**&redirect_uri=https://localhost:8443/RestTest/oauth/...
1
vote
0answers
43 views

Better error messages for bulk API calls

When using the REST Data Event, and posting multiple records to a DE, there is a behaviour which is becoming an issue when designing an integration. If we are posting e.g. 10 records, and 1 of them ...
0
votes
1answer
49 views

Salesforce Marketing Cloud : Fetch Email data via REST vs SOAP

I am part of an organisation that is building data pipeline for salesforce marketing cloud customers to help analyse their data. One of our customers has recently shifted from using Classic Email to ...
0
votes
1answer
57 views

Replacing Salesforce Marketing Cloud Connect with REST API

We are currently using Salesforce Sales and Marketing Cloud which are connected using Marketing Cloud Connect. However, we'd like to circumvent the Marketing Cloud Connect limitation of 15 minutes ...
0
votes
1answer
69 views

Named credential for gotoWebinar app (oauth v2.0)

Is it possible? I'm trying to do it but had some errors My steps where: 1) Create the app in the Developer Center. On the Application URL I left the suggestion https://api.getgo.com (I guess this ...
1
vote
1answer
40 views

SMS Concatenation and MobileConnect API

I'm working with MobileConnect to create notification text messages that will be triggered through the API. Further, there can be multiple notifications per contact/mobile number for an individual ...
1
vote
1answer
23 views

Configure client-side logging

Have a third party SFDC developer who built the Marketing Cloud (MC) connector and wrote the post strings to create records in MC. Recently, I discovered that several emails of our customers were ...
-1
votes
1answer
34 views

Deploy files from one Org to Another [closed]

I have an object that has a 'Files' list in the 'Related' tab and have attached a Microsoft Word document to that list in my testing org. Is it possible to deploy that file so I don't have to manually ...
2
votes
2answers
141 views

Variable is not visible

I have this variable which returns key from custom settings. below is the code related to this private static String AccLinks { get { if (Acclinks == null) { ...
0
votes
0answers
12 views

Picklist value added to Inactive values list if i create new value from rest API?

I have one pick-list field called type if i gave new value to type pick-list field it's creating the value in field but it is in active.I am creating record Throw REST API.How to make this active ...
0
votes
1answer
16 views

Title attribute of <a> in FeedItem is replaced by null

I posted several FeedItems using Salesforce Rest API but the title attribute of <a> tags in rich texts were not working correctly for me. For instance, POST /sobjects/FeedItem/ { "...
0
votes
2answers
25 views

Freezing and De-Activating a Salesforce Service Cloud User Account Through the REST API

I'm trying to use one of our existing enterprise user administration tools to also provision and manage Salesforce Service Cloud user accounts using the Salesforce API. I am able to provision a user ...
0
votes
2answers
51 views

I am not getting refresh token on outh2.0 using Connected App in salesforce

I created one connected app in Salesforce. I am doing every time two callout one for outh2.0 and another for actual apexrest callout. I want to avoid outh2.0 callout every time. The following solution ...
0
votes
1answer
41 views

Salesforce Marketing Cloud Rest API : Interactions endpoint is forbidden

I have been trying to do curl request to hit journey endpoint : curl -H 'Accept: application/json' -H 'Authorization: Bearer **Token**' -A 'Jersey/2.25.1' 'https://www.exacttargetapis.com/interaction/...
0
votes
0answers
12 views

Creating public ContentVersion via REST API on behalf of someone else fails

I am creating simple interface for posting new Case feed posts (FeedItem objects). These posts are created by admin on behalf of other users (altering the CreatedById field). I'd like to support also ...
1
vote
1answer
25 views

Suppressing password generation when creating community user with API

I want to use the Salesforce API (REST or SOAP) to provision new Community Cloud Users. I have successfully invoked the API and created the user account, however the transaction automatically ...
0
votes
1answer
70 views

API event error - Event Definition Key not found

I have 3 journeys and when trying to connect from my website to the journey I receive the following error: { "message": "EventDefinitionKey 'APIEvent-1843bf88-e9aa-f083-95cf-e49409ff3ea0' not ...
0
votes
1answer
80 views

Debug logs for failed REST API calls

I'm debugging an issue where our customer's iOS app (which makes REST API calls to Salesforce via the SDK) is encountering data sync errors. We believe the API is returning error messages but they are ...
0
votes
0answers
47 views

Marketing cloud new Transactional Messaging API

In the last Marketing Cloud release there is the new transactional messaging API option (https://developer.salesforce.com/docs/atlas.en-us.mc-apis.meta/mc-apis/transactional-messaging-api.htm). ...
0
votes
1answer
47 views

Marketing Cloud new Transactional API - Error while activating definition

My MC account just got enabled on the new transactional email API which was "released" a couple weeks ago. I'm following the documentation here. The POST to create the definition returns returns an ...
0
votes
1answer
33 views

how to provide username and password in test method for REST API

apex.runtime.impl.ExecutionException: pad block corrupted if (req.headers.get('username') != null&&req.headers.get('password')!=null && Authorization.decrypt(req.headers.get('...
2
votes
0answers
58 views

What does 'scope' mean in the context of a Salesforce report? Where/how is it specified? What are the possible (API) values?

There is a method called getScope() in ReportMetadata Class. Can someone please shed some light on what 'Scope' actually means? Where/how is it specified? What are the possible (API/system-digestible) ...
0
votes
2answers
49 views

How to authenticate REST API without going through login page?

I would like to allow end-users that do not have access to Salesforce directly to be able to make orders (a custom object) by submitting a form from a web page. I would have thought making a simple ...
1
vote
1answer
220 views

Marketing Cloud REST API “Not Authorized” error in Postman

Am doing a POST REST API call out from Postman to insert a record in Data extension. Below are the steps: Step 1: POST --> https://s50.auth.marketingcloudapis.com/v1/requestToken Body --> { ...
-3
votes
1answer
28 views

SOQL Query -REST API [closed]

I would like to know if it is possible to insert or update records using a SOQL query in the REST API. thanks
1
vote
1answer
31 views

How to read the error from the response given by Salesforce

I have an api that has a catch method: catch (Exception e) { // Error System.debug('API - ERROR: ' + e.getMessage()); res.responseBody = Blob.valueOf('ERROR: ' + e.getMessage()); res....
1
vote
0answers
60 views

Display a PDF in Salesforce from Blob data

For our project, we need to get a PDF via API from an external private filestore, and display it within a Lightning Component. With the blob that is returned, if I set that to the src of an iFrame, it ...
1
vote
0answers
44 views

ExactTarget REST API - Cloud Pages & Collections

I've successfully used the available REST API in order to create various assets in Marketing Cloud / ExactTarget, like HTML Emails, Templates and Landing Pages. The email assets are visible under the ...
1
vote
2answers
109 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 ...
0
votes
1answer
25 views

Best way to store a value easily editable by apex

I want to store a text value that I can easily modify using apex. I want to use it to change the behaviour of a visual flow depending of the value in this field. I think about custom metadata type ...
0
votes
1answer
54 views

pad block corrupted apex Crypto

I am facing an issue while decryption of value which is stored in custom setting. When i encrypt and decrypt value at same time then i that error is not thrown, if i get the value from custom setting, ...
0
votes
1answer
29 views

System.QueryException: value of filter criterion for field 'CreatedDate' must be of type dateTime

Below my code, I want to pass date value as a parameter but I facing an error as below, message: System.QueryException: value of filter criterion for field 'CreatedDate' must be of type dateTime and ...
2
votes
2answers
21 views

See Event Logs of other users

We're currently blasting through our SFDC daily API limits and I wanted to see who is causing it. As per the trailhead I went into the Event Log File viewer they offer (salesforce-elf.herokuapp.com) ...
0
votes
0answers
23 views

How to send data which increases after the base64 encoding?

I'm trying to send an attachment through api call, my file size is 4.5mb which increases to more than 6mb after base 64 encoding. and it start throwing error of 6 mb limit which salesforce support for ...