Skip to content

Stock Item

Return details on stock items.

Released
Updated
URLSupports
{URI}/stockitem/{id}
GET
{URI}/stockitem/search?q={query}
GET
{URI}/stockitem/{id}/image?height={h}&width={w}
GET
{URI} is exo.api.myob.com when connecting to the cloud or the address of the machine hosting the API when connecting on premise.

search returns stock items that match the specified search string.

image returns the stock item's image file with dimensions specified (in pixels) by the height and width parameters. The image’s aspect ratio is preserved if just one of the dimensions is specified. If no dimensions are supplied, the width defaults to 100 pixels (with the height calculated to preserve the aspect ratio). You can return the actual dimensions of the image with width=auto and/or height=auto.

Attribute Details

AttributeTypeNotes
primarygroupidintegerRequired on PUT
primarygroupobject,null
primarygroup.activeboolean
primarygroup.namestring,null
primarygroup.relstring,null
primarygroup.titlestring,null
primarygroup.idintegerRequired on PUT
primarygroup.hrefstring,null
secondarygroupidintegerRequired on PUT
secondarygroupobject,null
secondarygroup.namestring,null
secondarygroup.relstring,null
secondarygroup.titlestring,null
secondarygroup.idintegerRequired on PUT
secondarygroup.hrefstring,null
stockpricegroupidintegerRequired on PUT
stockpricegroupobject,null
stockpricegroup.namestring,null
stockpricegroup.relstring,null
stockpricegroup.titlestring,null
stockpricegroup.idintegerRequired on PUT
stockpricegroup.hrefstring,null
stockclassificationidintegerRequired on PUT
stockclassificationobject,null
stockclassification.namestring,null
stockclassification.relstring,null
stockclassification.titlestring,null
stockclassification.idintegerRequired on PUT
stockclassification.hrefstring,null
suppliercreditoraccountidintegerRequired on PUT
suppliercreditoraccountnamestring,null
unitofmeasureidstring,nullRequired on PUT
unitofmeasureobject,null
unitofmeasure.descriptionstring,null
unitofmeasure.relstring,null
unitofmeasure.titlestring,null
unitofmeasure.idstringRequired on PUT
unitofmeasure.hrefstring,null
salestaxrateidintegerRequired on PUT
salestaxrateobject,null
salestaxrate.namestring,null
salestaxrate.shortnamestring,null
salestaxrate.ratenumber
salestaxrate.relstring,null
salestaxrate.titlestring,null
salestaxrate.idintegerRequired on PUT
salestaxrate.hrefstring,null
serialnumberstrackedboolean
serialnumberstrackingtypeidintegerRequired on PUT
serialnumberstrackingtypenamestring,null
batchnumberstrackedboolean
discountableboolean
canexpireboolean
expireindaysinteger,null
restrictedboolean
totalinstocknumber
barcode1string,null
barcode2string,null
barcode3string,null
showonwebboolean
webdescriptionstring,null
webimagefilenamestring,null
latestcostnumber
suppliercostnumber
standardcostnumber
averagecostnumber
stocktypestring,null
descriptionstring,null
salepricesarray,null
activeboolean
notesstring,null
extrafieldsarray,null
relstring,null
titlestring,null
idstringRequired on PUT
hrefstring,null

Example json GET response

Example

json
[
  {
    "locationid": 1,
    "physical": 16,
    "free": -34,
    "committed": 50,
    "incoming": 0,
    "notforsale": 0,
    "onbackorder": 28
  },
  {
    "locationid": 2,
    "physical": 6,
    "free": 16,
    "committed": 0,
    "incoming": 10,
    "notforsale": 0,
    "onbackorder": 0
  },
  {
    "locationid": 3,
    "physical": 1,
    "free": 1,
    "committed": 0,
    "incoming": 0,
    "notforsale": 0,
    "onbackorder": 0
  },
  {
    "locationid": 4,
    "physical": 5,
    "free": 5,
    "committed": 10,
    "incoming": 10,
    "notforsale": 0,
    "onbackorder": 0
  },
  {
    "locationid": 5,
    "physical": 5,
    "free": 0,
    "committed": 5,
    "incoming": 0,
    "notforsale": 5,
    "onbackorder": 0
  },
  {
    "price": 62.04,
    "id": 1,
    "name": "Internet",
    "currencyid": 0
  },
  {
    "price": 68.24,
    "id": 2,
    "name": "Retail",
    "currencyid": 0
  },
  {
    "price": 61.416,
    "id": 3,
    "name": "Trade",
    "currencyid": 0
  },
  {
    "price": 21.8368,
    "id": 4,
    "name": "UK",
    "currencyid": 0
  },
  {
    "price": 30.708,
    "id": 5,
    "name": "US",
    "currencyid": 0
  },
  {
    "price": 64.828,
    "id": 6,
    "name": "Fiji",
    "currencyid": 0
  },
  {
    "price": 54.592,
    "id": 7,
    "name": "New Zealand",
    "currencyid": 1
  },
  {
    "price": 53.5343,
    "id": 8,
    "name": "Singapore",
    "currencyid": 0
  },
  {
    "price": 0,
    "id": 9,
    "name": "ComputedSellPrice",
    "currencyid": 0
  },
  {
    "price": 0,
    "id": 10,
    "name": "",
    "currencyid": 0
  },
  {
    "key": "X_SIZEID",
    "value": 4
  },
  {
    "key": "X_COLOURID",
    "value": 2
  },
  {
    "key": "X_DATE",
    "value": "2015-05-28"
  },
  {
    "key": "X_DROPDOWN",
    "value": "3. LBLUE"
  },
  {
    "key": "X_INTEGER",
    "value": 4094
  },
  {
    "key": "X_TEXT",
    "value": "435443545"
  },
  {
    "key": "X_CHECKBOX",
    "value": "Y"
  },
  {
    "primarygroupid": 1,
    "secondarygroupid": 0,
    "stockpricegroupid": 0,
    "stockclassificationid": 0,
    "suppliercreditoraccountid": 8,
    "suppliercreditoraccountname": "Aussie Car Parts",
    "unitofmeasureid": "Each",
    "salestaxrateid": -1,
    "serialnumberstracked": false,
    "serialnumberstrackingtypeid": 0,
    "serialnumberstrackingtypename": "NotSerialised",
    "batchnumberstracked": false,
    "discountable": true,
    "canexpire": false,
    "restricted": false,
    "totalinstock": 28,
    "barcode1": "990313654131133",
    "barcode2": "9335613333331621",
    "barcode3": "900032126546656",
    "showonweb": true,
    "webdescription": "OVALCHROME AIR FILTER",
    "webimagefilename": "OVALAIR.JPG",
    "latestcost": 49.99,
    "suppliercost": 39.99,
    "standardcost": 49.99,
    "averagecost": 49.99,
    "stocktype": "PhysicalItem",
    "description": "Ovalchrome Air Filter",
    "active": true,
    "notes": "Aapproved and tested under strict guidance by the national Body of Automotive Association of New Zeland. Conforms to specifications by overseas Manufacturers of similar products",
    "id": "AIRFIL01",
    "href": "{URI}https://exo-stage.api.myob.com/stockitem/AIRFIL01"
  }
]

{URI} is defined as: http://exo.api.myob.com/