Questions tagged [rest]

The REST API provides a powerful, convenient, and simple Web services API for interacting with Force.com.

Filter by
Sorted by
Tagged with
0 votes
0 answers
33 views

Unexpected character ('�' (code 65533 / 0xfffd)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')

I am making a POST call and receiving a 200, but getting the below error when I try to parse the response. The call works in Postman and I can read the JSON response. I am guessing its related to the ...
Cincopation's user avatar
-3 votes
1 answer
30 views

What exactly is the use of all the annotations in apex rest class [closed]

Apologies if this sounds too noob but am trying to understand what exactly is the used of all the annotations like @HttpGet,@HttpPost,@HttpDelete,@HttpPut and @HttpPatch in apex rest class. The ...
Aniket Srivastava's user avatar
0 votes
0 answers
50 views

Zentitle and Salesforce

Has anyone used REST with Zentitle? I'm having a problem authenticating. They give some examples in Java, but apparently I'm failing with converting them to Apex... This is the example code I'm ...
Florida Hippy's user avatar
2 votes
1 answer
457 views

404 URL No Longer Exists with REST API Call

When submitting a GET request with either Postman or boomi, I receive the following 404 error. ‘You have attempted to reach a URL that no longer exists on salesforce.com’ In either tool, I can get the ...
cmims's user avatar
  • 23
-1 votes
0 answers
18 views

PATCH /contacts/v1/contacts Not Update The Contacts Attributies Sometime

I have a SSJS Code, Which have QueueMO request and Update Contact Rest API request. Once i got the result OK in QueueMO function, the next code is Update Contact step (this one: https://developer....
Selvamoorthi C's user avatar
0 votes
0 answers
28 views

Sforce-Auto-Assign header not having any apparent effect on assignment

I can't get the Sforce-Auto-Assign header to kick in when I'm creating a new Case: resp = self.session.post(f'https://domain.my.salesforce.com/services/data/v60.0/sobjects/Case/', json=data, ...
user145214's user avatar
0 votes
1 answer
22 views

Inbound and Outbound calls question

Can we make an outbound REST SYNC call when receiving an inbound REST call? External system 1 calls Salesforce Salesforce calls External System 2 Salesforce returns to external system 1 the answer of ...
stackusiastic's user avatar
0 votes
1 answer
41 views

How to load (image) file using REST API using Acces Token in authorization Bearer?

Using an access token I can successfully receive Query responses. Now I would like to load an (image) file URL using the same method, but it returns a 302 redirect with JavaScript code to redirect (I ...
Z0q's user avatar
  • 59
0 votes
1 answer
58 views

Workaround for Offset limitation

I am currently working on setting up REST service in salesforce where in consumer can pass few parameters based on which there is logic to build and combine SOQL results and send in response Sometimes ...
sf_user's user avatar
  • 2,250
0 votes
0 answers
34 views

REST Web Service problem: /apex/FileNotFound

I built a REST Web service to create a custom record everytime a call is made in a calling app. Json is sent to the web service via webhook. So far all the tests I did in sandbox were succesful and ...
Sebastian C's user avatar
0 votes
0 answers
35 views

Test method throws Script-thrown exception during multi-endpoint callout [duplicate]

I have a test method that is throwing a Script-thrown exception at the line where a callout is being made. I am not sure what is the problem, I am using a mock class and validating which endpoint is ...
Mauricio.Ramos1979's user avatar
1 vote
2 answers
102 views

JSON.deserializeUntyped Error : System.JSONException: For input string

I have a simple REST API call sent from apex class, I a trying to handle the response body with the bellow code: String jsonPayLoad = '{"Accts":[{"Name":"ABC","Exp&...
Raphael D's user avatar
  • 574
2 votes
0 answers
25 views

Integration User license: restrict access to specific fields on a standard object [duplicate]

I would like to give an API user^ the least necessary permissions to interact with (particularly edit) objects. Ideally, I would enable only the fields they need to be able to edit. First I tried ...
Matthew's user avatar
  • 121
0 votes
0 answers
69 views

'activityInstanceId' field on execute request of a custom activity and where to find it in journey history?

I have a custom activity that uses activityInstanceId field from request as unique id for each request. I now need to somehow connect that id that I save on my side to contact for which activity was ...
mradovcic's user avatar
0 votes
0 answers
68 views

Create and populate custom object in Salesforce

I have built a custom survey system, and I would like to see the option on saving the results in Salesforce, on a custom object. In general, the object will have the following fields: Start date (...
Stratos Nikolaidis's user avatar
0 votes
2 answers
231 views

Nested query works in salesforce inspector but not in request with query in url

I'am trying to get(request) Accounts with some informations from child called Services__c. When im performing query in inspector it works fine SELECT Legal_Name__c, Name, BillingCountry, (SELECT ...
B.G's user avatar
  • 13
0 votes
0 answers
25 views

I want to update part of an email in SFMC using restAPI

I am looking at updating only part of an existing email using the following Rest API call. https://et_subdomain.rest.marketingcloudapis.com/asset/v1/content/assets/ I am able to update all the content ...
Ahmed's user avatar
  • 11
0 votes
1 answer
144 views

Getting data extension eventDefinitionKey and Id

I'm creating a journey through the journey REST API. I want to add a data extension to that journey. To add a specific data extension, as far as I can see, I need the data extensions ...
Thor Christensen's user avatar
1 vote
1 answer
86 views

Test Coverage issue for a simple rest-service class

Just get started with Trailhead but got stuck with one challenge. It requires you to write an apex class to implement a REST GET service to retrieve an account and associated contacts. Then you have ...
user9035826's user avatar
-1 votes
1 answer
612 views

How to download a PDF file which is present in Salesforce using Rest Callout

I have to create a RestResource apex class which should let the user to download a pdf from salesforce. I have written the following code, but I am not sure how to proceed further to let file ...
Dilipan Manoharan's user avatar
0 votes
1 answer
359 views

Proper way to store a .pdf from a REST callout using ContentVersion/ContentDocument

I am working on an integration where I am provided a URL + document ID, which should send back a .pdf, I retrieve it using a GET, and then I take the blob of the pdf and create a ContentDocument and ...
Chris's user avatar
  • 51
-1 votes
1 answer
597 views

Access to fetch has been blocked by CORS policy - LWC

I'm having the following error once I try to do a POST in an outside link of my Salesforce org, So, I've already added this URL to the "CSP Trusted Sites" and the "Remote Site ...
André Rödel's user avatar
-1 votes
2 answers
71 views

Accessing the Deserialized JSON list's values and modifying the null values

I have deserialized a JSON data into a list.I want to access the null values present in the list for any wrapper variables and modify it to an empty string. Deserialization Code: lstSeeds = (List<...
Hira Khan's user avatar
0 votes
0 answers
30 views

REST - Journey with DE as trigger

In my app i have a api call which creates a new dataextension through the soap API. When that is done I want to create a new journey with that DE as a starting source. I'm able to create the journey, ...
Kriss's user avatar
  • 1
0 votes
0 answers
196 views

Login Rate Exceeded - external service calls Salesforce using client_credentials

Introduction: We have an external Java service that communicates with Salesforce instance. There is a connection using OAuth2.0 client_credentials. For this purpose we have created connected app. Use ...
mwhere's user avatar
  • 1
-1 votes
1 answer
1k views

Update multiple records at once - REST API Call

Requirement is to update a single record at once, for which I am using a simple PATCH request using REST. The request is being made from an external platform Sample: URL: /services/data/v56.0/sobjects/...
Akshay Srivastava's user avatar
0 votes
1 answer
97 views

Salesforce CMS Search Rest API Cannot Work

We got an error about CMS search by Rest API We run this url in workbench, always report errorCode: MISSING_ARGUMENT message: Specify a Library. /services/data/v57.0/connect/cms/items/search?...
Robert Guo's user avatar
0 votes
1 answer
707 views

Composite API to delete multiple records by an external id

I have been looking for an example of what @sfdcfox suggested for this thread https://salesforce.stackexchange.com/a/332678/133263 "The first subsequent would be a get, the second the delete call&...
Lena Razov's user avatar
0 votes
0 answers
440 views

Delete ContentDocument through REST API permission

I'm trying to delete a ContentDocument, added as attachment in an Account, throught REST API. I'm able to retrieve the ContentDocument, Get the Document Data (requesting ContentVersion as described ...
Leto's user avatar
  • 556
-1 votes
1 answer
355 views

How do I send a Callout after a DML operation and return the data to Flow [duplicate]

I'm new to Salesforce and I am struggling to resolve an issue with Apex. What I want to do is create a flow that activates daily and sends a GET request to an IAP protected server (I can't just use ...
Arthur Santos's user avatar
0 votes
1 answer
334 views

How to use Web Server 2.0 OAuth flow with new "Salesforce API Only System Integrations" profile user

I am using recently announced Salesforce Integration license user for an integration using Web Server 2.0. As per the Web Server 2.0 flow, I need to first obtain the Authorization Code. To get the ...
user36778's user avatar
  • 646
-1 votes
1 answer
56 views

RestResource HttpGet close new tab

I'm currently trying to work with an integration with an external API (Lansweeper). When trying to authenticate the API, I'm running into an issue where they authenticate through an external url (...
Kevin Yao's user avatar
  • 117
0 votes
0 answers
56 views

Securing API access to Salesforce from a custom mobile app

Custom mobile application sends requests to a custom REST web service on Saleforce. The request contains an external ID, which is saved on the Contact standard object along with customer data. This ...
DevelBase2's user avatar
1 vote
1 answer
205 views

Most Appropriate HTTP Method for Query with Optional Upsert?

I have inherited a REST endpoint that has one key action it performs, named find. This action will generally just query for any matching resources, rank them, and return the most favorable result. ...
Adrian Larson's user avatar
  • 150k
-1 votes
1 answer
175 views

Batch Import ContentVersion data via the REST endpoint

I am trying to upload a large amount of photos for Salesforce via the /sobjects/ContentVersion REST endpoint. Currently I am able to use this endpoint to upload one photo at a time. Is there a way to ...
EchoNano's user avatar
  • 101
0 votes
1 answer
477 views

How To POST Request To PHP Endpoint And Process Values

I'm trying to send data from Salesforce to an endpoint hosted on an external server. The endpoint is written in PHP that will insert a new record into an external MySQL database. I've got the ...
joshholloway's user avatar
-1 votes
1 answer
1k views

Casting from a JSON body to a List of a specific Object

I am trying to convert JSON, which is something like this: [{"_id":"55d66226726b611100aaf741","replacement":false,"quantity":5,"name":"Generator ...
ApexNoob's user avatar
1 vote
1 answer
1k views

Salesforce Platform API Versions 21.0 through 30.0 Retirement

I received an email "Salesforce Platform API Versions 7.0 through 30.0 Retirement". I am new to my org and I managed to see the list of installed packages, I then run a query to get the list ...
Valentina Novara's user avatar
0 votes
0 answers
297 views

Salesforce : How do we block a User from using query with Rest API?

We are integrating an External System (Drupal) with Salesforce . The corner case being , A user who may get access to the shell of the server the Drupal Instance is running , may have access to all of ...
Salesforce Girl's user avatar
0 votes
1 answer
201 views

Nested Json not detected

I'm trying to parse a nested JSON through a REST Api but somehow it is not getting read. For example: I'm passing a JSON like this in my request body. [ { "first":"I like sfdc", &...
Accredo2442's user avatar
1 vote
1 answer
87 views

Salesforce retirement from v21.0 to v30.0, generated ApiTotalUsage file from eventlog files, how to know where the resource is used

I have generated ApiTotalUsage file from eventlog files. I followed the steps mentioned in this article and generated the ApiTotalUsage file https://help.salesforce.com/s/articleView?id=000389618&...
user125558's user avatar
0 votes
1 answer
236 views

Issues with SOAP API login callout

I have the following piece of code that used to work before: Custom_Data__c cData = [SELECT Password__c, Security_Token__c, Username__c FROM Custom_Data__c WHERE Name = :Constants....
Alin Paraschiv's user avatar
0 votes
1 answer
188 views

Authentication for Google DocAi Api in Apex

We try to integrate the Google Doc Ai https://cloud.google.com/document-ai/docs/drag-and-drop to send pdfs and receive parsed texts. I am struggling with the authentication in Apex for the Api call. I ...
N4go's user avatar
  • 1
0 votes
2 answers
217 views

JSON Exception "Illegal value for primitive" obtained during response parsing

I am calling a Webservice which returns the following as JSON response. **REST Response** : {"totalRowCount":1, "hasMorePages":false, "data":[ { &...
Varun's user avatar
  • 3,093
0 votes
2 answers
579 views

Custom fields not being saved

I'm using propertybase to create contacts via salesforce (it uses apexrest REST API) and I followed this guide: https://help.propertybase.com/hc/en-us/articles/360003180752-WebToProspect-REST-API I'm ...
Gabriel Costa's user avatar
1 vote
0 answers
33 views

How to use an Integration User with a REST site: documentation request

My app is a Lightning native Twilio integration that uses a REST site to receive data from Twilio. I would like to run flows that are triggered by data created by these incoming http POSTs. However, ...
PatMcClellan__c's user avatar
-1 votes
1 answer
94 views

Condition not checking after adding error condition in postman

I have created apex class to update existing records, and I am adding error code, but record is updating when I run it in postman. But if I miss any parameters, I have to show error which is given in ...
user116229's user avatar
0 votes
1 answer
183 views

Create opportunity record in target org from source org

My company is using two different Salesforce orgs (org1 and org2). I have a custom object in org1, called Tender__c. I want an automation to create an opportunity record in org2 when the Tender__c in ...
Marjan's user avatar
  • 15
2 votes
0 answers
1k views

REST API: retrieving a report with more than 2000 rows

We are working with the Salesforce REST API to fetch reports. When fetching more than 2000 records from a report how does the pagination work? Is there any querystring parameter to append to the URL ...
Platoscave's user avatar
0 votes
1 answer
328 views

After Establishing connection from external system to Salesforce getting error

We have created a standard callout class to establish a connect between Salesforce to SMIT system, and then we have provided our Salesforce credentials (like clientid, client secret etc). They ...
user116229's user avatar

1
2 3 4 5
18