[SalesForce] How to insert (upsert) an object that has no external id

According to this documentation, you need to know the external ID field of an object to inset new records. For some of my custom objects, I'm not seeing any fields in the object description that have an externalId value of true (I'm logged in as an admin).

How do I insert a new record of an object that does't have an external ID field?

Note: I don't have much control over the current object structure

Using REST API v31.0

Best Answer

REST API means that you can use 'GET', 'POST', 'PATCH' or 'DELETE' as HTTP methods for your requested resource. These methods correspond to what you're trying to achieve. GET = describe, POST = insert, PATCH = update, DELETE = delete. Here's an example of how to insert a new Account using the POST method:

POST /services/data/v31.0/sobjects/Account HTTP/1.1
Host: na15.salesforce.com
User-Agent: Guzzle/4.1.6 curl/7.30.0 PHP/5.4.24
Authorization: Bearer 00Di000000xxxxxx
Accept: application/json
Content-Type: application/json
Content-Length: 24

{"Name":"New Account"}