/Api/Customer

The customer API method allows HTTP Post and HTTP Put actions. The HTTP Post should be used for all fresh inserts. HTTP Put should be used for all updates of field values. Any matching records with HTTP Post will cause the existing records to be completely overwritten.

HTTP Post

Allows you to insert a new customer into your TransVirtual database. If a customer already exists with a matching account/customer code or matching name, then that customer will be overwritten.

Request Properties (Shared Post and Put)

The request properties that are shared between HTTP Post and HTTP Put for your request data.

Property Name Required Description
Name Yes The customer name. Max length: 100
AccountCode The customer code for reference. Max length: 50
AccountsReceivableAddress The account receivable address line 1. Max length: 100
AccountsReceivableAddress2 The account receivable address line 2. Max length: 100
AccountsReceivableContact The account receivable contact name. Max length: 100
AccountsReceivablePhone The account receivable phone number line 1. Max length: 50
AccountsReceivableFax The account receivable fax number. Max length: 50
AccountsReceivableSuburb The account receivable suburb. Note: the suburb, postcode, and state to be populated correctly; otherwise, it will import as empty. Max length: 60
AccountsReceivablePostcode The account receivable post code (used with suburb to find existing suburb). Max length: 20
AccountsReceivableState The account receivable state/province. Max length: 30
AccountsReceivableEmail The account receivable email address. Max length: 500
AccountsReceivableWebsite The account receivable website. Max length: 100
AccountsPayableAddress The account payable address line 1. Max length: 100
AccountsPayableAddress2 The account payable address line 2. Max length: 100
AccountsPayableContact The account payable contact name. Max length: 100
AccountsPayablePhone The account payable phone number line 1. Max length: 50
AccountsPayableFax The account payable fax number. Max length: 50
AccountsPayableSuburb The account payable suburb. Note: the suburb, postcode, and state to be populated correctly; otherwise, it will import as empty. Max length: 60
AccountsPayablePostcode The account payable post code (used with suburb to find existing suburb). Max length: 20
AccountsPayableState The account payable state/province. Max length: 30
AccountsPayableEmail The account payable email address. Max length: 500
AccountsPayableWebsite The account payable website. Max length: 100
CustomerServiceAddress The customer service address line 1. Max length: 100
CustomerServiceAddress2 The customer service address line 2. Max length: 100
CustomerServiceContact The customer service contact name. Max length: 100
CustomerServicePhone The customer service phone number line 1. Max length: 50
CustomerServiceFax The customer service fax number. Max length: 50
CustomerServiceSuburb The customer service suburb. Note, the suburb, postcode, and state to be populated correctly; otherwise, it will import as empty. Max length: 60
CustomerServicePostcode The customer service post code (used with suburb to find existing suburb). Max length: 20
CustomerServiceState The customer service state / province. Max length: 30
CustomerServiceEmail The customer service email address. Max length: 500
CustomerServiceWebsite The customer service website. Max length: 100
GeneralAddress The default address line 1. Max length: 100
GeneralAddress2 The default address line 2. Max length: 100
GeneralContact The default contact name. Max length: 100
GeneralPhone The default phone number line 1. Max length: 50
GeneralFax The default fax number. Max length: 50
GeneralSuburb The default suburb. Note: the suburb, postcode, and state to be populated correctly; otherwise, it will import as empty. Max length: 60
GeneralPostcode The default post code (used with suburb to find existing suburb). Max length: 20
GeneralState The default state/province. Max length: 30
GeneralEmail The default email address. Max length: 500
GeneralWebsite The default website. Max length: 100
BackdockAddress The backdock address line 1. Max length: 100
BackdockAddress2 The backdock address line 2. Max length: 100
BackdockContact The backdock contact name. Max length: 100
BackdockPhone The backdock phone number line 1. Max length: 50
BackdockFax The backdock fax number. Max length: 50
BackdockSuburb The backdock suburb. Note: the suburb, postcode, and state to be populated correctly; otherwise, it will import as empty. Max length: 60
BackdockPostcode The backdock post code (used with suburb to find existing suburb). Max length: 20
BackdockState The backdock state/province. Max length: 30
BackdockEmail The backdock email address. Max length: 500
BackdockWebsite The backdock website. Max length: 100
WarehouseAddress The warehouse address line 1. Max length: 100
WarehouseAddress2 The warehouse address line 2. Max length: 100
WarehouseContact The warehouse contact name. Max length: 100
WarehousePhone The warehouse phone number line 1. Max length: 50
WarehouseFax The warehouse fax number. Max length: 50
WarehouseSuburb The warehouse suburb. Note: the suburb, postcode, and state to be populated correctly; otherwise, it will import as empty. Max length: 60
WarehousePostcode The warehouse post code (used with suburb to find existing suburb). Max length: 20
WarehouseState The warehouse state/province. Max length: 30
WarehouseEmail The warehouse email address. Max length: 500
WarehouseWebsite The warehouse website. Max length: 100
ManagementAddress The management address line 1. Max length: 100
ManagementAddress2 The management address line 2. Max length: 100
ManagementContact The management contact name. Max length: 100
ManagementPhone The management phone number line 1. Max length: 50
ManagementFax The management fax number. Max length: 50
ManagementSuburb The management suburb. Note: the suburb, postcode, and state to be populated correctly; otherwise, it will import as empty. Max length: 60
ManagementPostcode The management post code (used with suburb to find existing suburb). Max length: 20
ManagementState The management state/province. Max length: 30
ManagementEmail The management email address. Max length: 500
ManagementWebsite The management website. Max length: 100
AlsoKnownAs The Also Known As (AKA) field name. Max length: 750
TaxNumber Your country tax identifier for this cardfile. Max length: 50
PurchaseOrder The purchase order number. Max length: 50
RateCardLink Rate card to be applied to the customer. Max length: 100
ITAddress The IT address line 1. Max length: 100
ITAddress2 The IT address line 2. Max length: 100
ITContact The IT contact name. Max length: 100
ITPhone The IT phone number line 1. Max length: 50
ITFax The IT fax number. Max length: 50
ITSuburb The IT suburb. Note: the suburb, postcode, and state to be populated correctly; otherwise, it will import as empty. Max length: 60
ITPostcode The IT post code (used with suburb to find existing suburb). Max length: 20
ITState The IT state/province. Max length: 30
ITEmail The IT email address. Max length: 500
ITWebsite The IT website. Max length: 100
DataFilterTag Data filters tags helps match to a data filter for EDI rules. Max length:500
ExpectedMonthTrade The expected monthly trade. decimal
SalesManager The sales manager’s name. Must match a user in the system, otherwise ignored. Max length: 100
IndustryType The industry type name. Max length: 50
CustomerServiceManager The customer service manager’s name. Must match a user in the system, otherwise ignored. Max length: 100
AccountsManager The account manager’s name. Must match a user in the system, otherwise ignored. Max length: 100

Response Properties

The response properties for the HTTP Post and HTTP Put found within the Data field of the reponse

Property Name Description
Id Id of the customer created/updated.
Name Name of the customer created/updated.
AccountCode Account Code of the customer created/updated.

Example Post

Request (json)
Response (json)

HTTP Put

Allows you to modify the properties of a customer.

Request properties available for HTTP Put are identical to the HTTP Post.

Matching to an existing customer will be done based on AccountCode if valid value provided, otherwise it is matched based on Name. At least one of these fields must be provided and have a valid match.

Response properties for HTTP Put are identical to the HTTP Post.

Example Put

Request (json)
Response (json)

Error Codes

Error Code Description
1001 Unknown error - report if this persists.
1002 Missing Name.
1003 Missing Name or AccountCode - at least one required to perform an update.
1004 Name or AccountCode provided does not match to any existing cardfile.
1005 Invalid email address provide for one of the contact details.