1

I'm following this example to create a job using json: InvalidUrl Bulk API creating a bulk job using postman

I've been successful to use the request body as xml instead of json, but I desire it to be in json. Here is what I tried to mimic in the example

POST url: test.salesforce.com/services/async/48.0/job

headers:

  • Content-Type: application/json
  • X-SFDC-Session: 'fresh token'

Body

{ 
    "jobInfo": { 
        "operation": "insert",
        "object": "Account",
        "contentType": "JSON",
        "concurrencyMode": "Parallel"
    }
}

I still get this error:

{ "exceptionCode": "InvalidJob", "exceptionMessage": "Unable to parse Job" }

1 Answer 1

1

The JSON request body doesn't use a top-level jobInfo key. Rather than converting XML-based code, reference the JSON examples in the Bulk API Developer Guide:

Example JSON request body

{
  "operation" : "insert",
  "object" : "Account",
  "contentType" : "CSV"
}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .