function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
junliajunlia 

Error creating job in workbench

Hello,

Brand new to Apex  - Day 1. I wanted to create a job to bulk load data into SF. But I am getting this error when creating the job in workbench:

 Response
[ {
  "errorCode" : "API_ERROR",
  "message" : "Unexpected character ('-' (code 45)) in numeric value: expected digit (0-9) to follow minus sign, for valid numeric value at [line:1, column:3]"
} ]

Here is the request header:
Content-Type: application/json; charset=UTF-8
Accept: application/json

and here is the request body:
--BOUNDARY
Content-Type: application/json
Content-Disposition: form-data; name="job"

{
  "object":"Contact",
  "contentType":"CSV",
  "operation": "upsert"
  “lineEnding”: “CRLF”

}

--BOUNDARY
Content-Type: text/csv
Content-Disposition: form-data; name="content"; filename="content"

FirstName,LastName,Title,Description
Tom,Jones,Senior Director,Self described as the top branding guru on the West Coast
Ian,Dury,Chief Imagineer,World renowned expert in fuzzy logic design
Tom Jr,Jones,Director, branding guru on the West Coast
Ian Jr,Dury,Imagineer,learn from dad  in fuzzy logic design
--BOUNDARY--

Any pointer on what exactly is it complaining about?

Thanks much
junliajunlia
By the way the url is: /services/data/v43.0/jobs/ingest/
Rahul Chaudhary OfficialRahul Chaudhary Official
Hi Junlia,

Error is related to your data. One of your record is trying to insert - in a field which is of type Number (Numeric).
Junli AntolovichJunli Antolovich
There is no Numeric in any of the fields in the data -- I copied the data from the developer document on Apex jobs. It's more likely to be an issue with the workbench than the data.