AccountAdd( object Account )
Add and Account to a Customer
Request
Request Data:
- (object) Account (required)
- (string) Name (required) – Account Name
- (int) CustomerID (required) – Identify the Customer by ID
- (string) CustomerName (required) – Identify the Customer by Name (it will be ignored if CustomerID is provided.
- (int) SupplierID (required) – Identify the Supplier by ID.
- (string) SupplierName (required) – Identify the Supplier by Name (it will be ignored if SupplierID is provided.
- (int) LocationID (optional) – Identify the Location by ID.
- (string) LocationName (optional) – Identify the Location by Name (it will be ignored if LocationID is provided.
- (int) AccountGroupID (optional) – Identify the Account Group by ID.
- (string) AccountGroupName (optional) – Identify the Account Group by Name (it will be ignored if AccountGroupID is provided
- (array) Fields (required) – list of custom fields object.
{ "Account": { "Name": <string>, "CustomerID": <int>, "CustomerName": <string>, "SupplierID": <int>, "SupplierName": <string>, "LocationID": <int>, "LocationName": <string>, "AccountGroupID": <int>, "AccountGroupName": <string>, "Fields": [ { "Field": <string>, "Value": <string> }, <... more custom fields> ] } }
Response
Same JSON strucure as the Account Endpoint
Errors
- “Permission denied”
- “An account name is required”
- “A valid customer is required”
- “A valid supplier is required”
- “A unique account number is required”
- “The location ID specified is not found for the customer” – When the specified LocationID does not belong to the specified customer