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
4
votes
2answers
125 views

Deleting a Mobile Connect instance of a contact only (without deleting the entire contact)

The current deletion framework that was added last year does deletes entire contacts. A contact deleted this way is deleted from: All Contacts All Subscribers Mobile Connect I have a problem where ...
0
votes
0answers
20 views

Unable to Post Data to Salesforce in UAT Servers

I have created a api request to post form data to create a lead in salesforce. First I requested authorization key to insert data to salesforce (Using oauth,client id and client secret.) This works ...
2
votes
1answer
530 views

Can i get report data which is visible to a particular user via salesforce analytics?

I've gone through Salesforce Analytics Rest Api and implemented an apex class which will make rest call services/data/v32.0/analytics/reports/<reportId>?includeDetails=true and get report data ...
0
votes
1answer
2k views

Invoking REST callous in batchjob?

i'm getting the records from third party in sfdc cases. for that i have developed a rest callout.but i'm stuched at for calling third party records i invoked in endpoint url in my rest callout like ...
6
votes
1answer
4k views

RestResource Class: Set the HTTP Response Status in APEX

We have exposed an Apex Class as a Rest Resource. It is a HTTP Post class and broadly it has the following logic: Get parameters to create a new Account Validate if existing database if it is a ...
-1
votes
0answers
14 views

I am trying to do integration with clicktime and calling $batch Endpoint, when I am trying using postman I am failing how to sent request [on hold]

This link show below body https://support.clicktime.com/hc/en-us/articles/360002884071 --dj8bjmwejx9h4j2zwbgawzmsqy930poik9pm Content-Type: application/http; msgtype=request POST /v2/TimeOffRequests/...
0
votes
1answer
18 views

Quote Calculator plugin doesnt seem to be firing at all

I have a requirement that, whenever we click 'edit lines' button on Quote object the price of the products selected needed to be updated in realtime from SAP. I have created a Custom script JScode ...
0
votes
0answers
22 views

Journey API Entry Source - EventDefinition Key not found - errorcode 10000

I'm trying to fire one journey though API entry source but I get the error { "message": "EventDefinitionKey 'APIEvent-43f63b4f-02f4-62d2-cc88-c433c5dc0a76' not found", "errorcode": 10000, "...
1
vote
1answer
38 views

How to add Salesforce Id field for records that I am trying to update?

I am trying to update and insert (upsert) a bunch of records into Salesforce. The records are in a json file on my hard-drive. The records are inserted but if they already exist, they need me to ...
0
votes
1answer
761 views

Search for an existing Marketing Cloud contact using REST API

I'm trying to search for a contact by contact key using the SFMC REST API but all I am getting is a HTTP 500. I am using a known contact ID. Endpoint: (POST) https://www.exacttargetapis.com/contacts/...
3
votes
2answers
6k views

Marketing Cloud REST API - GET method to Data Extensions

I'm currently using the POST and PUT methods to add and modify rows in custom data extensions (as documented here) but i don't see anywhere on the documentation nor the stackexchange a GET method to ...
-4
votes
0answers
34 views

Error 401: Unauthorized while getting with JIRA tickets using HttpRequest [on hold]

I'm trying to get JIRA tickets using a HttpRequest and the endpoint is answering with a 401: Unauthorized error. Http http = new Http(); HttpRequest req = new HttpRequest(); req.setEndpoint('https://...
0
votes
2answers
653 views

Read Timeout error while making an API Inbound call to Salesforce

Getting Read Timeout error while making an API Inbound call to Salesforce. Is it possible to check at Salesforce is receiving connections.
2
votes
1answer
1k views

Upload PDF to Content Builder using REST

Has anyone uploaded a PDF to Content Builder using REST? I think this is the Route, just not sure exactly how it works. POST /asset/v1/content/assets I see a few properties: Data object ...
0
votes
0answers
32 views

AWS Signature Version 4 Named Credential doesn't seems like working

I have requirement to fetch a file from s3 server to Salesforce. As a part of Summer'19 release, Salesforce has provided AWS Signature Version 4 protocol in Named credential.From below link I see that ...
0
votes
3answers
40 views

Field is not writeable: User.UserType

I'm trying to test a scheduled Apex class and I have a method that generates fakes users within my test class: List<User> newUsers = new List<User>(); Profile p = [ SELECT Id FROM ...
0
votes
1answer
732 views

REST API - To create/update a row in Data Extension not working

I am using following URL to create REST API request to create/update a record in the data extension: https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/...
0
votes
1answer
50 views

Expose Visualforce instance url for making rest api call

I have started to make a chrome extension for salesforce. I got this link to start off with. https://github.com/mwelburn/Chrome-Extension-Force-SOQL-Popup This is a simple extension which queries the ...
4
votes
1answer
916 views

ForceTK in a Chrome Extension - Cross-Domain Query Issue

I'm fiddling around with writing a Chrome Extension for Force.com and came across the following blog post (http://th3silverlining.com/2013/09/14/developing-chrome-extensions-for-salesforce/). I ...
0
votes
0answers
14 views

How to delete all rows with certain condition using Marketing Cloud Rest API

I'd like to hit a rest API and delete all rows in a data extension. The data extension doesn't have a primary key, but it has a "condition = x". For instance: condition, value x, 11 x, 22 x, 33 y, 44 ...
0
votes
1answer
25 views

Error message in Integration

Error Message REST Method How to create error message for this REST API code, @RestResource(urlMapping='/api/Contact/*') global with sharing class ChildRelatedRecords { @HttpGet global ...
0
votes
0answers
23 views

Updating Metadata of Standard Objects

Good day! I bumped into a question from here. I was wondering if there is a counterpart for this when it comes to Salesforce Standard Objects? Upon reading the answer, it suggests a library which ...
2
votes
1answer
715 views

Get Instance Url with valid OAuth Access Token

How do I get the Instance URL with just a valid OAuth Access Token? I don't have any other information, for example, I don't have the client_id or client_secret. If I make an assumption that the ...
0
votes
1answer
48 views

How to test API integration in marketing cloud?

I have created a API package under Setup -> Installed Packages. I have created API Integration component for the package .I have the below basic details for the component. *Client Id *Client Secret ...
1
vote
1answer
27 views

How to call apex class from force.com sites

I have rest resource class which i am calling from force.com site.. Below is my site url http://partial-sms.cs31.force.com/webhook @RestResource(urlMapping='/webhook/*') global without sharing ...
0
votes
0answers
12 views

ChasitorNotTyping & ChasitorTyping LiveAgent API are working?

We are trying to encapsulate the LiveAgent API using an API proxy, most of the methods are working perfectly but for some of them I am not sure if I am doing something wrong or really the method is ...
0
votes
0answers
15 views

invalid grant authen failure curl call [duplicate]

I am following trailhead web service curl auth I can't get the OAuth to work. i creat app connect curl -v https://login.salesforce.com/services/oauth2/token -d "grant_type=password" -d "client_id=...
0
votes
0answers
25 views

Salesforce Integrations best practice

I need to implement a request that will be sent over a 3rd party (used as tunnel) to SAP. Which mean - Request: SF --> Server 3rd Party --> SAP Response: SF <-- Server 3ed Party <-- SAP ...
2
votes
2answers
216 views

How can a REST Site Guest User trigger a Push Notification in Salesforce1?

I'm using the Twilio API to send SMS text messages to my app via HTTP POST coming into a REST site on my org. When the message comes in, a Message__c record is created and attached to a parent ...
1
vote
1answer
384 views

Querying LeadStatus (including inactive)

It is trivial to retrieve all active LeadStatus values through the REST APIs, but I cannot see a way to pull in the inactive ones. SOQL query to retrieve active lead statuses: SELECT Id, ApiName ...
0
votes
2answers
34 views

Unable to set datetime field in data extension to null; Marketing Cloud Rest API

The field is Nullable and I'm trying to hit /data/v1/async/dataextensions/key:DE_NAME/rows with attached items obj const items = [ { 'Subscriber Key': SUBSCRIBER_KEY, 'Date': null } ] ...
1
vote
1answer
31 views

Set HttpWebRequest to Accept = application/xml

If I am querying using the following, then Function CallSFDCAPI works. services/data/v41.0/query?q=Select+Id+FROM+Vendor__c" I am required get the response in XML format. But how can i get the ...
2
votes
0answers
17 views

Live Chat API: Any guarantee of initial /Messages entry?

When long-polling the Live Chat API /Messages endpoint, the docs indicate that all messages sent between agent/chat visitor are returned in order, from a list of possible Message types. After looking ...
1
vote
3answers
3k views

How to fire Journey API Entry event through AMPscript?

I need to trigger a Double Opt-In Journey process instantly after a Marketing Cloud Landingpage form submit (Smart Capture cannot be used). I'm aware that I could save data in a DE an run an ...
2
votes
1answer
755 views

how to upload contact/lead profile image through REST API?

I have byte array data of user image and what is best way to upload contact/lead profile photo and what is the REST API for uploading the same. I have also social site photo url. is there any API to ...
0
votes
1answer
529 views

Triggered Send Data Extension - Updating without Primary Key

I have the following Use Case. On a third party Website a User can subscribe for a Newsletter with the email address only. The subscription triggers a Triggered Email in Marketing Cloud and writes the ...
0
votes
1answer
902 views

Calling salesforce REST API from sharepoint

I have a sharepoint app in which I call salesforce REST API. I have obtained access_token successfully from the app, (using username-password flow) but when I try to access some resources such as ...
0
votes
1answer
342 views

rest apex api partner access

I posted a question regarding rest apex security best practices. In a nutshell I asked "how to provide partners access to our rest api". As I suspected OAuth was the recommended approach and also ...
0
votes
0answers
20 views

I need to track picklist value chanages from record using event monitoring is that possible

Using Rest api i have tried using work bench /services/data/v32.0/sobjects/EventLogFile/describe This is returing api "picklistValues" : [ ],
0
votes
1answer
2k views

Salesforce REST API using Java

I am trying to make Connect Salesforce with Java using Rest Api. But I am getting authentication Error and status = 400 I followed the all the steps mentioned here : http://resources.docs.salesforce....
5
votes
3answers
626 views

Apex REST response with reserved words

I follow Creating REST APIs And I would like to response data as: { "list": [ { "id": "KH001" }, ... ] } My Class look like this ( everything just work ...
2
votes
1answer
913 views

How do you construct a REST API URI with multiple primary keys?

The documentation for upserting data extension rows by key uses this as an example URI: https://www.exacttargetapis.com/hub/v1/dataevents/key:SomeKey/rows/Email:someone@exacttarget.com. Let's say ...
1
vote
2answers
1k views

Inserting attachment in REST API

I have a rest API that takes many different parameters. One will be a list of possible different attachments (images, pdf, etc.). They will come base64 encoded already. With that being said, what's ...
0
votes
0answers
49 views

Apex callout yields “Ending position out of bounds: -1” error

This is my vf page <apex:page controller="AccountRest"> <apex:sectionHeader title="Accounts" subtitle="List View"/> <apex:pageBlock> <apex:pageBlockTable value=...
5
votes
1answer
1k views

Live agent chat in bottom corner of page, not popup

We're implementing a Salesforce LiveAgent chat for a customer, and they want the chat to appear in the bottom right corner of the page, in a layer, not a popup. My question is: is this even possible ...
1
vote
2answers
369 views

Any replacement of chatter API for Download URL e.g. “/services/data/v32.0/chatter/files/06917000000XXXXAAA/content?versionNumber=1”

I want to download the file or ContentDocument using non-chatter REST API. I have explored that we can download any ContentDocument or file by using following kind of chatter REST API (which is ...
0
votes
1answer
18 views

Web service end to end testing

Background: I have created a lightning quick action button, when i click the button, the apex controller makes a GET Http callout to a 3rd party web service. The web service returns a JSON, and ...
0
votes
2answers
38 views

Parsing Array of Nested JSON Objects

I am trying to parse an array using Apex that contains nested json data from an external REST API call. The code is shown below, the response comes back, but I want to get at the keys/fields in the ...
1
vote
1answer
1k views

Uploading a file to Chatter - REST API

I'm trying to upload a file to Chatter files using the REST API but I'm getting the following error : Binary data included but file attachment information is missing. If providing rich JSON/XML ...
0
votes
1answer
47 views

Exporting of and capturing changes on a large set of records

We have to load the entire Salesforce Lead data(this data might be millions records)to external system using Bulk API. Once all the data loaded and we thought to initiated to catch the added/modified/...