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
Brandon COFFINBrandon COFFIN 

Rest API 400 : Bad request

Hello,

I'm working with the rest API in order to make an upsert of the products in Salesforce.
The Java code I developed worked fine since today.
Two products are not working and the response is 400 bad request, so probably JSON error (according to the status code)
Nothing changed in my code and all the other products worked correctly.

Here is the requested URL :
https://na38.salesforce.com/services/data/v38.0/sobjects/Product2/ProductKey__c/DEV%3AELMT%20AUTRE?_HttpMethod=PATCH

And the JSON body :
{"PURCHASING_GROUP__C":"ART",
"PRODUCT_UOM__C":"UN",
"PRODUCT_WEIGHT__C":"1.000",
"DESCRIPTION":"ELEMENT FONTE POUR DEVIS",
"M3_STAT__C":"20",
"ITEM_DESIGNATION_MARKING__C":"ELEMENT FONTE AUTRE QUE CADRE OU TAMPON POUR DEVIS",
"ITEM_TYPE__C":"S",
"ITEM_GROUP__C":"CM",
"PRODUCTCODE":"DEV:ELMT AUTRE",
"ISACTIVE":"true",
"NAME":"DEV:ELMT AUTRE"}

Thanks