Item

Return, update, create and delete item type sale invoices.

Date Released: Aug 2013 Date Updated: Jan 2022
URLSupports
/{cf_uri}/Sale/Invoice/Item GET |  PUT |  POST |  DELETE

Please note: While accessibility via the API is available to both AccountRight, new Essentials and MYOB Business files. Not all features will be displayed in Product for new Essentials or MYOB Business

Attention: If you are using the Hybrid layout, the Freight fields are not currently supported for AccountRight, new Essentials and MYOB Business files. To have Freight on in the transaction and use the Hybrid layout you will need to have Freight as an item on the transaction. For more information head to our knowledgebase article

The elements list below details information for Item. To view the descriptions for the elements you can either hover any attribute to reveal details or click here to show all details inline.

Items shown with are required when posting or puting data
Items shown with are read-only elements

Attribute Details

  • UIDGuid (36)
  • Unique guid identifier created for an item sale invoice. .
    ONLY required for updating an existing item sale invoice.
    NOT required when creating a new item sale invoice.
  • Number String (13)
  • Sale invoice number
  • DateDateTime
  • Transaction date entry, format YYYY-MM-DD HH:MM:SS { 'Date': '2013-09-10 13:33:02' }
  • CustomerPurchaseOrderNumberString (255)
  • Customer PO number.
  • Customer
  • The following set of information pulls through details for the Customer contact
    • UIDGuid (36)
    • Foreign Key: Unique guid identifier belonging to the customer assigned to the item sale.
    • NameString (50)
    • Name of the customer.
    • DisplayIDString (15)
    • Customer contact Card ID, can also be used as a unique customer contact identifier.
    • URIString
    • Uniform resource identifier associated with the customer object.
  • PromisedDateDateTime
  • Transaction promised date, format YYYY-MM-DD HH:MM:SS { 'PromisedDate': '2013-11-12 13:33:02' }
  • BalanceDueAmountDecimal (13.2)
  • Amount still payable on the sale invoice.
  • BalanceDueAmountForeignDecimal (13.2)
  • Foreign Currency amount still payable on the sale invoice.
  • StatusString
  • Invoice status:
    Open
    Closed
    Credit
  • Lines []
  • An array of line invoice information
    • RowID Integer
    • Sequence of the entry within the item sale set.
      REQUIRED only when passing the RowVersion for updating an existing item sale line.
    • TypeString
    • Invoice line type, can consist of the following:
      Transaction - All fields detailed in Lines array are consumable.
      Header - Only allows you to POST to Description element.
      Subtotal - Calculated value that is read-only.
    • DescriptionString (1000)
    • Description text for the sale line.
    • ShipQuantityDecimal (13.6)
    • The quantity of goods shipped. ONLY required when using Item on the item sale line.
    • UnitPriceDecimal (13.6)
    • Mandatory for a Local currency record : Unit price assigned to the item.
    • UnitsOfMeasureString (5)
    • Unit of measure assigned to the service.
    • UnitCountDecimal (13.6)
    • Unit count assigned to the service.ONLY required when using Account on the service sale line.
    • UnitPriceForeignDecimal (13.2)
    • Mandatory for a Foreign currency record : Unit price assigned to the item in foreign currency
    • DiscountPercentDouble (99.99%)
    • Discount rate applicable to the line of the sale invoice.
    • CostOfGoodsSoldDecimal (13.2)
    • Dollar amount posted to the Asset account setup on an item using 'I Inventory'
      What are linked accounts for items?
    • TotalDecimal (13.2)
    • Mandatory for a Local currency record : Total amount for the line item only.
    • TotalForeignDecimal (13.2)
    • Total amount for the line item only in Foreign Currency.
    • Item
    • The following set of information pulls through details for an Item
      • UIDGuid (36)
      • Foreign Key: Unique identifier for item in the form of a guid.
        ONLY required when using Item on the item sale line.
      • NumberString (30)
      • Number assigned to the item.
      • NameString (30)
      • Name assigned to the item.
      • URIString
      • Uniform resource identifier associated with the item object.
    • Account
    • The following set of information pulls through details for an Account
      • UIDGuid (36)
      • Foreign Key: Unique identifier for the account in the form of a guid.
        ONLY required when using Account on the service sale line.
      • NameString (60)
      • Account name belonging to the account record.
      • DisplayIDString (6)
      • Account code format includes separator ie 1-1100{ 'DisplayID': '1-1200' }
      • URIString
      • Uniform resource identifier associated with the account object.
    • Location
    • The following set of information pulls through details for the item associated location./li>
      • UIDGuid (36)
      • Foreign Key: Unique identifier for location in the form of a guid.
      • IdentifierString (10)
      • Identifier assigned to the location.
      • NameString (30)
      • Name assigned to the location.
      • URIString
      • Uniform resource identifier associated with the location object.
    • Job
    • The following set of information pulls through the details for a job
      • UID GUID (36)
      • Foreign Key: Unique guid identifier belonging to the job for the line of the item sale.
      • Number String (30)
      • Number assigned to the job
      • Name String (30)
      • Name assigned to the job
      • URI String
      • Uniform resource identifier associated with the job object
    • TaxCode
    • The following set of information pulls through the details for the Tax Code
      • UID GUID (36)
      • Foreign Key: Unique tax code identifier in the form of a guid
      • Code String (3)
      • 3 digit code assigned to the tax code.
      • URI String
      • Uniform resource identifier associated with the tax code object.
    • RowVersion String
    • ONLY required on PUT for updating an existing item sale line.
      NOT required when creating a new item sale invoice.
  • ShipToAddressString (255)
  • ShipTo address of the sale invoice.
  • Terms
  • The following set of information pulls through customer payment terms.

    Please note: When posting a new sale invoice, if you do not set the terms, default payment terms from the customer contact card will be substituted instead.
    • PaymentIsDueString
    • Default Terms of Payment definitions:
      CashOnDelivery
      PrePaid
      InAGivenNumberOfDays
      OnADayOfTheMonth
      NumberOfDaysAfterEOM
      DayOfMonthAfterEOM
    • DiscountDate Integer
    • If PaymentIsDue = CashOnDelivery, PrePaid, InAGivenNumberOfDaysNumber or NumberOfDaysAfterEOM then set the number of days within which the customer must pay to receive discounts.

      If PaymentIsDue = OnADayOfTheMonth or DayOfMonthAfterEOM then set the day of the month within which the payment must be made to receive discounts.
    • BalanceDueDate Integer
    • If PaymentIsDue = CashOnDelivery, PrePaid, InAGivenNumberOfDaysNumber or NumberOfDaysAfterEOM then set the number of days within which the customer has to pay invoices.

      If PaymentIsDue = OnADayOfTheMonth or DayOfMonthAfterEOM then set the day of the month within which the payment must be made to pay invoices.
    • DiscountForEarlyPayment Double (99.99%)
    • % discount for early payment.
    • MonthlyChargeForLatePayment Double (99.99%)
    • % monthly charge for late payment.
    • DiscountExpiryDateDateTime
    • Date in which payment must be paid in full in order to receive discount, format YYYY-MM-DD HH:MM:SS { 'Date': '2013-09-10 00:00:00' }
    • DiscountDecimal (13.2)
    • Discount amount that will apply if payment is made in full by the discount date.
    • DiscountForeignDecimal (13.2)
    • Discount amount that will apply if payment is made in full by the discount date in Foreign Currency
    • DueDateDateTime
    • Date in which payment is due, format YYYY-MM-DD HH:MM:SS { 'Date': '2014-09-10 00:00:00' }
    • FinanceChargeDecimal (13.2)
    • Late payment fee to be charged if payment is not made in full by the due date.
    • FinanceChargeForeignDecimal (13.2)
    • Late payment fee to be charged if payment is not made in full by the due date in Foreign Currency
  • IsTaxInclusiveBoolean
  • True indicates the transaction is tax inclusive with both UnitPrice and Total values to be keyed in tax-inclusive.

    False indicates the transaction is not tax inclusive with both UnitPrice and Total values to be keyed in tax-exclusive.
  • SubtotalDecimal (13.2)
  • If IsTaxInclusive = false then sum of all tax exclusive line amounts.
    If IsTaxInclusive = true then sum of all tax inclusive line amounts.
  • SubtotalForeignDecimal (13.2)
  • Subtotal of the Invoice lines in Foreign Currency.
  • FreightDecimal (13.2)
  • Freight applicable to the sale invoice.
  • FreightForeignDecimal (13.2)
  • Amount for freight applicable to the sale invoice in Foreign Currency
  • FreightTaxCode
  • The following set of information pulls through the details for freight Tax Codes
    • UID GUID (36)
    • Foreign Key: Unique freight tax code identifier in the form of a guid
    • Code String (3)
    • 3 digit code assigned to the freight tax code.
    • URI String
    • Uniform resource identifier associated with the freight tax code object.
  • TotalTaxDecimal (13.2)
  • Total of all tax amounts applicable to the sale invoice.
  • TotalTaxForeignDecimal (13.2)
  • Total of all tax amounts applicable to the sale invoice in Foreign Currency.
  • TotalAmountDecimal (13.2)
  • Total amount of the sale invoice.
  • TotalAmountForeignDecimal (13.2)
  • Total amount of the sale invoice in Foreign Currency
  • Category
  • The following outlines category information for the sale item invoice.
    • UID GUID (36)
    • Foreign Key: Unique guid identifier belonging to the category assigned to the sale invoice
    • Name String (30)
    • Name of the category
    • DisplayID String (15)
    • Display id for the category
    • URI String
    • Uniform resource identifier associated with the category object
  • Salesperson
  • The following set of information pulls through details for the an employee contact.
    • UIDGuid (36)
    • Foreign Key: Unique employee contact identifier in the form of a guid.
    • NameString (30)
    • Selected employee contact name.
    • DisplayIDString (15)
    • Employee contact Card ID, can also be used as a unique employee contact identifier.
    • URIString
    • Uniform resource identifier associated with the employee contact object.
  • CommentString (2000)
  • Sale invoice comment.
  • ShippingMethodString (20)
  • Shipping method text.
  • JournalMemoString (255)
  • Journal memo text describing the sale.
  • ReferralSourceString (20)
  • Referral Source selected on the sale invoice.
  • InvoiceDeliveryStatusString (20)
  • Invoice delivery status assigned:
    Print = ToBePrinted
    Email = ToBeEmailed
    PrintAndEmail = ToBePrintedAndEmailed
    Nothing = AlreadyPrintedOrSent
  • LastPaymentDateDateTime
  • The most recent invoice payment, format YYYY-MM-DD HH:MM:SS
  • CanApplySurchargeBoolean
  • This flag enables/disables surcharging at the invoice level when payment is made via MYOB Online Invoice Payments for users registered for Surcharging.
  • Order
  • REQUIRED ONLY if converting an existing order to an invoice. Fore details visit here.
    Please note: This field will default to null for any new invoice created without an order conversion.
    • UIDGuid (36)
    • Foreign Key: Unique sale order identifier in the form of a guid. Required when converting Order to Invoice
    • NumberString (8)
    • Sales order number.
    • URIString
    • Uniform resource identifier associated with the sale order object.
  • OnlinePaymentMethodString
  • Which Online Payment Methods should be turned on for this resource. Values can be 'All' or 'None'
  • ForeignCurrency
  • Foreign currency information in the transaction.
    • UIDGuid (36)
    • Foreign Key: Unique identifier for the currency in the form of a guid.
    • CodeString (3)
    • The currency code.
    • CurrencyNameString
    • The full name of the currency
    • URIString
    • Uniform resource identifier associated with the currency object.
  • CurrencyExchangeRateDecimal (13.2)
  • The exchange rate between the Local and Foreign currency
  • LastModifiedDateTime
  • DateTime of the last time this resource was modified through a direct action to the object. eg a field was updated.
  • URIString
  • Uniform resource identifier encompasses all types of names and addresses that refer to objects on the web.
  • RowVersionString
  • Number value that changes upon a record update, can be used for change control but does does not preserve a date or a time.
    ONLY required for updating an existing item sale invoice.
    NOT required when creating a new item sale invoice.


Paging: default page size is set to 400 with a maximum of 1000 results.

Example json GET response

  • {
  • "UID" : "e838123f-40ac-4b1c-b9fc-4730d19b14e3",
  • "Number" : "SJ000092",
  • "Date" : "2013-08-30T19:00:59.043",
  • "CustomerPurchaseOrderNumber" : "00000112",
  • "Customer" : {
    • "UID" : "457c4932-ddcf-40c6-80f7-e7f11c34dcca",
    • "Name" : "Cash Sales",
    • "DisplayID" : "CUS000003",
    • "URI" : "{cf_uri}/Contact/Customer/457c4932-ddcf-40c6-80f7-e7f11c34dcca"
    • },
  • "PromisedDate" : "2013-09-30T19:00:59.043",
  • "BalanceDueAmount" : 72.5,
  • "BalanceDueAmountForeign" : null,
  • "Status" : "Open",
  • "Lines" : [
    • {
  • "RowID" : 262,
  • "Type" : "Transaction",
  • "Description" : "20 Litres South Spring",
  • "ShipQuantity" : 2,
  • "UnitPrice" : 27.5,
  • "UnitOfMeasure" : null,
  • "UnitCount" : null,
  • "UnitPriceForeign" : null,
  • "DiscountPercent" : 0,
  • "CostOfGoodsSold" : 30,
  • "Total" : 55,
  • "TotalForeign" : null,
  • "Item" : {
    • "UID" : "c4085d83-b43e-4d8d-b32b-b136ce8ca16a",
    • "Number" : "610",
    • "Name" : "20 Litres South Spring",
    • "URI" : "{cf_uri}/Inventory/Item/c4085d83-b43e-4d8d-b32b-b136ce8ca16a"
    • },
  • "Location" : {
    • "UID" : "04ad68a3-91f5-4739-8b83-13f86ecd2e33",
    • "Identifier" : "Location1",
    • "Name" : "Primary Location",
    • "URI" : "{cf_uri}"
    • },
  • "Job" : null,
  • "TaxCode" : {
    • "UID" : "38a37ae8-565c-46f8-ad4a-2a87069607f8",
    • "Code" : "GST",
    • "URI" : "{cf_uri}/GeneralLedger/TaxCode/38a37ae8-565c-46f8-ad4a-2a87069607f8"
    • },
  • "RowVersion" : "3776553789777051648"
  • },
  • {
  • "RowID" : 263,
  • "Type" : "Transaction",
  • "Description" : "12 Litres Orange Carbon",
  • "ShipQuantity" : 1,
  • "UnitPrice" : 17.5,
  • "UnitOfMeasure" : "Serv",
  • "UnitCount" : 1234,
  • "UnitPriceForeign" : null,
  • "DiscountPercent" : 0,
  • "DiscountForeign" : null,
  • "CostOfGoodsSold" : 12.99,
  • "Total" : 17.5,
  • "TotalForeign" : null,
  • "Item" : null,
  • "Account" : {
    • "UID" : "8319e8f3-a0c5-4f28-b640-ac8a2393777a",
    • "Name" : "Stock Income",
    • "DisplayID" : "4-2000",
    • "URI" : "{cf_uri}/GeneralLedger/Account/8319e8f3-a0c5-4f28-b640-ac8a2393777a"
    • },
  • "Location" : {
    • "UID" : "04ad68a3-91f5-4739-8b83-13f86ecd2e33",
    • "Identifier" : "Location1",
    • "Name" : "Primary Location",
    • "URI" : "{cf_uri}"
    • },
  • "Job" : null,
  • "TaxCode" : {
    • "UID" : "38a37ae8-565c-46f8-ad4a-2a87069607f8",
    • "Code" : "GST",
    • "URI" : "{cf_uri}/GeneralLedger/TaxCode/38a37ae8-565c-46f8-ad4a-2a87069607f8"
    • },
  • "RowVersion" : "-3848888831541510144"
  • }
  • ],
  • "ShipToAddress" : "Cash Sales",
  • "Terms" : {
    • "PaymentIsDue" : "DayOfMonthAfterEOM",
    • "DiscountDate" : 1,
    • "BalanceDueDate" : 30,
    • "DiscountForEarlyPayment" : 5,
    • "MonthlyChargeForLatePayment" : 0,
    • "DiscountExpiryDate" : "2013-09-01T00:00:00",
    • "Discount" : 3.63,
    • "DueDate" : "2013-09-30T00:00:00",
    • "FinanceCharge" : 0
    • "FinanceChargeForeign" : null,
    • },
  • "IsTaxInclusive" : true,
  • "Subtotal" : 72.5,
  • "SubtotalForeign" : null,
  • "Freight" : 0,
  • "FreightForeign" : null,
  • "FreightTaxCode" : {
    • "UID" : "38a37ae8-565c-46f8-ad4a-2a87069607f8",
    • "Code" : "GST",
    • "URI" : "{cf_uri}/GeneralLedger/TaxCode/38a37ae8-565c-46f8-ad4a-2a87069607f8"
    • },
  • "TotalTax" : 6.59,
  • "TotalTaxForeign" : null,
  • "TotalAmount" : 72.5,
  • "TotalAmountForeign" : null,
  • "Category" : {
    • "UID" : "b211a2a3-0be9-477c-940e-1c8bac139cf1",
    • "Name" : "Melbourne",
    • "DisplayID" : "CAT101",
    • "URI" : "{cf_uri}/GeneralLedger/Category/b211a2a3-0be9-477c-940e-1c8bac139cf1"
    • },
  • "Salesperson" : null,
  • "Comment" : "Thank you!",
  • "ShippingMethod" : "Federal Express",
  • "JournalMemo" : "Sale; Cash Sales",
  • "ReferralSource" : "Brochure",
  • "InvoiceDeliveryStatus" : "Print",
  • "LastPaymentDate" : "2013-09-05T00:00:00",
  • "CanApplySurcharge" : true,
  • "Order" : null,
  • "OnlinePaymentMethod" : "All",
  • "ForeignCurrency" : null,
  • "CurrencyExchangeRate" : null,
  • "LastModified" : "2019-05-01T00:47:43.757",
  • "URI" : "{cf_uri}/Sale/Invoice/Item/e838123f-40ac-4b1c-b9fc-4730d19b14e3",
  • "RowVersion" : "-5657084081930764288"
  • }
Hypermedia in the MYOB Business API

The {cf_uri} is provided by the Company File endpoint.

Read more about Hypermedia in the MYOB Business API in our best practice guide.