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
2answers
37 views

How to List all Custom Objects from Salesforce API?

I'm currently working to use the Salesforce REST API to get a list of all Salesforce Custom SObjects without including System or Standard Objects (like how the /services/data/vXX.X/sobjects/ does). ...
0
votes
0answers
21 views

Marketing Cloud Api Error

I am also facing same problem. not able to figure this out. Also i gave all the permission inside installed package. please help me My request Host: https://MY_SUBDOMAIN.rest.marketingcloudapis.com ...
0
votes
0answers
22 views

Possible to check if user has enabled API access through rest or soap endpoint?

I have an application where the user is signing in through oauth2, I would like to somehow validate that the signed in user has access and can use the REST API in their organization, is there an ...
0
votes
0answers
15 views

simple salesforce IndexError: list index out of range with bulk API [closed]

I am trying to pull the data from Opportunity object in SalesForce using bulk API. My query looks like this: opportunity = sf.bulk.Opportunity.query('SELECT Id, Name, LeadSource, Probability from ...
1
vote
1answer
18 views

Download Attachment using php is not working for xlsm files

I'm using the below php code to save the Attachment to my server. public function getAttachmentFileFromSalesForce($fileName, $fileBodyUrl) { try { $authCode=''; $...
1
vote
1answer
31 views

Problem in displaying in LWC data from Rest API

While working with an api, I get the response in the APEX debugs, but was unable to display data in LWC. APEX: public with sharing class myReportController { public static String Response { get; ...
0
votes
1answer
34 views

How to jenerate JSON format using wrapper class?

Please see the below code I have done some modification, @RestResource(urlMapping='/instructionsRestCall/*') global with sharing class InstructionsRestService { @HttpGet global static List ...
0
votes
0answers
24 views

Rest POST request API error : 401 Authorization Required [closed]

Apex class: public class ReviewRequest{ private config__mdt config = [Select Client_Id__c,Client_Secret__c from config__mdt where DeveloperName = 'mymetadata']; private final String clientId = ...
0
votes
0answers
22 views

Using username password callout using NameCredential

I am able to make an apex callout by passing the username and password in the request body. public class RestCallout{ private String rootPointURL ; private static HttpRequest HTTPREQUEST = new ...
0
votes
1answer
49 views

Marketing cloud - how to send a transactional SMS via API

I want to send an SMS after the user places an order. I found this article: https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/transactional-messaging-get-started.htm. ...
-1
votes
0answers
19 views

I am getting the Error 400 Not a multipart request

I am struggling from last week and getting same error please help me I am trying to upload pdf on the third party system I am using session id and URL to upload to PDF, It is working fine on Postman ...
0
votes
0answers
28 views

Enhanced External Services and a REST API that wants header parameters

External REST API with its OpenAPI definition: "paths":{ "/":{ "post":{ "summary":"Sends phone number for validation", "description":"", "...
0
votes
1answer
27 views

You have uncommitted work pending. Please commit or rollback before calling out. Apex Batch

I have a little problem with my batch: List<String> idList; public My_Batch(List<String> ocIdList) { idList= ocIdList; } global Database.QueryLocator start(Database.BatchableContext ...
2
votes
1answer
62 views

Multipart form data uploads only the first file when using HttpFormBuilder ( try with given RestEndpoint and Anonymous Apex)

I am using the same solution as Daniel provided : When I use the below method to upload file, one by one, it works fine, jpg, pdf, docx anything. But when I try to upload multiple files using the ...
0
votes
0answers
22 views

Salesforce to Telegram integration [closed]

I am trying to integrate Salesforce to Telegram API. As I go through some of the blogs. I found that there is a BOT APT through which we can achieve that. But I am stuck how to add someone in a ...
-1
votes
0answers
15 views

org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! byte Ef in state 2

I am Uploading Pdf file please help me, I am getting the error org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! byte Ef in state 2** public static void uploadFile(Blob ...
0
votes
0answers
15 views

How to get the complete forecast information using REST API? [closed]

I have followed the reference "https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_forecasting.htm" to get the complete forecast information. But I am not ...
1
vote
1answer
43 views

How to create multiple contacts with account's external id using standard REST API?

I need to create multiple contacts in single REST call with account's external id using standard REST API I'm able to create contact with account external id using below rest URL but it does not ...
1
vote
0answers
27 views

Forgot Password Interstitial Page [duplicate]

I am facing the following problem, which may be a result of my misunderstanding of the whole concept. Let my try to explain. We use one community. The community users have in their profile the flag ...
-2
votes
0answers
58 views

respSystem.HttpResponse[Status=Unauthorized, StatusCode=401] [closed]

Hello I am tring to upload attachment in a website using apex rest I am using session id and url to upload this. This is working fine in postman with sam sessionid and end point URL But not working ...
0
votes
2answers
25 views

Re Purpose Connected App and API Only User

An External App, lets call it App A makes a REST API call to Salesforce for Candidate Account. (Account: RecordTYpe = Candidate) I have - Create a Connected App 'External App A', Created an Apex ...
0
votes
1answer
20 views

can i call my apex class by just the url

Here is my ( i have tested with workbench and it does work) URL to call : /services/apexrest/ContactUpdatetService.SetContactInactive my json: { "contactId":"1234", } Can I just call it by doing ...
0
votes
1answer
30 views

Can't create assets outside parent folder via Fuel SDK

I'm trying to create assets using the Marketing Cloud PHP Fuel SDK, and I'm running into a problem where the assets are being created (as in, I can retrieve a list of assets and see the assets I've ...
1
vote
1answer
32 views

Apex REST does not support multipart/form-data requests

From salesforce I Need to expose a webservice to accept pdf/txt files from Mule and once I receive I need to store in Salesforce as an Attachment. However, from Postman while trying to hit as below I ...
0
votes
0answers
18 views

I cant able to get more code coverage cant able to parse json deserilalize code [duplicate]

I am inserting multiple invoice and invoice items at using post web service REST API Bulkinsert_InvoiceInvoiceitems class @RestResource(urlMapping='/InsertInvoiceandInvoiceitems/*') global ...
0
votes
0answers
9 views

How to download the image behind a DocumentId from a soup's property using the iOS mobile SDK

I have to download the image which is represented as a DocumentId property in a soup. I'm very confused about the different ways which worked in the past but maybe will no longer work today. I was ...
0
votes
1answer
29 views

How to pull data from SQL Server 2016 to Salesforce [closed]

Basically I need to fetch data from SQL Server 2016 and insert fetched data into salesforce. Can we do it by writing Salesforce REST API or Web Services API without using any third party tools or ...
0
votes
1answer
32 views

Update Vote of KnowledgeArticle With API

I have come up with a specific requirement, wherein I need to update the vote(Like/Dislike) of the guest user on the knowledgearticle published in salesforce from any API. I researched and found ...
1
vote
0answers
17 views

How to automate sending DocuSignenvelope [closed]

In Our Org, DocuSign is being used to send documents for esignature related to an Opportunity. Currently, the users have to manually do the following steps which need to be automated for which I need ...
8
votes
1answer
125 views

Can API access be limited to only via Apex classes?

We are building a product that offers two routes to the back-end data: JSON calls to @RestResource Apex class APIs LWC calls to @AuraEnabled Apex classes Is there a profile setup that keeps these ...
1
vote
2answers
34 views

Is there a way to pass parameters other than sObject fields for inserting record in Salesforce Standard REST API?

I am looking for a way to pass key-value in salesforce rest API payload for inserting a record. By using below rest API. /services/data/v47.0/sobjects/Account/ And access those key-value pairs in ...
0
votes
1answer
31 views

Salesforce Data Extension POST/PUT Data Using JSON

I tried to POST method to create a new record in salesforce data extension. I am using following method POST /data/v1/async/dataextensions/key:MYEXTERNALKEY/rows In header I am passing content-...
1
vote
0answers
22 views

CreatedById Doesnt Work

I am currently developing an external application that uses the Salesforce REST API to consume. The POST method to the endpoints /services/data/v47.0/sobjects/ContentNote&& /services/data/...
2
votes
0answers
42 views

Duplicate management: Insert Account Id of duplicate record in API REST Response

I'm planning to integrate an external website with Salesforce. In Salesforce I used Matching and Duplicate rules in order to block the creation of new duplicated PersonAccount and those rules work ...
0
votes
1answer
22 views

JSON Deserialize Error : Expected '[' at the beginning of List/Set

Im trying to deserialize a JSON to object. The JSON response looks like this : { "o_gpid": 2000000237, "o_bilreq": "BR-0000000371", "o_netrv": "3603000000", "o_ucogs": "3120900000", "o_ntgp2": "...
0
votes
0answers
49 views

Trying to create Account on sandbox environment

Account creation does work on production, but I am trying to create tests on the sandbox. I am using ruby library to do this called restforce. As this error is not restforce related I am posting here,...
1
vote
0answers
17 views

Analytics unable to get all reports

I am using the end point below to retrieve all available reports to my profile. https://eu9.salesforce.com/services/data/v41.0/analytics/reports However I am only able to get the following, which is ...
0
votes
1answer
30 views

REST Api Contracts and Documentation

I'm integrating with an external system, they will be able to send a POST request through REST API and create records of a custom object I've created in my org. I need to send to the client the ...
0
votes
0answers
17 views

Close Salesforce Job Not working via Bulk API

One of my sandboxes was recently upgraded with some security patches and now I have noticed I am unable to close jobs via the Salesforce Bulk API. I am doing a patch on /services/data/v43.0/jobs/...
0
votes
1answer
26 views

Need to get distance between source (latitude and longitude) and destination (latitude and longitude) using google API

Hi I need to calculate the distance of the first location to the second location using google MAP API but I am getting this Error [System.HttpResponse[Status=OK, StatusCode=200]]. I have tried the ...
0
votes
0answers
39 views

Query Images by PublishedURL or ObjectID via REST API

I am trying to retrieve Marketing Cloud assets via the REST Marketing Cloud API. I am trying to query by fileProperties.PublishedURL or ObjectID but it is returning 0 items. When I remove the ...
0
votes
0answers
22 views

Salesforce Marketing Cloud - Azure connector

We have a requirement to transfer data from a data extension to Azure. I had a look at the following documentation https://docs.microsoft.com/en-us/azure/data-factory/connector-salesforce-marketing-...
0
votes
1answer
24 views

Connecting to Salesforce in .Net Standard 2.0

The fundamental problem I have is we need to connect to Salesforce under .Net Standard 2.0. This means we cannot use the Web Reference as it uses the System.Web group of classes and they are not in ....
0
votes
1answer
62 views

How to enter date and lookup field into an object

I rewrote the code, through anonymous works. I only have a problem with the date and field Log__c (lookup). public class ExampleExchange { @AuraEnabled public static List<Exchange_Rate__c> ...
0
votes
1answer
29 views

How to return message webservice

I have the following webservice and want to return a message to the user but this is not working. I would like to return the message: Sorry no match Webservice @RestResource(urlMapping='/...
0
votes
1answer
31 views

How to test webservice trough workbench

I have a webservice and want to test this in workbech but get the error: [ { "errorCode" : "NOT_FOUND", "message" : "The requested resource does not exist" } ] webservice @RestResource(...
0
votes
1answer
22 views

How to expose webservice through domain

I am setting up an webservice which needs to be accessible from outside. I have created a domain and have my class a public. How do I give acces to the object? Apex @RestResource(urlMapping='/...
0
votes
1answer
25 views

DateTime Format Outputting Wrong Time

I am currently building an external web application using MVC. I need to format the DateTime to match Salesforce's format so I can push it up via API endpoints. The DateTime picker in my View works ...
1
vote
0answers
97 views

LWC Template saying object array undefined

I am trying to produce a LWC that displays a custom data that I get through a series of steps, but is saying that the objects in the array are undefined and I cannot pass them into the template. ...
1
vote
0answers
22 views

How can i returned access token for partner community user (external user) from connected app? [duplicate]

In my organization i have two users(Salesforce license user, Partner Community license user ). Here i am accessed over a connected app using postman. The access token is returned for Salesforce ...

1
2 3 4 5
52