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.

5
votes
0answers
81 views

Issue with receiving HTTP with Content-Type:application/x-www-form-urlencoded

I've faced a strange issue during my development related to the API. My goal was to create a web service that will receive POST requests from different sources. First service: It passes all the ...
0
votes
2answers
48 views

to access username field using LoginHistory Object

I am trying to access Username field (which is present in User Object) Using LoginHistory Object as follow: SELECT+Username+FROM+LoginHistory but is shows below error: [{"message":"\nSELECT ...
0
votes
0answers
24 views

Parameters in Rest API Callout url

I have a requirement to pass parameters which acts as filters in the rest API callout from salesforce. The url is https://pmobilet.electra.co.il/odata/Priority/tabula.ini/elecisr/ELC_SMAXPART?$...
1
vote
2answers
47 views

REST api - Update email and status subscriber into AllSubscribers

I am studing the api call to insert/update (upsert) one or more subscribers both in a dedicated data extension and AllSubscribers at the same time. I found this api calls: - https://developer....
0
votes
1answer
25 views

JSON structure in Salesforce?

How would i store this kind of JSON structure in salesforce? "elementOne": [ { "itemOne":"valueOne", "itemTwo":"valueTw0", "embeddedElementOne":{"embeddedItemOne":"embeddedValueOne"}, ...
0
votes
0answers
16 views

Connection from Android mobile sdk to the Einstein Vision Services

i am looking for a way to send Rest-Requests to the Einstein Vision Rest-API via Android. The integrated RestRequest class somehow only supports Requests to the Salesforce Platform and doesn't let me ...
0
votes
0answers
14 views

Salesforce REST API Call to an External API (IdentityServer3) Login Error

I have a project where I need to connect to an API to get data. I tested the API in postman and I'am able to get data, but when I try to connect from Salesforce I having a problem in authentication. ...
0
votes
1answer
26 views

Using getRESTAPISessionKey from Lightning Container

Does anyone know how to properly call into RESTApi using LCC.getRESTAPISessionKey()? For example from https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/...
1
vote
1answer
33 views

Is there a better rest endpoint for downloading file contents?

I'm trying to use https://[domain]/sfc/servlet.shepherd/version/download/ to download files (lightning files not attachments) from salesforce and it works sometimes and I can get it to work in postman ...
0
votes
1answer
36 views

Apex Rest API : Is it possible to support accept parameter with “plain/text”

I am trying to implement a webhook from a 3rd party application (Eventbrite) using a Custom REST API in Salesforce.The issue here is that 3rd party API uses "Accept: text/plain" parameter in their ...
2
votes
1answer
125 views

How to retrieve records from data extension of different business unit using AMPScript REST API call and also how to insert record

I am using this call in AMPScript To retrieve: https://www.exacttargetapis.com/data/v1/customobjectdata/key/[Data extension key]?$filter= Name%20eq%20'Test' To insert: https://www.exacttargetapis.com/...
0
votes
1answer
66 views

How to post a financial force sales invoice

We are working with the Salesforce REST API for interacting with an installed FinancialForce package. This process has been mostly painless right up until we needed to POST an invoice. The apex ...
0
votes
0answers
20 views

generate request to upload file via rest api axway

I a creating an rest api at apex class to post a file upload but each time i am getting an Bad request, i have tried everything but still no breakthrough. Here is my code as using the blob method to ...
0
votes
1answer
32 views

Deploying Metadata with rest resources

As of API 43 there seems to have been some rest resources added to the metadata api. This Documentation Seems to be lacking the ability to tell me how they want me to send the zip package with the ...
1
vote
2answers
62 views

Send multiple json message

I try to send multiple message using REST to this url : https://www.exacttargetapis.com/messaging/v1/messageDefinitionSends/key:{key}/send. My json look like this : [ { "From": {}, "To": { ...
0
votes
0answers
19 views

Help me with Test class for REST API POST method . not able to cover this part of code [duplicate]

CallOut Method: public static void callout(String jsonString, String jsonStringWS, List lstId){ //do callout here rest or soap System.debug('jsonString>:'+jsonString); System....
1
vote
1answer
29 views

Retrieving enterprise WSDL via SOAP API endpoint?

Is there an endpoint to retrieve the enterprise WSDL file via salesforce (SOAP) API? All I found is the option to retrieve it via standard curl request but I would expect that there is an official ...
0
votes
1answer
34 views

Metadata Rest API for custom objects

Is it possible to create and update custom objects using rest? I seen different questions that suggest it isn't yet available without using a client or SOAP but I need to be able to access it through ...
0
votes
2answers
39 views

Rest API Composite - Error 302

I am using Composite API to get the opportunity record but facing 302 error { "compositeRequest" : [ { "method" : "GET", "url" : "/services/data/v42.0/query/?q=select+id,...
1
vote
1answer
24 views

How to enable read permissions for organization sobject?

I'm trying to use the salesforce standard rest api to access the organization sobject so I can read the name of an organization I'm working with. I make a soql query "SELECT Id,Name FROM Organization ...
0
votes
0answers
26 views

Record Lock Issue for REST endpoint

I have built a REST endpoint, which writes data(Accounts) to Salesforce. Currently, for a single record, there could be multiple (20-30 times) upserts within 1-to-5 seconds. Behind the scenes, it's a ...
0
votes
1answer
26 views

WB REST API POST

I need connect an application with salesforce. This aplication will send data to the system, and salesforce work with them. In this case, in the third application, user choose products. When user ...
0
votes
0answers
22 views

Associating Knowledge articles with categories using REST API

The SOAP API suggests that articles can be associated with categories using Article Type__DataCategorySelection. I can't find information about using the REST API to do this and I've had no luck using ...
1
vote
1answer
30 views

React Mobile App & Salesforce [closed]

We are building a Mobile App (using React Native) which will allow users (of Persona-A) to login via External Identity Provider. We have another set of users (Persona-B) who login to Salesforce Custom ...
1
vote
2answers
66 views

API post call returns lots of addition text

https://api.ivr-platform.com/api/token-auth after submission this doesn't return just the json object but the entire webpage with a json object in the text. public without sharing class ...
-1
votes
1answer
20 views

Creating and populating reports through api [closed]

Is it possible to create and populate a report using data that isn't in salesforce already? Like populating a table? Please give an example/source if you can.
3
votes
1answer
390 views

Salesforce opportunity stages

Is that possible to get the stage name, probability and forecast category using SOQL/Apex/APIs ? and I could not find that you can pull that data.
4
votes
0answers
21 views

Calling the UI Api from a community with a custom domain name - getting sun.validator exception [duplicate]

Context: we're using the UI api to get some Record Type dependent picklist values back. This is happening in a community context. In the lower environments (dev, QA) this works without issue. The ...
0
votes
0answers
109 views

Getting 400 bad request with Salesforce API at User creation

I used this payload to create a user on Salesforce. But the response contains a 400 Bad Request message. I'm using salesforce version 45.0 and use WSO2 Identity server as the provisioning client. This ...
0
votes
2answers
193 views

How to call a third party api from salesforce

I am into a integration project and its new to me, till now I have share the standard Salesfroce REST API, apex class to get and post data from third party website. Now the third party webite as a api ...
0
votes
0answers
16 views

Create Salesforce Community User using Rest API [duplicate]

I am trying to figure out if it is possible to create a Salesforce Community User using the REST API. I would use a kind of Site.createPortalUser() method to create the Account, Contact and User in ...
1
vote
0answers
28 views

Current currency mode of an salesforce org

Ran into a scenario where an org enabled advanced multi currency and populated records and decided to switch back to basic currency. They didn't delete records in the DatedCurrencyRate table after ...
0
votes
2answers
120 views

Lookup field in restApi

I try to make a restApi call for create. One field in this Object is a lookup field. How is the syntax to make an api call with a lookup field in the iOS Salesforce MobileSDK? I tried: request = ...
0
votes
0answers
19 views

ISO 8601 date/time parsing incorrectly from API input

I have a REST API pushing data into a Marketing Cloud data extension and SFMC appears to be transforming it to the system date/time vs the original input from the API. eg. I have a record with an ...
0
votes
1answer
54 views

How to check for duplicates while creating a record via Salesforce API

I have a usecase where users need to create Lead via Salesforce API. The use case is when user tries to create lead, the system checks if the lead or contact already exists with the same information. ...
3
votes
2answers
87 views

Is there a way to identify all the places a Content Block is used?

I'm trying to identify all the places a Content Block is used. The goal is to be able to reference what will be affected if a Content Block is modified. I've looked a the Asset in the REST API, but I ...
0
votes
4answers
31 views

How to find the schema for a sobject

I am trying to build an API which under the hood will perform CRUD operations against the Salesforce API. I'm using the node-salesforce library for communication with Salesforce. An example of ...
0
votes
1answer
32 views

First error: You have uncommitted work pending. Please commit or rollback before calling out [duplicate]

I am getting this error while running the batch. Any way to fix this. thanks global class FileImpoLog implements Database.Batchable<sobject> { global Database.QueryLocator start(...
0
votes
0answers
38 views

Export report to excel template

I am trying to export/download a salesforce to an excel template. The template should be formatted with design and columns similar to the columns in the report. The template is stored as an attachment ...
0
votes
1answer
20 views

Connect SFDC with Other App, and this App with SFDC

I need send information to other aplication, and this application will send me the result. In my case, we have a community with opportunitys. When the Opp is closed, user can click on a button that it ...
0
votes
3answers
84 views

How to write SOSL IN query

I've following SOQL query - SELECT Id, Name, Email, Account.Id, Account.Name FROM Contact WHERE Email in :emails Here emails is a comma separated list of email ids. Can I write the same query in ...
1
vote
0answers
10 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, ...
1
vote
0answers
58 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
50 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
15 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
23 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
67 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
40 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
38 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
30 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<...