REST API Web Endpoint Quick Guide

Version 0.4
Written By: Kyle Vanderstoep

This document was intended for quick reference with regards to the most common fields you want to access from the web endpoint. For more in-depth help, take a look at the section titled “Working with the Contract-Based REST API” located here: API HELP

Authentication

Login

Type: POST
Format: JSON
URL: <URL>/entity/auth/login
BODY:

    {
        "name" : "admin",
        "password" : "123",
        "company" :  ""
    }

Logout

Type: POST
Format: JSON
URL: <URL>/entity/auth/logout
BODY: None

Inventory Items

All Stock Items

Type: GET
Format: JSON
URL: <URL>/entity/Default/17.200.001/StockItem

Check an item’s Onhand Quantity

Type: PUT
Format: JSON
URL: <URL>/entity/17.200.001/InventoryAllocationInquiry
BODY(replace “ELEHDD2” with the InventoryID(s) you want to Query):

{
     "InventoryID": {"value": "ELEHDD2"}
}

Add a $select query parameter to the request to select any specific fields from the report you want to narrow down

Customers

Add a Customer

Type: PUT
Format: JSON
URL: <URL>/entity/Default/17.200.001/Customer
Body:
{
  "CustomerID" : {value : "JOHNGOOD" } ,
  "CustomerName" : {value : "John Good" },
  "MainContact" :
   {
      "Email" : {value : "demo@gmail.com" },
      "Address" :
        {
          "AddressLine1" : {value : "4030 Lake Washington Blvd NE" },
          "AddressLine2" : {value : "Suite 100" },
          "City" : {value : "Kirkland" },
          "State" : {value : "WA" },
          "PostalCode" : {value : "98033" }
        }     
    } 
}

Additionally, fields ‘ShippingContact’ and ‘BillingContact’ can be specified separately from ‘MainContact’ shown above. If these are not specified then a new PurchaseOrder will use the MainContact as both.

Retrieving Customer data

Type: GET
Format: JSON
URL: <URL>/entity/Default/17.200.001/Customer

Use query parameter $filter: To specify filtering conditions
Use query parameter $expand: To expand specific detail entities
Otherwise all current customer data will be sent

Update Existing Customer

Type: PUT
Format: JSON
URL: <URL>/entity/Default/17.200.001/Customer

Use parameter $filter: To specify filtering conditions on key fields that identify the record to be updated
Key Field: CustomerID (string(10))
Example:
URL: <URL>/entity/Default/17.200.001/Customer?$filter=CustomerID eq ‘ABARTENDE’
Body:
{
      "CustomerName": {"value": "Stuffffff"}
}

This will update customer ABARTENDE’s name to ‘Stuffff’

Sales Orders

Add a Sales Order

Type: PUT
Format: JSON
URL: <URL>/entity/Default/17.200.001/SalesOrder
Body:
{
  "CustomerID" : {value : "JOHNGOOD"}
}

This will create a new sales order for the CustomerID chosen, and shipping information of their Primary ‘Location’

{
  "CustomerID" : {value :
"ABARTENDE"},
  "LocationID" : {value :
"VEGAS"}
}

This will create a new sales order for the CustomerID, at an alternate Location ID (applies to ‘Ship To Address’, BillToAddress will always default to the default ‘BillToAddress’ specified in the Customer Record (see this document’s relevant section under Customers):

This will create a new sales order for the CustomerID, using a ship to address that is not currently saved as a location under the CustomerID record (the same can be done with ‘BillToAddress’):

{
  "CustomerID" : {value : "ABARTENDE"},
  "ShipToAddressOverride": {"value": true},
  "ShipToAddress" : {
        "AddressLine1" : {value : "TEST 123"},
        "AddressLine2" : {value : "POBOX 123"},
        "City" : {value : "Seattle"},
        "Country" : {value : "US"},
        "PostalCode" : {value : "95073"},
        "State" : {value : "WA"},
  }

Update a Sales Order

Type: PUT
Format: JSON
URL: <URL>/entity/Default/17.200.001/SalesOrder

Use the same format as “Add a Sales Order”, however you must
specify existing records using query parameter $filter, or else a new record
will be added

Example:
PUT to <URL>/entity/Default/17.200.001/SalesOrder?$filter=OrderNbr eq ‘SO004573’

Body:
{
    "CustomerID" : {value : "ABCVENTURE"}
}

This sets Sales order # ‘SO004573’ value of CustomerID to ABCVENTUREKey Field: OrderNbr (string(10)

Status of a Sales Order

Date received, date entered into the system and current status
Open, closed, backordered, shipped
If shipped – shipping information

Cancel a Sales Order

Type: PUT
Format: JSON
URL: <URL>/entity/Default/17.200.001/SalesOrder/CancelSalesOrder

Body:
{
     "entity":
     {
      "OrderNbr": {"value": "SO004543"}
     }
}

You must create a new request in this format for every
SalesOrder you want to cancel

Further Documentation

Download the Acumatica provided swagger.json file for a full openAPI 2.0 documentation of the existing web endpoint here:

You can then use an Open Api GUI of choice to navigate it

Send a GET Request to any Endpoint with the addition of $adHocSchema to get a list of fields associated with it
Example:<URL>/entity/Default/17.200.001/SalesOrder/$adHocSchema