Shipment lines
What was shipped, per line.
The object#
| Field | Type | Description |
|---|---|---|
| idread-only | integer | NolaPro id. |
| ordershipid | integer | Ordershipid. Id only. |
| orderdetailid | integer | Orderdetailid. Id only. |
| shipqtyqty | string(6dp) | Quantity, 6 decimal places, as a string. Stored as decimal(6dp). |
| entrydate | string | When the record was created. |
| lastchangedateread-only | string | Last modification. Drives modifiedsince. |
| inventoryglacctid | integer | Inventoryglacctid. Id only. |
| inventoryglacct | string(20) | The name of the referenced glaccounts, instead of the id. Send this or inventoryglacctid, not both unless they agree. |
| costeachmoney | string(6dp) | Stored as decimal(19,6). |
| adjustmentqtyqty | string(6dp) | Quantity, 6 decimal places, as a string. Stored as decimal(6dp). |
| adjustmentqtysansonhandqty | string(6dp) | Quantity, 6 decimal places, as a string. Stored as decimal(6dp). |
| lastrentalbilldate | string | Date rental on the shipped line was last billed through. |
| minrentalbilldate | string | Earliest date rental on the line may bill from. |
| rentalisoffrent | boolean | True once the rental item has come off rent. |
| rentalissold | boolean | True when the rented item was sold to the customer instead of returned. |
| rentaloffrentdate | string | Date the item came off rent. |
| rentaloffrentqtyqty | string(6dp) | Quantity, 6 decimal places, as a string. Stored as decimal(6dp). |
| rentalreturncomplete | boolean | True once the rental return is complete. |
| rentalreturndate | string | Date the rental item was returned. |
| rentalreturnqtyqty | string(6dp) | Quantity, 6 decimal places, as a string. Stored as decimal(6dp). |
| rentalsolddate | string | Date the rented item was sold to the customer. |
| rentalsoldqtyqty | string(6dp) | Quantity, 6 decimal places, as a string. Stored as decimal(6dp). |
| rentalvaluemoney | string(6dp) | Stored as decimal(19,6). |
| assetid | integer | Assetid. Id only. |
| externalid | string(100) | Your own key. Scoped to your company. |
Endpoints#
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.
| Name | In | Type | Notes |
|---|---|---|---|
| Field | Type | Description |
|---|---|---|
| idread-only | integer | NolaPro id. |
| ordershipid | integer | Ordershipid. Id only. |
| orderdetailid | integer | Orderdetailid. Id only. |
| shipqtyqty | string(6dp) | Quantity, 6 decimal places, as a string. Stored as decimal(6dp). |
| entrydate | string | When the record was created. |
| lastchangedateread-only | string | Last modification. Drives modifiedsince. |
| inventoryglacctid | integer | Inventoryglacctid. Id only. |
| inventoryglacct | string(20) | The name of the referenced glaccounts, instead of the id. Send this or inventoryglacctid, not both unless they agree. |
| costeachmoney | string(6dp) | Stored as decimal(19,6). |
| adjustmentqtyqty | string(6dp) | Quantity, 6 decimal places, as a string. Stored as decimal(6dp). |
| adjustmentqtysansonhandqty | string(6dp) | Quantity, 6 decimal places, as a string. Stored as decimal(6dp). |
| lastrentalbilldate | string | Date rental on the shipped line was last billed through. |
| minrentalbilldate | string | Earliest date rental on the line may bill from. |
| rentalisoffrent | boolean | True once the rental item has come off rent. |
| rentalissold | boolean | True when the rented item was sold to the customer instead of returned. |
| rentaloffrentdate | string | Date the item came off rent. |
| rentaloffrentqtyqty | string(6dp) | Quantity, 6 decimal places, as a string. Stored as decimal(6dp). |
| rentalreturncomplete | boolean | True once the rental return is complete. |
| rentalreturndate | string | Date the rental item was returned. |
| rentalreturnqtyqty | string(6dp) | Quantity, 6 decimal places, as a string. Stored as decimal(6dp). |
| rentalsolddate | string | Date the rented item was sold to the customer. |
| rentalsoldqtyqty | string(6dp) | Quantity, 6 decimal places, as a string. Stored as decimal(6dp). |
| rentalvaluemoney | string(6dp) | Stored as decimal(19,6). |
| assetid | integer | Assetid. Id only. |
| externalid | string(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" } ]'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/shipmentlines/batch'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('NP_TOKEN')], CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => json_encode([ [ 'ordershipid' => 104, 'orderdetailid' => 104, 'shipqty' => '1.000000', 'inventoryglacctid' => 104, 'inventoryglacct' => 'Example inventoryglacct', 'costeach' => '125.0000', ], ]), ]); $res = json_decode(curl_exec($ch), true);
import os, requests r = requests.post( "https://acme.nolapro.com/!/api/v2/shipmentlines/batch", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, json=[ { "ordershipid": 104, "orderdetailid": 104, "shipqty": "1.000000", "inventoryglacctid": 104, "inventoryglacct": "Example inventoryglacct", "costeach": "125.0000", }, ], ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/shipmentlines/batch', { method: 'POST', headers: { Authorization: `Bearer ${process.env.NP_TOKEN}` }, body: JSON.stringify([ { ordershipid: 104, orderdetailid: 104, shipqty: "1.000000", inventoryglacctid: 104, inventoryglacct: "Example inventoryglacct", costeach: "125.0000", }, ]), } ); const data = await res.json();
using System.Net.Http.Json; var token = Environment.GetEnvironmentVariable("NP_TOKEN"); using var http = new HttpClient(); http.DefaultRequestHeaders.Add("Authorization", "Bearer " + token); var body = new[] { new { ordershipid = 104, orderdetailid = 104, shipqty = "1.000000", inventoryglacctid = 104, inventoryglacct = "Example inventoryglacct", costeach = "125.0000", }, }; var req = new HttpRequestMessage(HttpMethod.Post, "https://acme.nolapro.com/!/api/v2/shipmentlines/batch") { Content = JsonContent.Create(body), }; req.Headers.Add("Idempotency-Key", "your-unique-key"); var res = await http.SendAsync(req); res.EnsureSuccessStatusCode();
List shipment lines.
Requires scope shipments:read.
| Name | In | Type | Notes |
|---|---|---|---|
| ordershipid | query | string | Restrict to one ordershipid. |
| modifiedsince | query | string | RFC 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. |
| externalid | query | string | Exact match on your own key. |
| include | query | string | Comma-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. |
| Status | Code | Meaning |
|---|---|---|
| 403 | insufficient_scope | Token lacks read scope. |
curl \ 'https://acme.nolapro.com/!/api/v2/shipmentlines' \ -H 'Authorization: Bearer $NP_TOKEN'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/shipmentlines'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('NP_TOKEN')], CURLOPT_RETURNTRANSFER => true, ]); $res = json_decode(curl_exec($ch), true);
import os, requests r = requests.get( "https://acme.nolapro.com/!/api/v2/shipmentlines", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/shipmentlines', { method: 'GET', headers: { Authorization: `Bearer ${process.env.NP_TOKEN}` }, } ); const data = await res.json();
using System.Net.Http.Json; var token = Environment.GetEnvironmentVariable("NP_TOKEN"); using var http = new HttpClient(); http.DefaultRequestHeaders.Add("Authorization", "Bearer " + token); var res = await http.GetAsync( "https://acme.nolapro.com/!/api/v2/shipmentlines"); res.EnsureSuccessStatusCode();
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.
| Name | In | Type | Notes |
|---|---|---|---|
| Field | Type | Description |
|---|---|---|
| idread-only | integer | NolaPro id. |
| ordershipid | integer | Ordershipid. Id only. |
| orderdetailid | integer | Orderdetailid. Id only. |
| shipqtyqty | string(6dp) | Quantity, 6 decimal places, as a string. Stored as decimal(6dp). |
| entrydate | string | When the record was created. |
| lastchangedateread-only | string | Last modification. Drives modifiedsince. |
| inventoryglacctid | integer | Inventoryglacctid. Id only. |
| inventoryglacct | string(20) | The name of the referenced glaccounts, instead of the id. Send this or inventoryglacctid, not both unless they agree. |
| costeachmoney | string(6dp) | Stored as decimal(19,6). |
| adjustmentqtyqty | string(6dp) | Quantity, 6 decimal places, as a string. Stored as decimal(6dp). |
| adjustmentqtysansonhandqty | string(6dp) | Quantity, 6 decimal places, as a string. Stored as decimal(6dp). |
| lastrentalbilldate | string | Date rental on the shipped line was last billed through. |
| minrentalbilldate | string | Earliest date rental on the line may bill from. |
| rentalisoffrent | boolean | True once the rental item has come off rent. |
| rentalissold | boolean | True when the rented item was sold to the customer instead of returned. |
| rentaloffrentdate | string | Date the item came off rent. |
| rentaloffrentqtyqty | string(6dp) | Quantity, 6 decimal places, as a string. Stored as decimal(6dp). |
| rentalreturncomplete | boolean | True once the rental return is complete. |
| rentalreturndate | string | Date the rental item was returned. |
| rentalreturnqtyqty | string(6dp) | Quantity, 6 decimal places, as a string. Stored as decimal(6dp). |
| rentalsolddate | string | Date the rented item was sold to the customer. |
| rentalsoldqtyqty | string(6dp) | Quantity, 6 decimal places, as a string. Stored as decimal(6dp). |
| rentalvaluemoney | string(6dp) | Stored as decimal(19,6). |
| assetid | integer | Assetid. Id only. |
| externalid | string(100) | Your own key. Scoped to your company. |
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request | A 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" }'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/shipmentlines'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('NP_TOKEN')], CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => json_encode([ 'ordershipid' => 104, 'orderdetailid' => 104, 'shipqty' => '1.000000', 'inventoryglacctid' => 104, 'inventoryglacct' => 'Example inventoryglacct', 'costeach' => '125.0000', ]), ]); $res = json_decode(curl_exec($ch), true);
import os, requests r = requests.post( "https://acme.nolapro.com/!/api/v2/shipmentlines", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, json={ "ordershipid": 104, "orderdetailid": 104, "shipqty": "1.000000", "inventoryglacctid": 104, "inventoryglacct": "Example inventoryglacct", "costeach": "125.0000", }, ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/shipmentlines', { method: 'POST', headers: { Authorization: `Bearer ${process.env.NP_TOKEN}` }, body: JSON.stringify({ ordershipid: 104, orderdetailid: 104, shipqty: "1.000000", inventoryglacctid: 104, inventoryglacct: "Example inventoryglacct", costeach: "125.0000", }), } ); const data = await res.json();
using System.Net.Http.Json; var token = Environment.GetEnvironmentVariable("NP_TOKEN"); using var http = new HttpClient(); http.DefaultRequestHeaders.Add("Authorization", "Bearer " + token); var body = new { ordershipid = 104, orderdetailid = 104, shipqty = "1.000000", inventoryglacctid = 104, inventoryglacct = "Example inventoryglacct", costeach = "125.0000", }; var req = new HttpRequestMessage(HttpMethod.Post, "https://acme.nolapro.com/!/api/v2/shipmentlines") { Content = JsonContent.Create(body), }; req.Headers.Add("Idempotency-Key", "your-unique-key"); var res = await http.SendAsync(req); res.EnsureSuccessStatusCode();
{
"ordershipid": 104,
"orderdetailid": 104,
"shipqty": "1.000000",
"inventoryglacctid": 104,
"inventoryglacct": "Example inventoryglacct",
"costeach": "125.0000"
}
Retrieve one record.
Requires scope shipments:read.
| Name | In | Type | Notes |
|---|---|---|---|
| idrequired | path | integer | The record id. |
| include | query | string | Comma-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. |
| Status | Code | Meaning |
|---|---|---|
| 404 | not_found | No record with that id. |
curl \ 'https://acme.nolapro.com/!/api/v2/shipmentlines/104' \ -H 'Authorization: Bearer $NP_TOKEN'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/shipmentlines/104'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('NP_TOKEN')], CURLOPT_RETURNTRANSFER => true, ]); $res = json_decode(curl_exec($ch), true);
import os, requests r = requests.get( "https://acme.nolapro.com/!/api/v2/shipmentlines/104", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/shipmentlines/104', { method: 'GET', headers: { Authorization: `Bearer ${process.env.NP_TOKEN}` }, } ); const data = await res.json();
using System.Net.Http.Json; var token = Environment.GetEnvironmentVariable("NP_TOKEN"); using var http = new HttpClient(); http.DefaultRequestHeaders.Add("Authorization", "Bearer " + token); var res = await http.GetAsync( "https://acme.nolapro.com/!/api/v2/shipmentlines/104"); res.EnsureSuccessStatusCode();
{
"ordershipid": 104,
"orderdetailid": 104,
"shipqty": "1.000000",
"inventoryglacctid": 104,
"inventoryglacct": "Example inventoryglacct",
"costeach": "125.0000"
}
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.
| Name | In | Type | Notes |
|---|---|---|---|
| idrequired | path | integer | The record id. |
| Field | Type | Description |
|---|---|---|
| idread-only | integer | NolaPro id. |
| ordershipid | integer | Ordershipid. Id only. |
| orderdetailid | integer | Orderdetailid. Id only. |
| shipqtyqty | string(6dp) | Quantity, 6 decimal places, as a string. Stored as decimal(6dp). |
| entrydate | string | When the record was created. |
| lastchangedateread-only | string | Last modification. Drives modifiedsince. |
| inventoryglacctid | integer | Inventoryglacctid. Id only. |
| inventoryglacct | string(20) | The name of the referenced glaccounts, instead of the id. Send this or inventoryglacctid, not both unless they agree. |
| costeachmoney | string(6dp) | Stored as decimal(19,6). |
| adjustmentqtyqty | string(6dp) | Quantity, 6 decimal places, as a string. Stored as decimal(6dp). |
| adjustmentqtysansonhandqty | string(6dp) | Quantity, 6 decimal places, as a string. Stored as decimal(6dp). |
| lastrentalbilldate | string | Date rental on the shipped line was last billed through. |
| minrentalbilldate | string | Earliest date rental on the line may bill from. |
| rentalisoffrent | boolean | True once the rental item has come off rent. |
| rentalissold | boolean | True when the rented item was sold to the customer instead of returned. |
| rentaloffrentdate | string | Date the item came off rent. |
| rentaloffrentqtyqty | string(6dp) | Quantity, 6 decimal places, as a string. Stored as decimal(6dp). |
| rentalreturncomplete | boolean | True once the rental return is complete. |
| rentalreturndate | string | Date the rental item was returned. |
| rentalreturnqtyqty | string(6dp) | Quantity, 6 decimal places, as a string. Stored as decimal(6dp). |
| rentalsolddate | string | Date the rented item was sold to the customer. |
| rentalsoldqtyqty | string(6dp) | Quantity, 6 decimal places, as a string. Stored as decimal(6dp). |
| rentalvaluemoney | string(6dp) | Stored as decimal(19,6). |
| assetid | integer | Assetid. Id only. |
| externalid | string(100) | Your own key. Scoped to your company. |
| Status | Code | Meaning |
|---|---|---|
| 404 | not_found | No 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" }'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/shipmentlines/104'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('NP_TOKEN')], CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'PATCH', CURLOPT_POSTFIELDS => json_encode([ 'ordershipid' => 104, 'orderdetailid' => 104, 'shipqty' => '1.000000', 'inventoryglacctid' => 104, 'inventoryglacct' => 'Example inventoryglacct', 'costeach' => '125.0000', ]), ]); $res = json_decode(curl_exec($ch), true);
import os, requests r = requests.patch( "https://acme.nolapro.com/!/api/v2/shipmentlines/104", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, json={ "ordershipid": 104, "orderdetailid": 104, "shipqty": "1.000000", "inventoryglacctid": 104, "inventoryglacct": "Example inventoryglacct", "costeach": "125.0000", }, ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/shipmentlines/104', { method: 'PATCH', headers: { Authorization: `Bearer ${process.env.NP_TOKEN}` }, body: JSON.stringify({ ordershipid: 104, orderdetailid: 104, shipqty: "1.000000", inventoryglacctid: 104, inventoryglacct: "Example inventoryglacct", costeach: "125.0000", }), } ); const data = await res.json();
using System.Net.Http.Json; var token = Environment.GetEnvironmentVariable("NP_TOKEN"); using var http = new HttpClient(); http.DefaultRequestHeaders.Add("Authorization", "Bearer " + token); var body = new { ordershipid = 104, orderdetailid = 104, shipqty = "1.000000", inventoryglacctid = 104, inventoryglacct = "Example inventoryglacct", costeach = "125.0000", }; var req = new HttpRequestMessage(HttpMethod.Patch, "https://acme.nolapro.com/!/api/v2/shipmentlines/104") { Content = JsonContent.Create(body), }; req.Headers.Add("Idempotency-Key", "your-unique-key"); var res = await http.SendAsync(req); res.EnsureSuccessStatusCode();
{
"ordershipid": 104,
"orderdetailid": 104,
"shipqty": "1.000000",
"inventoryglacctid": 104,
"inventoryglacct": "Example inventoryglacct",
"costeach": "125.0000"
}