Item options

Options on a configurable item.

The object#

FieldTypeDescription
idread-onlyintegerNolaPro id.
itemoptiongroupidintegerItemoptiongroupid. Id only.
itemidintegerReference to items, by id. Write either this or item.
itemstring(255)The sku of the referenced items, instead of the id. Send this or itemid, not both unless they agree.
optioncodestring(50)Short code of the option, shown after its name in pickers.
pricemoneystring(6dp)Stored as decimal(12,6).
costmoneystring(6dp)Stored as decimal(12,6).
minqtyqtystring(6dp)Quantity, 6 decimal places, as a string. Stored as decimal(6dp).
maxqtyqtystring(6dp)Quantity, 6 decimal places, as a string. Stored as decimal(6dp).
mainindinteger0 when the option quantity follows the main item quantity, 1 when it is independent (the screen asks Dependent On Main Item Qty).
namestring(255)Option name shown to the buyer.
descriptiontextDescription. Stored as text, no practical length limit.
priceunitnameidintegerPriceunitnameid. Id only.
priceunitnamestring(50)The unitname of the referenced unitnames, instead of the id. Send this or priceunitnameid, not both unless they agree.
salesunitnameidintegerReference to unitnames, by id. Write either this or salesunitname.
salesunitnamestring(50)The unitname of the referenced unitnames, instead of the id. Send this or salesunitnameid, not both unless they agree.
saleunitperpriceunitnumberstring(2dp)Numeric string, 2 decimal places. Not money - do not apply currency rounding.
lbsperpriceunitnumberstringNumeric string. Not money - do not apply currency rounding.
defaultvaluemoneystring(6dp)Stored as decimal(12,6).
defaultoptioninteger1 preselects this option in its group.
displayorderintegerPosition of the option within its group.
taxableintegerWhether this line is taxed.
salesglaccountidintegerReference to glaccounts, by id. Write either this or salesglaccount.
salesglaccountstring(20)The name of the referenced glaccounts, instead of the id. Send this or salesglaccountid, not both unless they agree.
entrydateread-onlystringWhen the record was created.
lastchangedateread-onlystringLast modification. Drives modifiedsince.
cancelbooleanCancelled. Always a boolean on the wire, whatever integer width the column uses (D23).
externalidstring(100)Your own key. Scoped to your company.

Endpoints#

POST/itemoptions/batch 207

Create many.

Requires scope items:write.

Parameters
NameInTypeNotes
Body array
FieldTypeDescription
idread-onlyintegerNolaPro id.
itemoptiongroupidintegerItemoptiongroupid. Id only.
itemidintegerReference to items, by id. Write either this or item.
itemstring(255)The sku of the referenced items, instead of the id. Send this or itemid, not both unless they agree.
optioncodestring(50)Short code of the option, shown after its name in pickers.
pricemoneystring(6dp)Stored as decimal(12,6).
costmoneystring(6dp)Stored as decimal(12,6).
minqtyqtystring(6dp)Quantity, 6 decimal places, as a string. Stored as decimal(6dp).
maxqtyqtystring(6dp)Quantity, 6 decimal places, as a string. Stored as decimal(6dp).
mainindinteger0 when the option quantity follows the main item quantity, 1 when it is independent (the screen asks Dependent On Main Item Qty).
namestring(255)Option name shown to the buyer.
descriptiontextDescription. Stored as text, no practical length limit.
priceunitnameidintegerPriceunitnameid. Id only.
priceunitnamestring(50)The unitname of the referenced unitnames, instead of the id. Send this or priceunitnameid, not both unless they agree.
salesunitnameidintegerReference to unitnames, by id. Write either this or salesunitname.
salesunitnamestring(50)The unitname of the referenced unitnames, instead of the id. Send this or salesunitnameid, not both unless they agree.
saleunitperpriceunitnumberstring(2dp)Numeric string, 2 decimal places. Not money - do not apply currency rounding.
lbsperpriceunitnumberstringNumeric string. Not money - do not apply currency rounding.
defaultvaluemoneystring(6dp)Stored as decimal(12,6).
defaultoptioninteger1 preselects this option in its group.
displayorderintegerPosition of the option within its group.
taxableintegerWhether this line is taxed.
salesglaccountidintegerReference to glaccounts, by id. Write either this or salesglaccount.
salesglaccountstring(20)The name of the referenced glaccounts, instead of the id. Send this or salesglaccountid, not both unless they agree.
entrydateread-onlystringWhen the record was created.
lastchangedateread-onlystringLast modification. Drives modifiedsince.
cancelbooleanCancelled. Always a boolean on the wire, whatever integer width the column uses (D23).
externalidstring(100)Your own key. Scoped to your company.
curl -X POST \
  'https://acme.nolapro.com/!/api/v2/itemoptions/batch' \
  -H 'Authorization: Bearer $NP_TOKEN' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: your-unique-key' \
  -d '[
    {
        "itemoptiongroupid": 104,
        "itemid": 104,
        "item": "Example item",
        "optioncode": "ACME-01",
        "price": "125.0000",
        "cost": "125.0000"
    }
]'
GET/itemoptions 200403

List item options.

Requires scope items:read.

Parameters
NameInTypeNotes
itemidquerystringRestrict to one itemid.
descriptionquerystringdescription. Partial match, case-insensitive.
namequerystringPartial match, case insensitive.
cancelquerystringDefaults to false. Pass true or any.
modifiedsincequerystringRFC 3339 UTC timestamp. Returns only records changed since then, including cancelled ones - so cancel defaults to any rather than false when this is used. The response carries _meta.synced_through; store it and send it back next time.
externalidquerystringExact match on your own key.
includequerystringComma-separated extras to embed. Only custom_fields is available: the extra fields this install has defined on the record. Off by default, and an unrecognised value is refused rather than ignored. See Conventions.
When it fails
StatusCodeMeaning
403insufficient_scopeToken lacks read scope.
curl \
  'https://acme.nolapro.com/!/api/v2/itemoptions' \
  -H 'Authorization: Bearer $NP_TOKEN'
POST/itemoptions 201400

Create.

Requires scope items:write.

Parameters
NameInTypeNotes
Body
FieldTypeDescription
idread-onlyintegerNolaPro id.
itemoptiongroupidintegerItemoptiongroupid. Id only.
itemidintegerReference to items, by id. Write either this or item.
itemstring(255)The sku of the referenced items, instead of the id. Send this or itemid, not both unless they agree.
optioncodestring(50)Short code of the option, shown after its name in pickers.
pricemoneystring(6dp)Stored as decimal(12,6).
costmoneystring(6dp)Stored as decimal(12,6).
minqtyqtystring(6dp)Quantity, 6 decimal places, as a string. Stored as decimal(6dp).
maxqtyqtystring(6dp)Quantity, 6 decimal places, as a string. Stored as decimal(6dp).
mainindinteger0 when the option quantity follows the main item quantity, 1 when it is independent (the screen asks Dependent On Main Item Qty).
namestring(255)Option name shown to the buyer.
descriptiontextDescription. Stored as text, no practical length limit.
priceunitnameidintegerPriceunitnameid. Id only.
priceunitnamestring(50)The unitname of the referenced unitnames, instead of the id. Send this or priceunitnameid, not both unless they agree.
salesunitnameidintegerReference to unitnames, by id. Write either this or salesunitname.
salesunitnamestring(50)The unitname of the referenced unitnames, instead of the id. Send this or salesunitnameid, not both unless they agree.
saleunitperpriceunitnumberstring(2dp)Numeric string, 2 decimal places. Not money - do not apply currency rounding.
lbsperpriceunitnumberstringNumeric string. Not money - do not apply currency rounding.
defaultvaluemoneystring(6dp)Stored as decimal(12,6).
defaultoptioninteger1 preselects this option in its group.
displayorderintegerPosition of the option within its group.
taxableintegerWhether this line is taxed.
salesglaccountidintegerReference to glaccounts, by id. Write either this or salesglaccount.
salesglaccountstring(20)The name of the referenced glaccounts, instead of the id. Send this or salesglaccountid, not both unless they agree.
entrydateread-onlystringWhen the record was created.
lastchangedateread-onlystringLast modification. Drives modifiedsince.
cancelbooleanCancelled. Always a boolean on the wire, whatever integer width the column uses (D23).
externalidstring(100)Your own key. Scoped to your company.
When it fails
StatusCodeMeaning
400invalid_requestA required field was missing.
curl -X POST \
  'https://acme.nolapro.com/!/api/v2/itemoptions' \
  -H 'Authorization: Bearer $NP_TOKEN' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: your-unique-key' \
  -d '{
    "itemoptiongroupid": 104,
    "itemid": 104,
    "item": "Example item",
    "optioncode": "ACME-01",
    "price": "125.0000",
    "cost": "125.0000"
}'
Response 201
{
    "itemoptiongroupid": 104,
    "itemid": 104,
    "item": "Example item",
    "optioncode": "ACME-01",
    "price": "125.0000",
    "cost": "125.0000"
}
GET/itemoptions/{id} 200404

Retrieve one record.

Requires scope items:read.

Parameters
NameInTypeNotes
idrequiredpathintegerThe record id.
includequerystringComma-separated extras to embed. Only custom_fields is available: the extra fields this install has defined on the record. Off by default, and an unrecognised value is refused rather than ignored. See Conventions.
When it fails
StatusCodeMeaning
404not_foundNo record with that id.
curl \
  'https://acme.nolapro.com/!/api/v2/itemoptions/104' \
  -H 'Authorization: Bearer $NP_TOKEN'
Response 200
{
    "itemoptiongroupid": 104,
    "itemid": 104,
    "item": "Example item",
    "optioncode": "ACME-01",
    "price": "125.0000",
    "cost": "125.0000"
}
PATCH/itemoptions/{id} 200404

Update.

Requires scope items:write.

Parameters
NameInTypeNotes
idrequiredpathintegerThe record id.
Body
FieldTypeDescription
idread-onlyintegerNolaPro id.
itemoptiongroupidintegerItemoptiongroupid. Id only.
itemidintegerReference to items, by id. Write either this or item.
itemstring(255)The sku of the referenced items, instead of the id. Send this or itemid, not both unless they agree.
optioncodestring(50)Short code of the option, shown after its name in pickers.
pricemoneystring(6dp)Stored as decimal(12,6).
costmoneystring(6dp)Stored as decimal(12,6).
minqtyqtystring(6dp)Quantity, 6 decimal places, as a string. Stored as decimal(6dp).
maxqtyqtystring(6dp)Quantity, 6 decimal places, as a string. Stored as decimal(6dp).
mainindinteger0 when the option quantity follows the main item quantity, 1 when it is independent (the screen asks Dependent On Main Item Qty).
namestring(255)Option name shown to the buyer.
descriptiontextDescription. Stored as text, no practical length limit.
priceunitnameidintegerPriceunitnameid. Id only.
priceunitnamestring(50)The unitname of the referenced unitnames, instead of the id. Send this or priceunitnameid, not both unless they agree.
salesunitnameidintegerReference to unitnames, by id. Write either this or salesunitname.
salesunitnamestring(50)The unitname of the referenced unitnames, instead of the id. Send this or salesunitnameid, not both unless they agree.
saleunitperpriceunitnumberstring(2dp)Numeric string, 2 decimal places. Not money - do not apply currency rounding.
lbsperpriceunitnumberstringNumeric string. Not money - do not apply currency rounding.
defaultvaluemoneystring(6dp)Stored as decimal(12,6).
defaultoptioninteger1 preselects this option in its group.
displayorderintegerPosition of the option within its group.
taxableintegerWhether this line is taxed.
salesglaccountidintegerReference to glaccounts, by id. Write either this or salesglaccount.
salesglaccountstring(20)The name of the referenced glaccounts, instead of the id. Send this or salesglaccountid, not both unless they agree.
entrydateread-onlystringWhen the record was created.
lastchangedateread-onlystringLast modification. Drives modifiedsince.
cancelbooleanCancelled. Always a boolean on the wire, whatever integer width the column uses (D23).
externalidstring(100)Your own key. Scoped to your company.
When it fails
StatusCodeMeaning
404not_foundNo record with that id.
curl -X PATCH \
  'https://acme.nolapro.com/!/api/v2/itemoptions/104' \
  -H 'Authorization: Bearer $NP_TOKEN' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: your-unique-key' \
  -d '{
    "itemoptiongroupid": 104,
    "itemid": 104,
    "item": "Example item",
    "optioncode": "ACME-01",
    "price": "125.0000",
    "cost": "125.0000"
}'
Response 200
{
    "itemoptiongroupid": 104,
    "itemid": 104,
    "item": "Example item",
    "optioncode": "ACME-01",
    "price": "125.0000",
    "cost": "125.0000"
}
DELETE/itemoptions/{id} 200404

Cancel.

Requires scope items:cancel.

Parameters
NameInTypeNotes
idrequiredpathintegerThe record id.
When it fails
StatusCodeMeaning
404not_foundNo record with that id.
curl -X DELETE \
  'https://acme.nolapro.com/!/api/v2/itemoptions/104' \
  -H 'Authorization: Bearer $NP_TOKEN'
Response 200
{
    "itemoptiongroupid": 104,
    "itemid": 104,
    "item": "Example item",
    "optioncode": "ACME-01",
    "price": "125.0000",
    "cost": "125.0000"
}