Notes
public class CustomerAPI {
public static void PostCustomer(){
Http http = new Http();
HttpRequest request = new HttpRequest();
request.setEndpoint('https://api.pathtosalesforce.com/customer.php?token=YOURTOKENHERE');
request.setMethod('POST');
request.setBody('{"firstName": "John","lastName": "Will","email": "johnwill01@gmail.com","phone": "5559876543","gender": "Female","status": "active"}');
request.setHeader('Content-Type', 'application/json;charset=UTF-8');
HttpResponse response = http.send(request);
System.debug(response.getStatusCode());
System.debug(response.getStatus());
System.debug(response.getBody());
}
public static void PostCustomers(){
Http http = new Http();
HttpRequest request = new HttpRequest();
request.setEndpoint('https://api.pathtosalesforce.com/customer.php?token='+token);
request.setMethod('POST');
request.setBody('[{"firstName": "John","lastName": "Will","email": "johnwill01@gmail.com","phone": "5559876543","gender": "Female","status": "active"},{"firstName": "John","lastName": "Charter","email": "johncarter01@gmail.com","phone": "5559876543","gender": "Female","status": "active"}]');
request.setHeader('Content-Type', 'application/json;charset=UTF-8');
HttpResponse response = http.send(request);
System.debug(response.getStatusCode());
System.debug(response.getStatus());
System.debug(response.getBody());
}
}