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
16 views

How to get info about which sobject a report refers to?

I have a few reports based on subjects (e.g. Opportunity, Lead, Account) and need to get info about these subjects. I tried to use url: GET "/services/data/<version>/analytics/reports/<...
0
votes
1answer
39 views

PATCH request, always get 404 Not Found response

I am trying to update a value on my Salesforce record and integrate the date in another system using the Rest API. I am unable to do this using the PATCH request workaround in apex. Booking__c ...
0
votes
1answer
25 views

Not able to view attachment in salesforce, when uploaded through Multipart Rest API

Below is the code which I'm trying to insert attachment through API not sure what is wrong, when I try to open 'Failed to load pdf' error comes or if I send image type file then that also doesn't open ...
0
votes
1answer
49 views

To retrieve email Id for an email in MC using Rest API [closed]

Please can anyone suggest how to retrieve email Id for an email in MC using Rest API Regards, Shiva
1
vote
0answers
30 views

HELP API Callout error uncommitted work pending for bulk update

I created a batch class that calling an API and then update the records. This batch running every 5 minutes. And there`s a custom button, if I click that custom button, the batch will run only for ...
-1
votes
1answer
50 views

How to parse Json response and insert Record in apex? [duplicate]

I need to read the json response(response will be for one record) from Rest API and need to insert record in salesforce. I tried using below, but unable to get fields. Json response: "Vehicle":[ { ...
0
votes
0answers
14 views

REST Endpoint vs sobjects Endpoint

I want to get my understanding right on API Limits. Currently to update an object from an external application we are hitting the below endpoint. /services/data/v44.0/sobjects/CustomObject__c/...
0
votes
1answer
34 views

Future methods do not support parameter type of Map<Id,SObject>

I am calling a method from a trigger that makes an external rest api post call. I am creating my json like this and trying to use the setBody() method, but getting an error and I am not sure how to ...
0
votes
1answer
67 views

how to get more than 2000 records rest api

I am trying to get more than 2,000 records from salesforce using Rest Api. /services/data/v47.0/queryAll/?q=Select+Id,XXXX__c,CompletedDateTime,XXX__c+from+task+WHERE+CreatedDate+>+2019-10-20T00:...
5
votes
1answer
197 views

Authorize Apex Rest API call using an Azure token

I'm new to the OAuth concept in Salesforce and looking for some pointers for my use-case. I'm not even sure if I'm framing my question correctly, but I'm trying to understand if I can invoke an Apex ...
0
votes
1answer
34 views

Is it possible to execute with different URL from endpoint of custom activity?

Is it possible to call execute URL from different endpoints? For example, I set the installed app and set custom activity with the endpoint as https://some-endpoint.com/ for the message. For your ...
0
votes
1answer
42 views

What is the correct format in mulesoft to update a date datatype field in salesforce through upsert API

I have tried the date formats listed in the Salesforce documentation for updating a date datatype field from Mulesoft into Salesforce but they all have been rejected as invalid for datatype. I tried ...
0
votes
1answer
27 views

Using Named Credentials with Password Authentication Protocol

I'm trying to make a callout using named Credentials and my Authentication Protocol is Password Authentication. But I'm getting Unauthorized status. I'm not sure if I'm missing any parameter or ...
0
votes
0answers
30 views

How to authenticate to a salesforce instance and make an API call on submission of a form?

I'm essentially using a basic HTMl, CSS, Javascript form to have my potential customers submit their interest to my site, and I'd like to have the form make a call upon submission to my Salesforce ...
0
votes
0answers
17 views

REST API in new instances not working… existing instances fine

We've got some .NET apps that connect to salesforce REST API through a connected app. We created a new full sandbox from production but the REST API won't connect with the error {"error":"...
0
votes
1answer
87 views

How do I go about adapting / updating this API trigger to work on both record Insert and update? (Currently it only works on record creation)

I'm just getting to grips with Apex and trying to get an API working with Open Weather Map API. Currently, the API Trigger I use only runs on record creation and it works great. But, I would also like ...
0
votes
0answers
53 views

How do I get return value (success or fail) when executing custom activities

I'm currently working custom activities on Journey Builder - however, I had troubles with getting response values after execution is done. [Expected] 1. Journey Activates 2. Execute custom activity 3....
3
votes
1answer
268 views

REST API Callout LWC

I have created an LWC with a REST API call to grab data from and external DB. The data is fetched successfully and then rendered in the component. I would then like to create a record based on the ...
0
votes
1answer
52 views

How do I use REST API on a Trigger to populate account fields

I'm new to working with API's and code in general, I have been challenged to create an API to collect data to input into Salesforce records, this will be invoked by a trigger. Currently, I'm running ...
2
votes
1answer
33 views

REST API GET FIELDS IN ARRAY

Hello guys i want to get Json array in fields, I created 1 php file in a server and this php file to bring JSON data for the Product Informations, And after i wrote 1 apex code in Execute Anonymous ...
0
votes
1answer
51 views

How to send authorization to web app using Rest API [closed]

This is my first time working with API and I'm trying to understand how to send authentication to an web app using REST API. Questions I have: Do I need to setup Oauth in Salesforce in order to ...
0
votes
1answer
37 views

Web 2 lead latitude and longitude values are not inserted

I'm using a Web2Lead form, and on submit pass all input values. But when I try to insert latitude and longitude values, they are not inserted in SF record. I'm try to use different ways, but still no ...
0
votes
0answers
33 views

how to get picklist value in Rest API

I am new in salesforce, I want know how to get the custom picklist value from REST API, I get the all the picklist from below API $this->instance_url//services/data/v38.0/sobjects/Opportunity/...
0
votes
1answer
30 views

Spam filter REST API Data Extension

Does anyone know whether Marketing Cloud uses some spam filter for REST API calls? I am currently implementing an API request on a website form which will upsert rows in a Data Extension in Marketing ...
0
votes
0answers
23 views

Determine if a record update is performed via REST API? [duplicate]

Our use case is to relax validation rules in cases where the update is made from an external system. Each user authenticates individually so unfortunately we cannot look for an API user.
0
votes
1answer
28 views

Retrieve Data Extension based on ObjectID using SOAP API

Using the Marketing Cloud API I'm trying to programmatically determine the fields in an event definition. So... I can start with the ID of the journey and get the journey definition with /...
5
votes
1answer
84 views

UI API within LWC as an ISV. What should be the approach when wire adapters are not feasible?

I have a lightning web component that needs to call UI API. I can't use the LWC wired adapters because the 'getRecordUi' does not take the "childRelationships" parameters like the 'record-ui' endpoint ...
0
votes
1answer
33 views

How to limit response from Attachment endpoint using SOQL (LIMIT not working)

We're working on a data driven application at the moment and are attempting to return a list of Attachment Id's. Right now our SOQL query is effectively: SELECT Id FROM Attachment WHERE ...
2
votes
0answers
41 views

REST API Calls Consumption in Marketing Cloud [duplicate]

If 1 million records are pushed into a data extension via REST API, does this count as 1 call or would it consume many calls?
3
votes
1answer
145 views

Consent Management in Marketing Cloud - Difference between hasOptedOutTracking and DoNotTrack

I would like to honor the GDPR customer request : I do not want Marketing Cloud to track my messaging and online behavior. For that and according to the documentation here : https://help....
0
votes
1answer
8 views

How to limit Articles List results by category group

I have many Articles. They all belong two one of two Category Groups, which we will call Old and New. I can retrieve a paginated list of public knowledge articles like /services/data/v44.0/support/...
0
votes
1answer
33 views

Tooling API response, how to print in log?

I’m trying to print (system.debug) the response returned from tooling API but the debug is not displaying anything. So, I was wondering if the code below is correct. HttpRequest req = new HttpRequest(...
2
votes
0answers
26 views

Content BUILDER API bulk edit

It's possible to use API to bulk edit files in Content Builder? What about classic content? If so, is there an already built product that does that? In particular I would like to replace part of a ...
0
votes
1answer
61 views

Using REST API to check if contact key exists in marketing cloud all contacts?

Is it possible to use marketing cloud rest api to check if contact with specific key exists in all contacts without any contact data creation or modifications? I tried to search rest api ...
0
votes
0answers
104 views

How do I populate Salesforce records using REST API to collect data for updating

I'm new to working with API's and code in general, I have been challenged to create an invocable Apex class that calls a rest API to collect data to input into the Salesforce record that invoked the ...
0
votes
0answers
14 views

Set header and add header in rest Class

I have below class which i need to test it from workbench/postman. I am not sure how should i test it . @RestResource(urlMapping='/CheckAuth/*') global with sharing class example1 { @HttpPost ...
1
vote
2answers
120 views

File content missing error while creating transient document on adobe sign using REST API

I am trying to create transient document in adobe sign using rest api. After lot of research I was able to make the correct multi form request in Salesforce Apex.But now I am getting the file content ...
2
votes
4answers
81 views

Querying Apex Classes & Dependent Test Classes

Does anyone have any advice on how I can go about querying test classes and dependent test classes? Our Org is getting very large and finding the correct test classes for each class is becoming an ...
0
votes
2answers
36 views

REST API & NPSP error: FIELD_CUSTOM_VALIDATION_EXCEPTION

I have NPSP v3 set up in Salesforce and am using the REST API to create a contact record. I am inserting fields [FirstName], [LastName], [Email], [Phone], [MailingState], [MailingPostalCode], [...
0
votes
0answers
26 views

REST API Returning Error “system_down” with description “system may be currently unavailable”

I am using Salesforce's REST API to perform operations like GET Opportunity, DELETE Contact etc. I am using Salesforce's free Developer Edition. Occasionally the API returns the following error: { ...
0
votes
0answers
18 views

Multiple sequential calls to API [duplicate]

I am having trouble figuring out a way to make multiple calls in order to an external API. The task is currently successfully working using javascript but I need it to work via apex for a large (200 -...
0
votes
2answers
87 views

How to Generate Access Token Using Ampscript

Updating my question with new error code. I tried the below code to generate Access Token. But I am keep getting an error. orted_grant_type","error {"error":"unsupported_grant_type","...
0
votes
1answer
79 views

How to convert Salesforce contentversion to actual file

I have created a rest API that returns the list of opportunities as well as files attached to the opportunities. I am able to call the API and retrieve the data via POSTMAN. This is the code: @...
0
votes
1answer
151 views

REST API error: Primary key '(primarykey)' does not exists

I am trying to upsert a row into a triggered send data extension with a synchronous call, but I am receiving the following error message: { "message": "Primary key 'Email' does not exist.", "...
0
votes
1answer
53 views

How to capture the request/response body of the standard REST API being hit by external systems

I am struggling with a requirement of having a complete logging mechanizm for both inbound and outbound API calls including the actual request body/header and response body. Outbound is covered by ...
0
votes
2answers
133 views

Is it possible to create a REST API in salesforce that returns zip file

I want to expose a REST API to the other website. The REST API in salesforce basically needs to query on Opportunity data as well as Files related to Opportunity, zip it and return it. Questions: ...
1
vote
0answers
16 views

OAuth Authentication for Community Customer User [duplicate]

I am trying to connect from Salesforce an unrelated Salesforce instance through a community user. I can successfully authenticate using Postman, however I am having a bit of trouble converting this ...
1
vote
0answers
42 views

Data Extension List REST API

I want to list the data extensions contained in a specific folder in SFMC using REST API. I have already checked the documentation and I found a way to do it with SOAP API. But we need to do it with ...
0
votes
1answer
13 views

pardot api to return all folder names for all lists

I have a request asking if it is possible via a Pardot rest api call to get a response where it contains the list and the folder it belongs.
3
votes
1answer
88 views

Oauth2 redirect_uri_mismatch except that it matches exactly

So I created a new Connected App in Salesforce - in a sandbox environment. In the app's settings I enabled OAuth with Full access and set the Callback URI to https://test.mydomain.com/tools/...