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
-3 votes
0 answers
25 views

How to pass Json request in post method in apex class , I need to provide field values in my request

I need to pass field values in the request body of my post method. below mentioned in setbody is the json format of request which I have pasted from one of the example. How can I pass request in such ...
user avatar
0 votes
1 answer
29 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",&...
user avatar
0 votes
1 answer
41 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 ...
user avatar
0 votes
0 answers
33 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 ...
user avatar
0 votes
1 answer
27 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?
user avatar
-1 votes
1 answer
63 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
110 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
122 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 &...
user avatar
  • 466
0 votes
0 answers
142 views

multipart/form-data Json Body with multiple files

how to send a json and a list of files in a POST request, in the implementation I made the files are not sent. Blob blobBody = CreateMultiPartFormDataBody(integracaoDadosEntrada.mapFormData, ...
user avatar
0 votes
0 answers
119 views

How to pass parameters to VisualForce page with POST call from APEX

I have some custom data that I want to pass to a VisualForce page in order to render it as a PFD and then send it as an attachment via e-mail. This data is not stored in Salesforce. When trying to ...
user avatar
0 votes
0 answers
24 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 ...
user avatar
0 votes
0 answers
19 views

Post request with records to another org scheduled batch

I am making a post request to another org with custom object records. I have created boolean field to mark needed records and transsfer them though batch. That field changes in Trigger on create and ...
user avatar
0 votes
1 answer
49 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. ...
user avatar
-2 votes
1 answer
280 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 ...
user avatar
0 votes
1 answer
42 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. ...
user avatar
0 votes
0 answers
75 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 ...
user avatar
  • 13
0 votes
1 answer
97 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 ...
user avatar
0 votes
1 answer
223 views

Unable to convert incoming JSON request body to string JSON - Salesforce

I am creating a post method that is tested with Postman and I do get the functionality done which is getting a variable from the incoming JSON string then querying a record, then updating the account ...
user avatar
0 votes
1 answer
45 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+...
user avatar
  • 47
0 votes
1 answer
40 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 ...
user avatar
  • 321
0 votes
0 answers
764 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 ...
user avatar
  • 961
0 votes
0 answers
63 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 ...
user avatar
  • 1,226
0 votes
1 answer
15 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{ ...
user avatar
  • 2,068
2 votes
1 answer
1k 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 ...
user avatar
  • 43
2 votes
1 answer
1k 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 ...
user avatar
0 votes
1 answer
264 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. ...
user avatar
0 votes
1 answer
2k 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 ...
user avatar
  • 5
0 votes
1 answer
244 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 <...
user avatar
0 votes
0 answers
110 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 ...
user avatar
2 votes
1 answer
74 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-...
user avatar
  • 107
0 votes
1 answer
1k 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='/...
user avatar
1 vote
1 answer
910 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 ...
user avatar
0 votes
1 answer
59 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 ...
user avatar
0 votes
1 answer
225 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 ...
user avatar
  • 961
1 vote
1 answer
710 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 ...
user avatar
  • 4,749
0 votes
1 answer
420 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 ...
user avatar
0 votes
2 answers
472 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/...
user avatar
  • 21
0 votes
1 answer
545 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 : ...
user avatar
0 votes
1 answer
35 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 ...
user avatar
  • 1,258
2 votes
0 answers
80 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/...
user avatar
  • 1,051
0 votes
1 answer
956 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:...
user avatar
1 vote
1 answer
2k 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....
user avatar
  • 37
0 votes
0 answers
948 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'...
user avatar
  • 961
1 vote
1 answer
6k views

How to resolve Missing closing quote character ' on string, error message

I got the code below working: Corrected the (curved) brackets, 'quote signs'. Now at least anonymous execution window is executing without interruption. Even the 400 message, has gone away. Only need ...
user avatar
0 votes
1 answer
1k views

dynamic json body as http post request

public class RequestWrapper { public static GetUrlRequest GetUrlRequest; public class OrderDetails { public String txnId; public String custOrder; public ...
user avatar
  • 261
0 votes
1 answer
80 views

APEX test script to web server with a static time stamp doget cakk and HttpGet

New to writing test scripts. Looking for help in error in Unexpected token 'Lead' for my test code. I have a static field that pulls off time stamp to only pull data after a certain time. I am ...
user avatar
0 votes
1 answer
112 views

read JSON, POSTed to my visualforce Site page from 3rd party. without authentication

The currentPage().getParameters() can read GET pagams, and also reads POST body only if the header Content-Type = application/x-www-form-urlencoded However, when the Content-Type changes to ...
user avatar
1 vote
1 answer
384 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 ...
user avatar
  • 131
-2 votes
1 answer
2k views

Apex Trigger to callout Rest API to external system when the status is updated

I have a REST API class which will send the response to external system as { "AccountId" : "0098", "email" : "Email-ID", "status" : "active" } Below is the REST API class that will send data to ...
user avatar
  • 131
2 votes
1 answer
5k 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 ...
user avatar