Stock Item
Return details on stock items.
Released
Updated
| URL | Supports |
|---|---|
{URI}/stockitem/{id} | |
{URI}/stockitem/search?q={query} | |
{URI}/stockitem/{id}/image?height={h}&width={w} | |
| {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
| Attribute | Type | Notes |
|---|---|---|
primarygroupid | integer | Required on PUT |
primarygroup | object,null | |
primarygroup.active | boolean | |
primarygroup.name | string,null | |
primarygroup.rel | string,null | |
primarygroup.title | string,null | |
primarygroup.id | integer | Required on PUT |
primarygroup.href | string,null | |
secondarygroupid | integer | Required on PUT |
secondarygroup | object,null | |
secondarygroup.name | string,null | |
secondarygroup.rel | string,null | |
secondarygroup.title | string,null | |
secondarygroup.id | integer | Required on PUT |
secondarygroup.href | string,null | |
stockpricegroupid | integer | Required on PUT |
stockpricegroup | object,null | |
stockpricegroup.name | string,null | |
stockpricegroup.rel | string,null | |
stockpricegroup.title | string,null | |
stockpricegroup.id | integer | Required on PUT |
stockpricegroup.href | string,null | |
stockclassificationid | integer | Required on PUT |
stockclassification | object,null | |
stockclassification.name | string,null | |
stockclassification.rel | string,null | |
stockclassification.title | string,null | |
stockclassification.id | integer | Required on PUT |
stockclassification.href | string,null | |
suppliercreditoraccountid | integer | Required on PUT |
suppliercreditoraccountname | string,null | |
unitofmeasureid | string,null | Required on PUT |
unitofmeasure | object,null | |
unitofmeasure.description | string,null | |
unitofmeasure.rel | string,null | |
unitofmeasure.title | string,null | |
unitofmeasure.id | string | Required on PUT |
unitofmeasure.href | string,null | |
salestaxrateid | integer | Required on PUT |
salestaxrate | object,null | |
salestaxrate.name | string,null | |
salestaxrate.shortname | string,null | |
salestaxrate.rate | number | |
salestaxrate.rel | string,null | |
salestaxrate.title | string,null | |
salestaxrate.id | integer | Required on PUT |
salestaxrate.href | string,null | |
serialnumberstracked | boolean | |
serialnumberstrackingtypeid | integer | Required on PUT |
serialnumberstrackingtypename | string,null | |
batchnumberstracked | boolean | |
discountable | boolean | |
canexpire | boolean | |
expireindays | integer,null | |
restricted | boolean | |
totalinstock | number | |
barcode1 | string,null | |
barcode2 | string,null | |
barcode3 | string,null | |
showonweb | boolean | |
webdescription | string,null | |
webimagefilename | string,null | |
latestcost | number | |
suppliercost | number | |
standardcost | number | |
averagecost | number | |
stocktype | string,null | |
description | string,null | |
saleprices | array,null | |
active | boolean | |
notes | string,null | |
extrafields | array,null | |
rel | string,null | |
title | string,null | |
id | string | Required on PUT |
href | string,null |
Example json GET response
Example
[
{
"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/