Solved

Create Customer Auto Numbering

  • 7 December 2023
  • 3 replies
  • 66 views

Userlevel 2
Badge

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

}

 

icon

Best answer by keithschm 8 December 2023, 17:15

View original

3 replies

Userlevel 7
Badge +17

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

 

 

 

Userlevel 7
Badge +11

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?

 

Userlevel 2
Badge

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


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved