Skip to main content
Solved

Create Customer Auto Numbering

  • December 7, 2023
  • 3 replies
  • 171 views

Forum|alt.badge.img+1

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" }
}
}

}

 

Best answer by keithschm

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

 

Thank you

3 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • December 8, 2023

@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"
}
}
}
}

 

 

 


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • December 8, 2023

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?

 


Forum|alt.badge.img+1
  • Author
  • Varsity I
  • Answer
  • December 8, 2023

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

 

Thank you