Questions tagged [post]

POST is a request method supported by the HTTP protocol used by the World Wide Web. It is often used when uploading a file or when submitting a completed web form.

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

Is it possible to maintain the order of json string using JSON.serialize? [duplicate]

I have a simple json format that I am trying to practice for the complex format that I am going to make. But it seems like, I'm not able to maintain the order when using the JSON.serialize method ...
Johan's user avatar
  • 1
0 votes
1 answer
35 views

How to send a callout request with Post method using JSON?

According to documentation, the setBody(body) method uses String in the param. But json is a string. If I have a body that I can successfully request using postman with json, how come I'm getting an ...
Kato's user avatar
  • 1
0 votes
1 answer
111 views

Recently started showing Salesforce web api error for V49.0 "The requested resource does not exist". There is no issue in the URL

Salesforce web api GET and POST both were working OK before. Suddenly from today started giving following error. Noticed in the API setup API version is changed but after updating newer version code ...
user2207791's user avatar
1 vote
0 answers
432 views

How to pass JSON data in the REST API URL without misinterpreting double quotes?

Hello Salesforce community, I'm currently working on integrating with a REST API and facing an issue with passing JSON data in the URL. Whenever I try to include JSON data, specifically the provided ...
Avin Babu Pattathy's user avatar
0 votes
0 answers
23 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
62 views

Idiomatic way to call external APIs from Salesforce

I'm new to Salesforce, and am looking for advice on how to best approach a scenario where a Salesforce runtime communicates with an external REST-service that is under my control. My background is web-...
Arne's user avatar
  • 101
1 vote
0 answers
153 views

Single Logout (SLO) API - 400 Bad Request - Illegal character VCHAR='='

This is as part of Single Logout (SLO) implementation. The need is to logout Salesforce Experience Cloud Site when user logsout from java based application. To implement this, below Salesforce ...
Vasanth Subramanian's user avatar
0 votes
1 answer
482 views

Receiving Error in Rest API [closed]

We are trying to send post request to salesforce form different system. But sometimes we get below errors While Authenticating [2022-09-26T12:05:28.935Z] "POST /services/oauth2/token HTTP/1.1&...
SFDCDev's user avatar
  • 29
0 votes
0 answers
642 views

Sending an image as a POST request

I am trying to make a POST request to Eventbrite API to send an image from Salesforce along with other parameters. Under the hood Eventbrite is using Amazon AWS S3 bucket. When I send the request ...
Krishnamurthy's user avatar
1 vote
0 answers
204 views

Chatter post with attachment not visible on record page ( Case Object)

On the Case object, when i try to post a message with attachment (with the Chatter feed component), the message doesnt appear but it's visible in the lightning page builder of the record (there are no ...
Dumas Théo's user avatar
0 votes
0 answers
257 views

Send a post request after an update

I'm trying to send a post request after an update from a record, and then is going to generate a link for the post request, I had the idea to create the post request after an insert using a trigger ...
Gerson Baires's user avatar
0 votes
1 answer
129 views

How to send the ID to new page after insert?

There are 2 pages. I inserted one record into an object with the save button on page 1 and transitioning to page 2, Now I want to get the ID on page 2, what should I do? ID was auto-numbered by object....
Kyo ri's user avatar
  • 9
0 votes
1 answer
151 views

Generate JSON body from Visualforce page [duplicate]

So the objective is to create a visualforce page form that creates a JSON for HTTP post method. I was wondering what was the best way to go about this. '{"listingAction":"sale",&...
Mike Cuming's user avatar
0 votes
1 answer
331 views

Rest API code 400 "message":"Callout loop not allowed" [duplicate]

I tried to call Salesforce Api /services/data/v54.0/actions/standard/createServiceReport in order to create a service report but I got this error : the status code returned was not expected: 400 Bad ...
Ayoub GHAMMAZ's user avatar
0 votes
0 answers
128 views

How to create multiple ApexClassMembers with one call?

According to answer to my previous question, Tooling API objects are not supported in /composite calls. Is there a way to insert a large (let's say 2000) number of ApexClassMembers instead of ...
Bartłomiej Góral's user avatar
0 votes
1 answer
67 views

As a customer user, is it possible to delete own posts with comments in the community?

Is it possible to delete own posts with answers on below as a customer user in the community?
Christian Fortunato's user avatar
-1 votes
1 answer
425 views

System.TypeException: Invalid decimal in Rest Resource @HttpPost

I developed an Apex REST web service in Salesforce with the method 'POST' and i am trying to insert the string value in currency field of Product__c object, so when I try to hit the API im getting the ...
user avatar
0 votes
1 answer
1k views

'System.NullPointerException: Attempt to de-reference a null object' error on test class for @RestResource @HttpPost

I developed an Apex REST web service in Salesforce with the method 'POST' This is my main class public class Product { public String pName; public String pRating; public List<Item> ...
user avatar
2 votes
1 answer
341 views

CloudPage GET/POST Parameter with value "<[aZ]" fails with 500 error

I try to make sense out of an edge case scenario I just came across and would love to get some ideas around why this may happen. On any CloudPage, if I add a GET or POST parameter with the value of &...
shd.lux's user avatar
  • 466
0 votes
0 answers
28 views

How to get a hyperlink in the Post Body in Salesforce without using LInkURL? [duplicate]

As I am using this code to add a feeditem in the case. As it created a feeditem on the case but hyperLink is not working. In the documentation we got that isRichText supports the tag but in my ...
Manas Gupta's user avatar
0 votes
1 answer
549 views

Rest post account record error "POST requires content-length"

So i am trying to insert some account record. Token is right because get command works well. Error while Post - POST requires content-length. I am even trying to add body with JSONGenerator. ...
gignecisto's user avatar
-2 votes
1 answer
2k views

How to create JSON Generator with apex in post api [duplicate]

I'm new in Apex and we have a requirement, Need to send a record from Salesforce to an external system using Rest API whenever a record is created in Salesforce, I need to send a couple of SF fields ...
Catherine's user avatar
0 votes
1 answer
61 views

Sending Simple Apex Post Request

I have narrowed down why my apex post request is not sending to an external API. For some reason the JSON data that I serialize and send is wrong but everything works when I test it using Postman. ...
Ken Maranion's user avatar
0 votes
0 answers
141 views

Attempt to de-reference a null object while serializing a custom object with nested objects to JSON in Apex

Im running into an de-reference a null object error while trying to serialize a list of objects into JSON for a POST method. The error occurs when it tries to assign a value to line 277 (within the ...
Jebert's user avatar
  • 15
0 votes
1 answer
661 views

Do a post callout and get the location header from rest service class

I have a requirement and I am not sure is it possible or not. My requirement is that I have a rest service class with @httpGet annotation where I am getting Id of a record after that I need to do rest ...
Salman Khan's user avatar
0 votes
1 answer
1k views

apex code to send a post request for given information

Im trying to write an apex code for a post request while using the below data this is basically for creating a room in chat tool curl -X PUT -H 'X-ChatWorkToken: Your API token' -d 'description=group+...
Tejas's user avatar
  • 57
0 votes
1 answer
138 views

JSON error while passing data from one environment to another rest api

I need to sync some account records between two environments of the salesforce. I'm able to make a callout but while passing data getting a JSON error. I'm basically serializing a list of accounts in ...
sfdc's user avatar
  • 321
2 votes
0 answers
2k views

Illegal character VCHAR in request Header

We have an external system that sends us POST Requests. The authentication method is using force.com public site with IP restriction. The external system sends a POST request and got an error and we ...
Salvation's user avatar
  • 1,147
0 votes
0 answers
64 views

Salesforce POST with both SObjects and ContentVersion [duplicate]

I'm trying to build functionality in Salesforce to allow a payload POST which would create multiple SObjects and ContentVersions (Images/PDFs mostly). I've built out a custom endpoint to handle the ...
McD's user avatar
  • 1,246
0 votes
1 answer
21 views

Unittest not covering webservice

I have a webservivce for which i wrote a unittest but there is no code coverage, what am I missing Webservice @RestResource(urlMapping='/DynamicApi/*') global with sharing class DynamicApi{ ...
Thomas's user avatar
  • 2,294
2 votes
1 answer
4k views

Help Understanding How to write Test Class for Apex HTTP Post

So I've been through quite a few posts/questions already looking for enough information to have this "click" for me, but I'm still missing something. This is my first time working with ...
Jack S's user avatar
  • 53
3 votes
1 answer
3k views

How to properly send a Json in the body of a POST request?

I'm trying to do the same I accomplish with postman but with Apex and I'm not being able to do so: I need to send a POST request to this example endpoint: https://cccccccccccccc/api_jsonrpc.php This ...
Nacho Zve De La Torre's user avatar
0 votes
1 answer
673 views

Multifunction POST method in apex REST API controller

I want to create a single POST method which takes method as a parameter along with the Request body. Using the parameter string method i'm trying to call the related method within my apex controller. ...
Maverick's user avatar
1 vote
1 answer
3k views

Pardot form handler submission via API

I have a Pardot form handler linked to a form on a company's webpage. I need to do a test submission via API. I am making a POST request to the form handler endpoint URL and I filled every field but I ...
Paola's user avatar
  • 25
0 votes
1 answer
480 views

Retrieve Single Most Recent Article to have Topic Assigned in Topic Assignment Trigger SOQL Apex Salesforce

I'm creating an Apex Topic Assignment Trigger for our Community that simply does this: After insert of a new topic to a knowledge article, create a post that simply says "A new article called <...
Mimsy Moon's user avatar
0 votes
0 answers
231 views

POST Request via SSJS - Authorisation Types

I am working on sending an outbound POST request and haven't been able to send one to my end point url. I'm receiving a Status Code 500 indicating that this is an SSJS issue however, upon closer ...
Raymond Tran's user avatar
2 votes
1 answer
89 views

Help with Rest Resource

I'm working with integrations rn, and I'm stuck... I need to create a public site to receive calls fired by a third-party system. I'm using this tutorial: http://www.wadewegner.com/2013/03/creating-...
RedMan's user avatar
  • 107
0 votes
1 answer
2k views

ApexRest HTTPPost - Testing using workbench

I have created an apex rest httppost class. This requires two parameters which are passed via response. I am trying to test this via workbench by passing two parameters. @RestResource(urlMapping='/...
SalesforceTechie's user avatar
1 vote
1 answer
2k views

Apex rest API with get and post in the same time [duplicate]

I have a scenario where I need to do a httpPost to save a value from the request parameter and then return some other fields for the same object fields using httpget. So, my parameter would be ...
Rajaravi's user avatar
0 votes
1 answer
146 views

Can I open page(NON-Visualforce) by POST method?

We want to open page(NON-Visualforce) by POST method. User open Visualforce page, and click 「submit」 button. This button call Apex class( or js? ) , other page open by POST method. Other page is ...
yuko-kisa9's user avatar
0 votes
1 answer
521 views

get the source domain from a post request

Third-party need to send Data to Salesforce using Https post request - They cant handle token access so it must be a force.com site. I referred an Apex class to the site (Without using VF page), by ...
Salvation's user avatar
  • 1,147
1 vote
1 answer
1k views

Using apex for posting multipart/form-data Content-Type - limit exceptions

I am using this: Salesforce Apex - POSTing multipart/form-data Content-Type thread to send a file to a 3rd party It works great (taken the EinsteinVision_HttpBodyPart class from here) But when ...
Itai Shmida's user avatar
  • 4,995
0 votes
1 answer
487 views

How to Make Pardot Authorisation Request?

I have a training org where I'm making API callouts for authorise to the Pardot environement, but recieving the error :- Error Code :- 49 Error :- Access Denied, The details of the API url which I'm ...
Jitesh Goel's user avatar
0 votes
2 answers
1k views

Impossible to patch Account

Is there a configuration to allow patching in SalesForce ? I tried to patch the Account on Postman, no success. I also tried on Workbench, no success. My Url (on workbench): /services/data/v47.0/...
Benoît's user avatar
  • 21
0 votes
1 answer
1k views

JSON_PARSER_ERROR on POST in Workbench

I am using https://workbench.developerforce.com/restExplorer.php . Trying to add new patient, on URL /services/data/v46.0/sobjects/HealthCloudGA__EhrPatient__c, with POST method, with body like this : ...
Dragan Jovanović's user avatar
0 votes
1 answer
56 views

Can't Consume POST request but Dev Console shows url is being hit with requests

Afternoon, We have a vendor that is trying to send POST requests to a method in we have hosted using Site Guest User. Here is our code snippet that we are using to see if the request is even ...
thinker's user avatar
  • 1,402
2 votes
0 answers
160 views

How to map static date field in Async SOQL query job?

I'm trying to use Aggregate Async SOQL to Query Big Objects to a custom Object like below (https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/...
compski's user avatar
  • 1,251
0 votes
1 answer
1k views

Form post to external url through an aura component embedded in community page

Is it possible to execute a form post to an external site from an aura component that is exposed in a community page? Our aura component looks like this <aura:component implements="forceCommunity:...
quikbeam's user avatar
1 vote
1 answer
4k views

Apex callout with a client certificate

I have written one Rest service which is returning a access token to resend it to endsystem to get the final response but we are getting "Request processing failed; nested exception is java.lang....
Anoop's user avatar
  • 47
0 votes
0 answers
1k views

System.CalloutException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 503 Service Unavailable" ERROR

I'm trying to make an HTTP Request to other System. They provided the endpoint URL which contains a Port number. https://Test.com:50001/RESTAP/BGN/PRDV/CREATE When I'm trying to make the request I'...
Salvation's user avatar
  • 1,147