StockOrder Model

Defines the model for submitting stock invoices to the EPOS system

Required
stockOrderID : string (GUID)

The Unique identifier for this record

Required
active_RevisionID : number (int)

This represents the revision of the configuration data that was being used when this record was generated. This is primarily for use by the PowerEPOS software, however 3rd party integrators can set this too if they
are using our configuration data as a basis for information, otherwise just set this to 0.

Required
continuedFromContextType : StockOrderContinuedFromContextTypes

The type of continuation this stock order is representing (if any)

Required
isTraining : bool

Is this a training stock invoice (i.e. not part of the official stock invoices)

Required
dateTimeCreated : object

The date and time the Stock Invoice was created.

Required MaxLength(32) Truncates
invoice_Tax1CommonName : string

The name of the tax method used for Tax 1 calculations.
Note: This should be in the organisations "Common Language", ie their overall default neutral language (typically English).
Example: VAT or GST
Leave blank if this tax level is not used.

Required MaxLength(32) Truncates
invoice_Tax1LocalizedName : string

The localised name of the tax method used for Tax 1 calculations.
Note: This should be in the outlets "Local Language", ie the language used by the POS system on site. This may or may not be the same as the common language.
Example: VAT or GST
Leave blank if this tax level is not used.

Required decimal(18, 3)
invoice_Tax1Rate : number (decimal)

The tax percentage(%) used to calculate tax for Tax 1
Leave as 0 if this tax level is not used, or you are indicating a Tax Free tax level

Required MaxLength(32) Truncates
invoice_Tax2CommonName : string

The name of the tax method used for Tax 2 calculations.
Note: This should be in the organisations "Common Language", ie their overall default neutral language (typically English).
Example: VAT or GST
Leave blank if this tax level is not used.

Required MaxLength(32) Truncates
invoice_Tax2LocalizedName : string

The localised name of the tax method used for Tax 2 calculations.
Note: This should be in the outlets "Local Language", ie the language used by the POS system on site. This may or may not be the same as the common language.
Example: VAT or GST
Leave blank if this tax level is not used.

Required decimal(18, 3)
invoice_Tax2Rate : number (decimal)

The tax percentage(%) used to calculate tax for Tax 2
Leave as 0 if this tax level is not used, or you are indicating a Tax Free tax level

Required MaxLength(32) Truncates
invoice_Tax3CommonName : string

The name of the tax method used for Tax 3 calculations.
Note: This should be in the organisations "Common Language", ie their overall default neutral language (typically English).
Example: VAT or GST
Leave blank if this tax level is not used.

Required MaxLength(32) Truncates
invoice_Tax3LocalizedName : string

The localised name of the tax method used for Tax 3 calculations.
Note: This should be in the outlets "Local Language", ie the language used by the POS system on site. This may or may not be the same as the common language.
Example: VAT or GST
Leave blank if this tax level is not used.

Required decimal(18, 3)
invoice_Tax3Rate : number (decimal)

The tax percentage(%) used to calculate tax for Tax 3
Leave as 0 if this tax level is not used, or you are indicating a Tax Free tax level

Required MaxLength(32) Truncates
invoice_Tax4CommonName : string

The name of the tax method used for Tax 4 calculations.
Note: This should be in the organisations "Common Language", ie their overall default neutral language (typically English).
Example: VAT or GST
Leave blank if this tax level is not used.

Required MaxLength(32) Truncates
invoice_Tax4LocalizedName : string

The localised name of the tax method used for Tax 4 calculations.
Note: This should be in the outlets "Local Language", ie the language used by the POS system on site. This may or may not be the same as the common language.
Example: VAT or GST
Leave blank if this tax level is not used.

Required decimal(18, 3)
invoice_Tax4Rate : number (decimal)

The tax percentage(%) used to calculate tax for Tax 4
Leave as 0 if this tax level is not used, or you are indicating a Tax Free tax level

Required MaxLength(32)
createdBy_UserName : string

The name of the POS User / person who created the order.
3rd Party integrations should specify a user name (where applicable), or use the integration name as a fallback.
Example: John

Required MaxLength(128)
supplierCommonName : string

The name of the supplier that this order is being placed with.
Note: This should be in the organisations "Common Language", ie their overall default neutral language (typically English).

Required MaxLength(128)
supplierLocalizedName : string

The localized name of the supplier that this order is being placed with.
Note: This should be in the outlets "Local Language", ie the language used by the POS system on site. This may or may not be the same as the common language.

Required MaxLength(4)
currencyCode : string

An ISO 4217 currency code indicating the currency that all values in this transaction represent. This MUST be a valid currency code.
Example: "GBP" or "AUD" or "USD" or "EUR"

Required MaxLength(8)
currencySymbol : string

The currency symbol displayed for values in this currency
Example: "$" or "£" or "€"

Required MaxLength(64)
currencyCommonName : string

The name of the currency that all values in this transaction represent.
Note: This should be in the organisations "Common Language", ie their overall default neutral language (typically English).
Example: "Euro" or "Pound Stirling" or "Australian Dollar" or "US Dollar"

Required MaxLength(64)
currencyLocalizedName : string

The localised name of the currency that all values in this transaction represent.
Note: This should be in the outlets "Local Language", ie the language used by the POS system on site. This may or may not be the same as the common language.
Example: "Euro" or "Pound Stirling" or "Australian Dollar" or "US Dollar"

Required
outletID : string (GUID)

The unique identifier of the outlet that this order is being placed with.

Required MaxLength(64)
outletCommonName : string

The name of the outlet that this order is being placed with.
Note: This should be in the organisations "Common Language", ie their overall default neutral language (typically English).

Required MaxLength(64)
outletLocalizedName : string

The localized name of the outlet that this order is being placed with.
Note: This should be in the outlets "Local Language", ie the language used by the POS system on site. This may or may not be the same as the common language.

Nullable
dbGen : number (int)

This represents an identifier for a unique database operation that last updated/created this entity. The value is not unique as it can be shared across multiple entities if they were all inserted/updated
from within a single operation. These values are always incrementing so all entities with DBGen > X can be assumed that they were edited/inserted since the operation X occured.

Expect a 64 bit integer.

This is a readonly property. Setting it will have no effect on the value written. It will be assigned internally and made visible when querying for this model. Certain endpoints

Nullable
continuedFrom_StockOrderID : string (GUID)

Optional - The stock order this stock invoice was based from (in the case of a continuation, ie split orders, or a back order)

Nullable
tradingDate : string (ISO 8601 DateTime)

The trading date assigned to this StockOrder

Nullable
purchaseOrder_TaxSchemeID : string (GUID)

The tax scheme used when generating the purchase order

Nullable MaxLength(32)
purchaseOrderNumber : string

The organisation unique purchase order number generated for this PO (based on the invoice number generation configuration)

Nullable decimal(18, 2)
purchaseOrderTotal : number (decimal)

The estimated total of the purchase order (INCLUDING ALL TAXES)

Nullable
purchaseOrderFinalisedID : number (int)

An organisational unique sequential ID generated for the purchase order at the time of approval

Nullable
invoice_TaxSchemeID : string (GUID)

The tax scheme used when generating the stock invoice

Nullable MaxLength(32)
invoiceNumber : string

The organisation unique stock invoice number generated for this stock invoice (based on the invoice number generation configuration)

Nullable MaxLength(64)
invoiceSupplierReference : string

The optional supplier specified invoice number / reference number

Nullable
invoiceFinalisedID : number (int)

An organisational unique sequential ID generated for the stock invoice at the time of finalisation

Nullable decimal(18, 2)
amount : number (decimal)

The amount of the stock invoice (including inclusive taxes and excluding addon taxes)

Nullable decimal(18, 7)
taxPurchases1 : number (decimal)

The taxable purchase amount used for the calculations of tax level 1

Nullable decimal(18, 7)
taxPurchases2 : number (decimal)

The taxable purchase amount used for the calculations of tax level 2

Nullable decimal(18, 7)
taxPurchases3 : number (decimal)

The taxable purchase amount used for the calculations of tax level 3

Nullable decimal(18, 7)
taxPurchases4 : number (decimal)

The taxable purchase amount used for the calculations of tax level 4

Nullable decimal(18, 2)
incTax1 : number (decimal)

The total inclusive tax amount for tax level 1

Nullable decimal(18, 2)
incTax2 : number (decimal)

The total inclusive tax amount for tax level 2

Nullable decimal(18, 2)
incTax3 : number (decimal)

The total inclusive tax amount for tax level 3

Nullable decimal(18, 2)
incTax4 : number (decimal)

The total inclusive tax amount for tax level 4

Nullable decimal(18, 2)
exTax1 : number (decimal)

The total exclusive tax amount for tax level 1

Nullable decimal(18, 2)
exTax2 : number (decimal)

The total exclusive tax amount for tax level 2

Nullable decimal(18, 2)
exTax3 : number (decimal)

The total exclusive tax amount for tax level 3

Nullable decimal(18, 2)
exTax4 : number (decimal)

The total exclusive tax amount for tax level 4

Nullable MaxLength(64)
deliverySupplierReference : string

The optional supplier specified picking slip reference number

Nullable
dateTimeOrdered : object

The date and time the Purchase Order is considered to be "ordered" (ie sent to the supplier)

Nullable
dateTimeFinalised : object

The date and time the Stock Invoice was Finalised.

Nullable
dateTimeDeleted : object

The date and time the Purchase Order was Deleted.

Nullable
dateTimeDeliveryExpected : string (ISO 8601 DateTime)

The estimated date and time that the delivery is expected to be received by the outlet

Nullable
dateTimeInvoiced : string (ISO 8601 DateTime)

The local date and time that this invoice was received

Nullable
dateTimeReceived : string (ISO 8601 DateTime)

The local date and time that the stock delivery was received

Nullable MaxLength(32) Truncates
purchaseOrder_Tax1CommonName : string

The name of the tax method used for Tax 1 calculations.
Note: This should be in the organisations "Common Language", ie their overall default neutral language (typically English).
Example: VAT or GST
Leave blank if this tax level is not used.

Nullable MaxLength(32) Truncates
purchaseOrder_Tax1LocalizedName : string

The localised name of the tax method used for Tax 1 calculations.
Note: This should be in the outlets "Local Language", ie the language used by the POS system on site. This may or may not be the same as the common language.
Example: VAT or GST
Leave blank if this tax level is not used.

Nullable decimal(18, 3)
purchaseOrder_Tax1Rate : number (decimal)

The tax percentage(%) used to calculate tax for Tax 1
Leave as 0 if this tax level is not used, or you are indicating a Tax Free tax level

Nullable MaxLength(32) Truncates
purchaseOrder_Tax2CommonName : string

The name of the tax method used for Tax 2 calculations.
Note: This should be in the organisations "Common Language", ie their overall default neutral language (typically English).
Example: VAT or GST
Leave blank if this tax level is not used.

Nullable MaxLength(32) Truncates
purchaseOrder_Tax2LocalizedName : string

The localised name of the tax method used for Tax 2 calculations.
Note: This should be in the outlets "Local Language", ie the language used by the POS system on site. This may or may not be the same as the common language.
Example: VAT or GST
Leave blank if this tax level is not used.

Nullable decimal(18, 3)
purchaseOrder_Tax2Rate : number (decimal)

The tax percentage(%) used to calculate tax for Tax 2
Leave as 0 if this tax level is not used, or you are indicating a Tax Free tax level

Nullable MaxLength(32) Truncates
purchaseOrder_Tax3CommonName : string

The name of the tax method used for Tax 3 calculations.
Note: This should be in the organisations "Common Language", ie their overall default neutral language (typically English).
Example: VAT or GST
Leave blank if this tax level is not used.

Nullable MaxLength(32) Truncates
purchaseOrder_Tax3LocalizedName : string

The localised name of the tax method used for Tax 3 calculations.
Note: This should be in the outlets "Local Language", ie the language used by the POS system on site. This may or may not be the same as the common language.
Example: VAT or GST
Leave blank if this tax level is not used.

Nullable decimal(18, 3)
purchaseOrder_Tax3Rate : number (decimal)

The tax percentage(%) used to calculate tax for Tax 3
Leave as 0 if this tax level is not used, or you are indicating a Tax Free tax level

Nullable MaxLength(32) Truncates
purchaseOrder_Tax4CommonName : string

The name of the tax method used for Tax 4 calculations.
Note: This should be in the organisations "Common Language", ie their overall default neutral language (typically English).
Example: VAT or GST
Leave blank if this tax level is not used.

Nullable MaxLength(32) Truncates
purchaseOrder_Tax4LocalizedName : string

The localised name of the tax method used for Tax 4 calculations.
Note: This should be in the outlets "Local Language", ie the language used by the POS system on site. This may or may not be the same as the common language.
Example: VAT or GST
Leave blank if this tax level is not used.

Nullable decimal(18, 3)
purchaseOrder_Tax4Rate : number (decimal)

The tax percentage(%) used to calculate tax for Tax 4
Leave as 0 if this tax level is not used, or you are indicating a Tax Free tax level

Nullable
createdBy_EmployeeID : string (GUID)

The unique employee record ID of the employee / staff member who created the order.
This may be NULL for 3rd party integrations or where no Employee (Time Clocking / HR) integration exists.

Nullable
createdBy_UserID : string (GUID)

This unique UserID from the POS_Users (configuration) table representing the POS user that created the order.
This may be NULL for 3rd party integrations

Nullable
orderedBy_EmployeeID : string (GUID)

The unique employee record ID of the employee / staff member who approved the purchase order.
This may be NULL for 3rd party integrations or where no Employee (Time Clocking / HR) integration exists.

Nullable
orderedBy_UserID : string (GUID)

This unique UserID from the POS_Users (configuration) table representing the POS user that approved the purchase order.
This may be NULL for 3rd party integrations

Nullable MaxLength(32)
orderedBy_UserName : string

The name of the POS User / person who approved the purchase order.
3rd Party integrations should specify a user name (where applicable), or use the integration name as a fallback.
Example: John

Nullable
finalisedBy_EmployeeID : string (GUID)

The unique employee record ID of the employee / staff member who Finalised the order.
This may be NULL for 3rd party integrations or where no Employee (Time Clocking / HR) integration exists.

Nullable
finalisedBy_UserID : string (GUID)

This unique UserID from the POS_Users (configuration) table representing the POS user that Finalised the order.
This may be NULL for 3rd party integrations

Nullable MaxLength(32)
finalisedBy_UserName : string

The name of the POS User / person who Finalised the order.
3rd Party integrations should specify a user name (where applicable), or use the integration name as a fallback.
Example: John

Nullable
deletedBy_EmployeeID : string (GUID)

The unique employee record ID of the employee / staff member who Deleted the order.
This may be NULL for 3rd party integrations or where no Employee (Time Clocking / HR) integration exists.

Nullable
deletedBy_UserID : string (GUID)

This unique UserID from the POS_Users (configuration) table representing the POS user that Deleted the order.
This may be NULL for 3rd party integrations

Nullable MaxLength(32)
deletedBy_UserName : string

The name of the POS User / person who Deleted the order.
3rd Party integrations should specify a user name (where applicable), or use the integration name as a fallback.
Example: John

Nullable
supplierID : string (GUID)

The unique identifier of the supplier that this order is being placed with.

Nullable MaxLength(128)
clientName : string

The name of the software application that has created the transaction.
3rd Party integrations should enter their application or integration name here.
Example: "My POS App" or "My Website App"

Nullable MaxLength(128)
clientVersion : string

The version of the software application that has created the transaction.
3rd Party integrations should enter their application version name here.
Example: "1.0.0.0" or "1" or "2.5a" etc

Nullable
stockOrderPOLineItems : StockOrderPOLineItem []

A list of purchase order line items for this invoice.

Nullable
stockOrderLineItems : StockOrderLineItem []

A list of line items for this invoice.

Nullable
stockOrderNotes : StockOrderNote []

A list of notes attached to this invoice and/or its related records

Example
{
  "stockOrderID": "3f49efe7-ea42-4f21-8718-7e6ce9a33512",
  "active_RevisionID": 321,
  "continuedFromContextType": 1,
  "isTraining": true,
  "dateTimeCreated": {},
  "invoice_Tax1CommonName": "string value",
  "invoice_Tax1LocalizedName": "string value",
  "invoice_Tax1Rate": 1.23,
  "invoice_Tax2CommonName": "string value",
  "invoice_Tax2LocalizedName": "string value",
  "invoice_Tax2Rate": 1.23,
  "invoice_Tax3CommonName": "string value",
  "invoice_Tax3LocalizedName": "string value",
  "invoice_Tax3Rate": 1.23,
  "invoice_Tax4CommonName": "string value",
  "invoice_Tax4LocalizedName": "string value",
  "invoice_Tax4Rate": 1.23,
  "createdBy_UserName": "string value",
  "supplierCommonName": "string value",
  "supplierLocalizedName": "string value",
  "currencyCode": "string value",
  "currencySymbol": "string value",
  "currencyCommonName": "string value",
  "currencyLocalizedName": "string value",
  "outletID": "3f49efe7-ea42-4f21-8718-7e6ce9a33512",
  "outletCommonName": "string value",
  "outletLocalizedName": "string value",
  "dbGen": 321,
  "continuedFrom_StockOrderID": "3f49efe7-ea42-4f21-8718-7e6ce9a33512",
  "tradingDate": "2012-04-03T09:40:59.736Z",
  "purchaseOrder_TaxSchemeID": "3f49efe7-ea42-4f21-8718-7e6ce9a33512",
  "purchaseOrderNumber": "string value",
  "purchaseOrderTotal": 1.23,
  "purchaseOrderFinalisedID": 321,
  "invoice_TaxSchemeID": "3f49efe7-ea42-4f21-8718-7e6ce9a33512",
  "invoiceNumber": "string value",
  "invoiceSupplierReference": "string value",
  "invoiceFinalisedID": 321,
  "amount": 1.23,
  "taxPurchases1": 1.23,
  "taxPurchases2": 1.23,
  "taxPurchases3": 1.23,
  "taxPurchases4": 1.23,
  "incTax1": 1.23,
  "incTax2": 1.23,
  "incTax3": 1.23,
  "incTax4": 1.23,
  "exTax1": 1.23,
  "exTax2": 1.23,
  "exTax3": 1.23,
  "exTax4": 1.23,
  "deliverySupplierReference": "string value",
  "dateTimeOrdered": {},
  "dateTimeFinalised": {},
  "dateTimeDeleted": {},
  "dateTimeDeliveryExpected": "2012-04-03T09:40:59.736Z",
  "dateTimeInvoiced": "2012-04-03T09:40:59.736Z",
  "dateTimeReceived": "2012-04-03T09:40:59.736Z",
  "purchaseOrder_Tax1CommonName": "string value",
  "purchaseOrder_Tax1LocalizedName": "string value",
  "purchaseOrder_Tax1Rate": 1.23,
  "purchaseOrder_Tax2CommonName": "string value",
  "purchaseOrder_Tax2LocalizedName": "string value",
  "purchaseOrder_Tax2Rate": 1.23,
  "purchaseOrder_Tax3CommonName": "string value",
  "purchaseOrder_Tax3LocalizedName": "string value",
  "purchaseOrder_Tax3Rate": 1.23,
  "purchaseOrder_Tax4CommonName": "string value",
  "purchaseOrder_Tax4LocalizedName": "string value",
  "purchaseOrder_Tax4Rate": 1.23,
  "createdBy_EmployeeID": "3f49efe7-ea42-4f21-8718-7e6ce9a33512",
  "createdBy_UserID": "3f49efe7-ea42-4f21-8718-7e6ce9a33512",
  "orderedBy_EmployeeID": "3f49efe7-ea42-4f21-8718-7e6ce9a33512",
  "orderedBy_UserID": "3f49efe7-ea42-4f21-8718-7e6ce9a33512",
  "orderedBy_UserName": "string value",
  "finalisedBy_EmployeeID": "3f49efe7-ea42-4f21-8718-7e6ce9a33512",
  "finalisedBy_UserID": "3f49efe7-ea42-4f21-8718-7e6ce9a33512",
  "finalisedBy_UserName": "string value",
  "deletedBy_EmployeeID": "3f49efe7-ea42-4f21-8718-7e6ce9a33512",
  "deletedBy_UserID": "3f49efe7-ea42-4f21-8718-7e6ce9a33512",
  "deletedBy_UserName": "string value",
  "supplierID": "3f49efe7-ea42-4f21-8718-7e6ce9a33512",
  "clientName": "string value",
  "clientVersion": "string value",
  "stockOrderPOLineItems": [],
  "stockOrderLineItems": [],
  "stockOrderNotes": []
}