Skip to main content

Hi all, I am trying to create a customer using the rest API. I am not sending a CustomerID as I have the auto numbering turned on. It works great in the UI and Auto number works correctly. With the API it seams to just keep editing the same customer and not assigning a new ID.  It uses <NEW> for the customer id.  Am I missing a setting?

 

Endpoint: http://localhost/AcumaticaERP/entity/Default/22.200.001/Customer

 

Payload:

{
// "CustomerID": {"value": "Cust04"},
"CustomerName": {"value": "Jane Dough"},
"CustomerClass": {"value": "Local"},
"SendDunningLettersbyEmail":{"value":false},
"MainContact" :
{
"Email" : {"value" : "demo@gmail3.com" },
"Address" :
{
"AddressLine1" : {"value" : "40331 Lake Washington Blvd NE" },
"AddressLine2" : {"value" : "Suite 1030" },
"City" : {"value" : "Kirkland" },
"State" : {"value" : "WA" },
"PostalCode" : {"value" : "98033" }
}
}

}

 

@keithschm  Even if it is AUTO Numbering is enabled, we should pass the CUSTOMERID as <NEW> like below in the payload. I just tried with the below request and it is creating the new customer for each call.

 

 

{
"CustomerID": {
"value": "<NEW>"
},
"CustomerName": {
"value": "Jane Dough"
},
"CustomerClass": {
"value": "Local"
},
"SendDunningLettersbyEmail": {
"value": false
},
"MainContact": {
"Email": {
"value": "demo@gmail3.com"
},
"Address": {
"AddressLine1": {
"value": "40331 Lake Washington Blvd NE"
},
"AddressLine2": {
"value": "Suite 1030"
},
"City": {
"value": "Kirkland"
},
"State": {
"value": "WA"
},
"PostalCode": {
"value": "98033"
}
}
}
}

 

 

 


Hi @keithschm ,

If you are using Auto Number, there is no need to include the CustomerID in the request. It will work without the CustomerID.

Could you please share the error message?

 


Thanks all,   In my earlier attempts, I created a customer named “<NEW>” with the API. Once I deleted it, all was good.  

 

Thank you


Reply