This information is aimed to developers only. If you're not a developer, you probably don't need to know about all this.

Example: getting a product

If you click on the JSON link of the ProductGet function, you'll see this screen: and in this screen you'll also see that you need to POST to: /json/reply/ProductGet with the JSON payload:


So, a simple JSON call to return your products, would be this one:

Example: inserting a client

A JSON call to Insert a client would be this one:{SupplierClientID:0,SupplierClientType:Client,SupplierClientName:API_client,SupplierClientBillingAddress:Some%20Billing%20Field}&mvRecordAction=Insert

basically a POST to with the following payload:

APIKEY=YOURAPIKEYHERE&mvSupplierClient={SupplierClientID:0,SupplierClientType:Client,SupplierClientName:API_client,SupplierClientBillingAddress:Some Billing Field}&mvRecordAction=Insert

Example: get products with available quantity

To get the products with available quantity you can run this API call:

You will get a response with all available products. Also, if you notice, there is a "query" parameter. This simulates more or less an SQL query. For example: like '%000%'

will bring products with positive quantity that include the '000' anywhere in the ProductSKU field. The thing to note is the mv. prefix that needs to be added before the usual fields that you'll find in the syntax of each API call.

Example: get suppliers or clients

For the SupplierClientGet: like '%mag%'

will bring all suppliers/clients that include 'mag' in their name. You can also use an AND/OR: like '%mag%' AND mv.SupplierClientType = 2

(mv.SupplierClientType = 2 is for strictly clients, mv.SupplierClientType = 1 is for strictly suppliers, mv.SupplierClientType = 0 is for entities that are both suppliers and clients).

A general note

Finally, you will notice that most API functions have an Update call (such as SupplierClientUpdate) with an "mvRecordAction" parameter. This can either be mvRecordAction=insert (create/insert) or mvRecordAction=update.

The metadata definition (JSON again) of the SalesOrderGet/SalesOrderUpdate is here:

So, to get the SalesOrderClientID you should first call the SupplierClientGet (with the name of the supplier/Client) and extract the id. Same with the SalesOrderInventoryLocationID. Alternatively, you can store Ids locally upon an initial sync.

Did this answer your question?