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
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
18 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. ...
-2
votes
1answer
67 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
35 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. ...
0
votes
0answers
49 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
51 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
36 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
48 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
425 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
52 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
1answer
347 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
418 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
100 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
864 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 ...
0
votes
1answer
136 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
72 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
69 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-...
0
votes
1answer
820 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
654 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
45 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
153 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
560 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
1answer
389 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
313 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
403 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
28 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
59 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/...
0
votes
1answer
783 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
0answers
913 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'...
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
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 ...
0
votes
1answer
65 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
97 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
326 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 ...
-2
votes
1answer
1k 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 ...
1
vote
1answer
4k 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 ...
2
votes
2answers
340 views

WebService Post Rest API is Receiving as GET

I wrote a web service using @RestResource With both Get and Post methods. When I try to send a request via workbench - everything works great, but when I try to send a post request using other ...
0
votes
1answer
446 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: ...
1
vote
1answer
140 views

Unable to make /login POST call from application of marketing cloud

I'm working on building the application on the salesforce marketing cloud and facing the issue of making POST /login call to application. Scenario: We have created a cloud application in Installed ...
0
votes
1answer
201 views

Wrong format of JSON Array after a successful POST using Apex Class

I've been trying to create a List from the Account object, filtered by their record type, to be sent to our website using the Apex Class. I managed to create the query correctly and it returned the ...
0
votes
2answers
2k views

PATCH Issue - {"Message":"The requested resource does not support http method 'POST'."}

I have a callout that is having an issue with it's POST. I have seen a couple of work arounds for this issue but none of them seem to work with my integration. req.setMethod('POST'); req.setHeader('...
0
votes
0answers
2k views

POST API: System.HttpResponse[Status: Forbidden , StatusCode=403 ]

I am working callout to post my JSON. When I test my JSON at PostMan it's all correct but when same JSON with my api, I got ' System.HttpResponse[Status: Forbidden , StatusCode=403 ]' ( 403 Confirmed.....
0
votes
2answers
2k views

Redirect following POST method

I have a scenario : A user needs to fill a form and after submitting, it should send the data of the form using POST API to some URL - the user will need to be redirected to this page after the ...
0
votes
1answer
62 views

Dispaly an Error Message on unsuccessful POST function

I have a requirement where the user is updating a table and when he/she clicks on the Save button a POST service is called and the data gets saved. The requirement is now enhanced where by the user ...
0
votes
1answer
32 views

Error in Json for Rest Api

I have a trigger that sends a certain opportunity to an unspecified stage, so I have a json with the objects, but I intend to send everything in a single string, so I joined json, when I run the code ...