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
2
votes
1answer
54 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 &...
0
votes
0answers
29 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, ...
0
votes
1answer
480 views

Salesforce REST JSON Nested Self-Related Objects?

ooks like I need some help here. Salesforce documentation and multiple google searches not gave me an answer. Problem description: I'm trying to insert (POST) nested self-related records using REST ...
0
votes
0answers
21 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 ...
0
votes
1answer
983 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 ...
1
vote
1answer
837 views

ExactTarget - How to post a record to a data extension that has no primary key?

I have a data extension with the following fields: recordId - number recordKey - text - length: 50 recordValue - text - length: 50 None of the above fields are primary key, because they can occur ...
0
votes
0answers
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 ...
0
votes
0answers
18 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 ...
0
votes
1answer
19 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. ...
3
votes
4answers
15k views

Send Blob file via Apex Rest Callout

I'm trying to send a Blob Apex REST callout and it is keep failing. I tried all the examples in the web but didn't work. What is the standard and correct way to send Blob data via REST callouts? //...
-2
votes
1answer
112 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 ...
0
votes
1answer
38 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. ...
2
votes
4answers
21k 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 ...
0
votes
0answers
54 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 ...
0
votes
0answers
74 views

POST Request on Visualforce page returns invalid data

On a quick action button click(on Account), I have some logic that involves some calculation in apex (not getting stored anywhere as I am not supposed to store it anywhere in the system). Once ...
0
votes
1answer
38 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 ...
0
votes
1answer
57 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 ...
0
votes
1answer
34 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+...
0
votes
1answer
32 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 ...
0
votes
0answers
492 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 ...
0
votes
0answers
57 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 ...
0
votes
1answer
13 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{ ...
2
votes
2answers
2k views

Why is this triggered send "Queued" in response, but never actually queued or sent?

It sounds like my issue is similar to this question. I'm currently POSTing (via Postman) to the following: https://www.exacttargetapis.com/messaging/v1/messageDefinitionSends/key:MY_CORRECT_KEY/send?...
2
votes
1answer
547 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 ...
2
votes
1answer
562 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 ...
0
votes
1answer
143 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. ...
0
votes
1answer
159 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 <...
0
votes
0answers
81 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 ...
2
votes
1answer
73 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-...
5
votes
3answers
181k views

How to give date and time values in request body using postman

I have Created a Request Body in Event Object with Date and Time Details, how to give the Date and Time Values in JSON format using Postman { "Type":"contact call", "WhoId":"0038E00000GWXhL",...
0
votes
1answer
915 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='/...
1
vote
1answer
688 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 ...
0
votes
1answer
47 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 ...
0
votes
1answer
175 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 ...
1
vote
1answer
593 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 ...
0
votes
0answers
921 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'...
0
votes
1answer
397 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 ...
0
votes
2answers
353 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/...
0
votes
1answer
430 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 : ...
0
votes
1answer
30 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 ...
2
votes
0answers
66 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/...
1
vote
3answers
2k views

REST to create multiple objects-JSON Deserializaton failed on token null

I have been trying to create CurrencyType records from APEX and since that doesn't support DML, have been using the REST endpoint and POST method. Everything work fine with single record but with ...
0
votes
1answer
813 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:...
1
vote
1answer
1k 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....
0
votes
1answer
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 ...
1
vote
1answer
4k 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 ...
0
votes
1answer
69 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 ...
0
votes
1answer
100 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 ...
1
vote
1answer
335 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
1answer
468 views

Submitting Web-to-Lead via POST returning 401: Unauthorized?

I need to capture data locally as well as submit that data to Salesforce. I am trying to POST data to https://[example].secure.force.com/HC4__WebFormProcessor , however I am getting a response of 401: ...