Shipment lines

What was shipped, per line.

The object#

FieldTypeDescription
idread-onlyintegerNolaPro id.
ordershipidintegerOrdershipid. Id only.
orderdetailidintegerOrderdetailid. Id only.
shipqtyqtystring(6dp)Quantity, 6 decimal places, as a string. Stored as decimal(6dp).
entrydatestringWhen the record was created.
lastchangedateread-onlystringLast modification. Drives modifiedsince.
inventoryglacctidintegerInventoryglacctid. Id only.
inventoryglacctstring(20)The name of the referenced glaccounts, instead of the id. Send this or inventoryglacctid, not both unless they agree.
costeachmoneystring(6dp)Stored as decimal(19,6).
adjustmentqtyqtystring(6dp)Quantity, 6 decimal places, as a string. Stored as decimal(6dp).
adjustmentqtysansonhandqtystring(6dp)Quantity, 6 decimal places, as a string. Stored as decimal(6dp).
lastrentalbilldatestringDate rental on the shipped line was last billed through.
minrentalbilldatestringEarliest date rental on the line may bill from.
rentalisoffrentbooleanTrue once the rental item has come off rent.
rentalissoldbooleanTrue when the rented item was sold to the customer instead of returned.
rentaloffrentdatestringDate the item came off rent.
rentaloffrentqtyqtystring(6dp)Quantity, 6 decimal places, as a string. Stored as decimal(6dp).
rentalreturncompletebooleanTrue once the rental return is complete.
rentalreturndatestringDate the rental item was returned.
rentalreturnqtyqtystring(6dp)Quantity, 6 decimal places, as a string. Stored as decimal(6dp).
rentalsolddatestringDate the rented item was sold to the customer.
rentalsoldqtyqtystring(6dp)Quantity, 6 decimal places, as a string. Stored as decimal(6dp).
rentalvaluemoneystring(6dp)Stored as decimal(19,6).
assetidintegerAssetid. Id only.
externalidstring(100)Your own key. Scoped to your company.

Endpoints#

POST/shipmentlines/batch 207

Create many.

Not supported, for the same reason as POST /shipmentlines: only Arorder_model::ship() withdraws stock. Answers 422 use_shipments_endpoint. Use POST /shipments, which already takes several lines at once.

Requires scope shipments:write.

Parameters
NameInTypeNotes
Body array
FieldTypeDescription
idread-onlyintegerNolaPro id.
ordershipidintegerOrdershipid. Id only.
orderdetailidintegerOrderdetailid. Id only.
shipqtyqtystring(6dp)Quantity, 6 decimal places, as a string. Stored as decimal(6dp).
entrydatestringWhen the record was created.
lastchangedateread-onlystringLast modification. Drives modifiedsince.
inventoryglacctidintegerInventoryglacctid. Id only.
inventoryglacctstring(20)The name of the referenced glaccounts, instead of the id. Send this or inventoryglacctid, not both unless they agree.
costeachmoneystring(6dp)Stored as decimal(19,6).
adjustmentqtyqtystring(6dp)Quantity, 6 decimal places, as a string. Stored as decimal(6dp).
adjustmentqtysansonhandqtystring(6dp)Quantity, 6 decimal places, as a string. Stored as decimal(6dp).
lastrentalbilldatestringDate rental on the shipped line was last billed through.
minrentalbilldatestringEarliest date rental on the line may bill from.
rentalisoffrentbooleanTrue once the rental item has come off rent.
rentalissoldbooleanTrue when the rented item was sold to the customer instead of returned.
rentaloffrentdatestringDate the item came off rent.
rentaloffrentqtyqtystring(6dp)Quantity, 6 decimal places, as a string. Stored as decimal(6dp).
rentalreturncompletebooleanTrue once the rental return is complete.
rentalreturndatestringDate the rental item was returned.
rentalreturnqtyqtystring(6dp)Quantity, 6 decimal places, as a string. Stored as decimal(6dp).
rentalsolddatestringDate the rented item was sold to the customer.
rentalsoldqtyqtystring(6dp)Quantity, 6 decimal places, as a string. Stored as decimal(6dp).
rentalvaluemoneystring(6dp)Stored as decimal(19,6).
assetidintegerAssetid. Id only.
externalidstring(100)Your own key. Scoped to your company.
curl -X POST \
  'https://acme.nolapro.com/!/api/v2/shipmentlines/batch' \
  -H 'Authorization: Bearer $NP_TOKEN' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: your-unique-key' \
  -d '[
    {
        "ordershipid": 104,
        "orderdetailid": 104,
        "shipqty": "1.000000",
        "inventoryglacctid": 104,
        "inventoryglacct": "Example inventoryglacct",
        "costeach": "125.0000"
    }
]'
GET/shipmentlines 200403

List shipment lines.

Requires scope shipments:read.

Parameters
NameInTypeNotes
ordershipidquerystringRestrict to one ordershipid.
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/shipmentlines' \
  -H 'Authorization: Bearer $NP_TOKEN'
POST/shipmentlines 201400

Create.

Not supported. A shipment line is the record of stock leaving, and only Arorder_model::ship() actually withdraws it - writing the line on its own would claim a movement that never happened. Use POST /shipments, which accepts several lines at once. This endpoint answers 422 use_shipments_endpoint.

Requires scope shipments:write.

Parameters
NameInTypeNotes
Body
FieldTypeDescription
idread-onlyintegerNolaPro id.
ordershipidintegerOrdershipid. Id only.
orderdetailidintegerOrderdetailid. Id only.
shipqtyqtystring(6dp)Quantity, 6 decimal places, as a string. Stored as decimal(6dp).
entrydatestringWhen the record was created.
lastchangedateread-onlystringLast modification. Drives modifiedsince.
inventoryglacctidintegerInventoryglacctid. Id only.
inventoryglacctstring(20)The name of the referenced glaccounts, instead of the id. Send this or inventoryglacctid, not both unless they agree.
costeachmoneystring(6dp)Stored as decimal(19,6).
adjustmentqtyqtystring(6dp)Quantity, 6 decimal places, as a string. Stored as decimal(6dp).
adjustmentqtysansonhandqtystring(6dp)Quantity, 6 decimal places, as a string. Stored as decimal(6dp).
lastrentalbilldatestringDate rental on the shipped line was last billed through.
minrentalbilldatestringEarliest date rental on the line may bill from.
rentalisoffrentbooleanTrue once the rental item has come off rent.
rentalissoldbooleanTrue when the rented item was sold to the customer instead of returned.
rentaloffrentdatestringDate the item came off rent.
rentaloffrentqtyqtystring(6dp)Quantity, 6 decimal places, as a string. Stored as decimal(6dp).
rentalreturncompletebooleanTrue once the rental return is complete.
rentalreturndatestringDate the rental item was returned.
rentalreturnqtyqtystring(6dp)Quantity, 6 decimal places, as a string. Stored as decimal(6dp).
rentalsolddatestringDate the rented item was sold to the customer.
rentalsoldqtyqtystring(6dp)Quantity, 6 decimal places, as a string. Stored as decimal(6dp).
rentalvaluemoneystring(6dp)Stored as decimal(19,6).
assetidintegerAssetid. Id only.
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/shipmentlines' \
  -H 'Authorization: Bearer $NP_TOKEN' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: your-unique-key' \
  -d '{
    "ordershipid": 104,
    "orderdetailid": 104,
    "shipqty": "1.000000",
    "inventoryglacctid": 104,
    "inventoryglacct": "Example inventoryglacct",
    "costeach": "125.0000"
}'
Response 201
{
    "ordershipid": 104,
    "orderdetailid": 104,
    "shipqty": "1.000000",
    "inventoryglacctid": 104,
    "inventoryglacct": "Example inventoryglacct",
    "costeach": "125.0000"
}
GET/shipmentlines/{id} 200404

Retrieve one record.

Requires scope shipments: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/shipmentlines/104' \
  -H 'Authorization: Bearer $NP_TOKEN'
Response 200
{
    "ordershipid": 104,
    "orderdetailid": 104,
    "shipqty": "1.000000",
    "inventoryglacctid": 104,
    "inventoryglacct": "Example inventoryglacct",
    "costeach": "125.0000"
}
PATCH/shipmentlines/{id} 200404

Update.

Not supported. A shipment line quantity IS the stock movement; amending it would change the record without moving anything back. Cancel the shipment with DELETE /shipments/{id}, which returns the stock, then ship again. Answers 422 use_shipments_endpoint.

Requires scope shipments:write.

Parameters
NameInTypeNotes
idrequiredpathintegerThe record id.
Body
FieldTypeDescription
idread-onlyintegerNolaPro id.
ordershipidintegerOrdershipid. Id only.
orderdetailidintegerOrderdetailid. Id only.
shipqtyqtystring(6dp)Quantity, 6 decimal places, as a string. Stored as decimal(6dp).
entrydatestringWhen the record was created.
lastchangedateread-onlystringLast modification. Drives modifiedsince.
inventoryglacctidintegerInventoryglacctid. Id only.
inventoryglacctstring(20)The name of the referenced glaccounts, instead of the id. Send this or inventoryglacctid, not both unless they agree.
costeachmoneystring(6dp)Stored as decimal(19,6).
adjustmentqtyqtystring(6dp)Quantity, 6 decimal places, as a string. Stored as decimal(6dp).
adjustmentqtysansonhandqtystring(6dp)Quantity, 6 decimal places, as a string. Stored as decimal(6dp).
lastrentalbilldatestringDate rental on the shipped line was last billed through.
minrentalbilldatestringEarliest date rental on the line may bill from.
rentalisoffrentbooleanTrue once the rental item has come off rent.
rentalissoldbooleanTrue when the rented item was sold to the customer instead of returned.
rentaloffrentdatestringDate the item came off rent.
rentaloffrentqtyqtystring(6dp)Quantity, 6 decimal places, as a string. Stored as decimal(6dp).
rentalreturncompletebooleanTrue once the rental return is complete.
rentalreturndatestringDate the rental item was returned.
rentalreturnqtyqtystring(6dp)Quantity, 6 decimal places, as a string. Stored as decimal(6dp).
rentalsolddatestringDate the rented item was sold to the customer.
rentalsoldqtyqtystring(6dp)Quantity, 6 decimal places, as a string. Stored as decimal(6dp).
rentalvaluemoneystring(6dp)Stored as decimal(19,6).
assetidintegerAssetid. Id only.
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/shipmentlines/104' \
  -H 'Authorization: Bearer $NP_TOKEN' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: your-unique-key' \
  -d '{
    "ordershipid": 104,
    "orderdetailid": 104,
    "shipqty": "1.000000",
    "inventoryglacctid": 104,
    "inventoryglacct": "Example inventoryglacct",
    "costeach": "125.0000"
}'
Response 200
{
    "ordershipid": 104,
    "orderdetailid": 104,
    "shipqty": "1.000000",
    "inventoryglacctid": 104,
    "inventoryglacct": "Example inventoryglacct",
    "costeach": "125.0000"
}