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
1answer
10 views

Future class error - First error: Argument cannot be null

I have a requirement where I need to send JWT token as a part of my request body. I have created a JWT class and an Apex rest class to acheive the required scenario. Below are the classes Apex Rest ...
0
votes
0answers
6 views

Regarding blank space in named credentials url for Integration

I am doing integration between Salesforce and AWS S3 using named credentials. When I'm setting endpoint as 'callout:/', I am getting error if File Name contains any blank space. I have fixed the issue ...
2
votes
1answer
401 views

REST API: create dependent picklist values

I am aware that it is possible to create dependent picklist values using the Metadata API but I want to use the REST API. I know how to create triggers, classes, and pages but I can't wrap my head ...
2
votes
1answer
13 views

SObject tree/SObject collections composite api limits

With regards to standard composite API (containing up to 25 subrequests) we have information re: API consumption here; https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/...
2
votes
1answer
438 views

Retrieve Security Token via APEX or a better way?

We have developed a portal accessed by users who use our product - a desktop application. In addition to what our desktop app does, it needs to make API calls directly to Salesforce, authenticated as ...
0
votes
0answers
6 views

Unable to Find Custom Notification Types ID

Even though my environment is in api version 46.0, custom notification types does not appear as in the docs. The sObject does not pop up when queried via Workbench (same query as a recent mothership ...
-2
votes
0answers
29 views

Create Dynamic Keys for REST response

I am looking for some guidance how to create dynamic keys for REST service payload. So the incoming request could be /services/apexrest/<Object>?startDate=2019-01-01&endDate=2019-04-30 ...
0
votes
2answers
378 views

Create Subscriber in Exact Target from External Salesforce Org

We have a simple requirement of creating a subscriber in an Exact Target Org from an external Salesforce Org. The requirement is on webpage on click of a sign-up button the user email id will be used ...
1
vote
1answer
397 views

Live Agent Chat Rest API Issue

I have enabled the live agent in sandbox1 and I'm trying to invoke the same from sandbox2 using the Live Agent Chat REST API using the jquery in visual force page.But I'm receiving some errors. <...
3
votes
1answer
459 views

No read access to ProfileId for a User over the REST API

We've been looking up ProfileId from a given user that has OAuth-ed already. Normally they're returning the Id correctly when we call this: /services/data/v28.0/sobjects/User/THEIR_USER_ID However,...
3
votes
1answer
381 views

Error 500 when using Live Agent REST API with prechatDetails

Hello I am developing an iOS app allowing to chat with a service agent using live agent. The app is using Live Agent REST API. Everything was working fine till I added prechatDetails to the ...
-1
votes
1answer
13 views

Update customerKey of Content & Data Extension in Email Send Definition for a Transactional Message [on hold]

I created an Email Send Definition for a Transactional Message and I need to update the Email Content as well as the data Extension Customer Key. I created it via API as described in this ...
4
votes
1answer
445 views

Marketing Cloud REST API - Contact Delete operation is not currently enabled

Tried to delete a contact in Marketing Cloud through the API /contacts/v1/contacts/actions/delete?type=ids { "values": [ "1131976968" ], "DeleteOperationType": "ContactAndAttributes" } ...
0
votes
1answer
512 views

Where Could I find the refresh_token

I found we need refresh token for renewing access token for REST API. But i couldn't find refresh token in response of my request. How can I get refresh token.Here is my code in PHP. $postData = ...
1
vote
2answers
45 views

SF Bearer Token behaves differently for different REST API Methods

I'm currently dealing with an authentication issue with two different Salesforce REST API endpoints. We are trying to consume the API from inside a Visualforce page in a Salesforce community. To do ...
1
vote
0answers
17 views

Post processing slowness on dev org

We have build custom API on slaesforce. This API is call from C# multilayered application. it stats 1000 threads and hit the custom api almost at same time. Salesforce receive and process all this ...
1
vote
1answer
39 views

How to upload an image as a binary file via the Linkedin API v2 with a 'POST' request

I want to know how to make a proper 'POST' request to upload an image as a binary file to Linkedin via their API. This is what they say in their documentation (https://docs.microsoft.com/en-us/...
0
votes
1answer
472 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 an writes the ...
0
votes
0answers
15 views

Getting change data capture events in Python

I am trying to figure out how to subscribe to streaming channel and get cdc events in Python, after success in creating new PushTopic and StreamingChannel. I saw some code examples in Java and NodeJS,...
4
votes
1answer
378 views

possible to access REST API of another SF instance with portal user from scheduled class?

I have a scenario where I'd like a user of another SF instance to register in our portal, then have a scheduled class on their end reach out to a REST endpoint on our end. Upon reviewing the oAuth ...
1
vote
0answers
22 views

How to get all the attributes for a given contact key from data extension based on dataextensionid

We need to get all the attribute values for a given contact key from the data extension. We are trying to find it out via RESTAPI. Is there a way to get all the attributes via dataextension id. I ...
0
votes
1answer
35 views

Retrieving data extension external key via Rest API

Step 1 I am passing the Journey ID in the call to get the data extension ID Get https://xxxxxxxx.rest.marketingcloudapis.com/interaction/v1/eventDefinitions/{5b3c1a00-0bbc-4484-b7be-21234567890} ...
1
vote
0answers
81 views

How to filter attribute set in response

I am querying a data extension Method: GET https://xxxx.rest.marketingcloudapis.com/contacts/v1/attributeSets/name:Test_Journey_4_DataExtension_Copy Response { "id": "xxxxx", "key": "...
2
votes
2answers
514 views

Slow REST API return for first call of day (30s+)

I asked this question on the SF developer site, but didn't hear back. Hopefully, somebody here has seen this before, and can help me out. We have boiled it down to a few cURL calls for ...
0
votes
1answer
23 views

FATAL_ERROR System.JSONException: Malformed JSON: Expected '{' at the beginning of object

I am trying to test a REST API call, but getting FATAL_ERROR System.JSONException: Malformed JSON: Expected '{' at the beginning of object. Why do I get this error? How do I resolve it? Here is ...
0
votes
2answers
18 views

Assets REST API - target specific BU/MID [on hold]

I have successfully downloaded and pushed an asset using REST API; I have my installed package enabled for 2 BU's now; How do I specify a BU/MID in my request?
0
votes
0answers
15 views

Test batch with multiples Callouts - HTTPMock [duplicate]

I have a Class that integrate Api , there are many Callouts in there. And I have a Batch Class that running on functions of this class. My question is about the test class. test class: @...
1
vote
2answers
7k views

OAuth2 token request failing

My access token request is failing with the following error response in HTTP Response. { error: "invalid_client_id" error_description: "client identifier invalid" } I am trying with the Username-...
0
votes
1answer
423 views

How to create Live Agent Chat Invitation with REST API

We need some guidance with the Live Agent REST API Chat Invitation. We scoured the REST API documentation but found nothing to guide us with implementing the chat invitation (Only info for Deployment ...
0
votes
1answer
345 views

If-Modified-Since header not working

I am trying to use the If-Modified-Since header with SObject Describe https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/describe_global_with_ifmodified_header.htm I want to ...
0
votes
1answer
23 views

Is there any way to pop up softphone screen from data coming from REST API?

I have developed Open CTI lightning (softphone) in Salesforce as a pop up for incoming and outgoing call. I am facing this problem as the telephone system vendor they do not have adapter to ...
2
votes
1answer
191 views

Customer Sending an Attachment Live Agent with REST API

I'm trying to integrate my apps with salesforce Live Agent through REST API. I already read the Guide here (https://resources.docs.salesforce.com/212/latest/en-us/sfdc/pdf/live_agent_rest.pdf), but I ...
1
vote
1answer
401 views

Unable to add photoURL through REST API

I am trying to create an contact through REST API and gave PhotoURL with value as twitter photo url. Now, I got the below response. I am unable to find settings to enable this option. Can anyone ...
0
votes
2answers
36 views

Marketing Cloud API CORS problem

I would highly appreciate if anyone could help me in handling CORS policy for Salesforce Marketing Cloud API requests… The situation is following: I need to make direct API calls to Marketing Cloud ...
0
votes
0answers
36 views

Securing endpoint with JWT Token

I have a requirement where I have integrated an external endpoint with Salesforce so that the data will be sent whenever the status of any account record is updated. The POST call is working fine but ...
0
votes
2answers
32 views

messageDefinitionSends: View sent emails in the MC interface

I'm sending emails using this endpoint: POST /messaging/v1/messageDefinitionSends/{triggeredSendDefinitionId}/send While the emails are sent, if I go to the MC interface / Overview, I don't see any ...
0
votes
0answers
27 views

restAPI failure code 401

I use the mobileSDK for iOS and want to do some query on standard objects in salesforce, which I did some times befor. Now I get an error witch the code 401, which mean that this is not authorized. ...
0
votes
1answer
39 views

Unable to distinguish between many rows of the same contact when executing the 'guide/v1/email' REST API call

My question relates to using the undocumented REST API Call Guide in Marketing Cloud. https://www.exacttargetapis.com/guide/v1/emails/{EMAIL_ID}/dataExtension/key:{EXTERNAL_KEY}/contacts/key:{KEY}/...
3
votes
3answers
8k views

Can we create multiple @Http Methods (REST) annotations of the same type in a single class?

In REST API, can we create multiple @Http Methods (for e.g. @HttpGet) annotations of the same type in a single class? i have a need where i need to write more than one get method in the same class? is ...
1
vote
1answer
42 views

Transactional Email API: Emails stuck in Queued status

Follow up to this question I've created a Send Definition, with the key definition_key, linked to the Data Extension data_ext. In this Data Extension, I've got one record, with the subscriber key ...
0
votes
1answer
37 views

How to pass @httppost parameters in apex integration?

I’m trying to integrate two salesforce orgs. How to pass httppost parameters of method from other salesforce org in apex code please find the below codes it tried but I am getting status 400 ...
1
vote
1answer
401 views

ExactTarget — SMS/ POST/message/optin

I'm trying to create a sms opt-in message through rest UI. Below is the JSON request I formed { "messageName":"TESTMESSAGE1234", "shortCode":"86288", "countryCode":"US", "keyword":"...
0
votes
1answer
335 views

Marketing Cloud - duplicate primary key on event data update

I have set up a Data Extension that contains my custom data for Accounts, with a field 'ContactID' that is set as a primary key and mapped to SubscriberKey. I have then created a Journey Builder Event ...
1
vote
2answers
9k views

Read GET/POST parameters in apex class when service is called from external client

I am new to salesforce. I created an apex class and exposed it as a Rest service. I want to post some parameters to that service from an external client(not vf page). One way is I append it to the url ...
1
vote
1answer
466 views

How to send Envelop to signing group. Rest API integration with Docusign

I'm integrating salesforce with docusign API by using REST API. I've to crate the Envelope to send the template, and Template should be sent to Signing group. How can i send Template to signing group ...
1
vote
1answer
40 views

InvalidUrl Bulk API creating a bulk job using postman

URI i'm using is: https://yourInstance.salesforce.com/services/async/46.0/job so in my case example is https://cs89.salesforce.com/services/async/46.0/job but it still says InvalidUrl. X-Session-Id ...
0
votes
1answer
33 views

Customer.io: webhook access_token update

I'm trying to create a webhook from customer.io that will connect to Salesforce via the REST api. As part of that, I need to grab the access_token. This is fine for a while, but the token will ...
0
votes
0answers
17 views

QueryMore (or similar functionality) for custom rest api

We are trying to implement a custom rest api for a custom object which has more than 2000 records. We are doing pagination based on CreatedDate of the records and display 200 records each page. We ...
1
vote
1answer
32 views

Upserting Person Accounts using External IDs in Contact object

I am trying to upsert a record in Salesforce using the REST API. My endpoint looks something like this https://demoaccount--dev.my.salesforce.com/services/data/v45.0/sobjects/Account/...
0
votes
1answer
42 views

How to send multipart formdata from remote function api?

I am trying to build the multipart request on client side itself because to avoid the need to send the files back to apex for processing. Also at a time 10 files needs to be sent via rest api, so ...