RecordWithDiscountsAndFees

Record supplier payments with discounts for purchase bills.

Date Released: Nov 2013 Date Updated: Jan 2021
URLSupports
/{cf_uri}/Purchase/SupplierPayment/RecordWithDiscountsAndFees GET |  PUT |  POST |  DELETE
The {guid} in the URL above is replaced with the unique ID for any given company file

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

Heads up! POSTing not only returns a 200 Status Response, but a payload JSON object as detailed below is also passed back. POSTing a payment that includes a discount will create a debit memo that is then automatically applied against the originating bill.

POSTing a payment that includes a finance charge results in a purchase bill for that amount, the payment of the finance charge will be automatically applied against the resulting bill.

The elements list below details information for RecordWithDiscountsAndFees. 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

Request

  • UIDGuid (36)
  • Unique guid identifier created for a supplier payment.
  • PayFromString
  • Will default to Account
    If using electronic payments specify ElectronicPayments
    What are electronic payments?
  • Account
  • The following set of information pulls through details for the Account
    • UIDGuid (36)
    • Please note: Passing the Account UID is optional if you are assigning ElectronicPayments, if allocating a bank account the UID is required.

      Foreign Key: Unique identifier for the account in the form of a guid.
  • Supplier
  • The following set of information pulls through details for the Supplier contact
    • UIDGuid (36)
    • Foreign Key: Unique guid identifier belonging to the supplier assigned to the supplier payment.
    • DisplayIDString (15)
    • Supplier contact Card ID, can also be used as a unique supplier contact identifier.
  • PayeeAddressString (255)
  • Payee name and address of the supplier contact.
  • StatementParticularsString
  • ONLY applicable for Electronic Payments.
    Particulars attached to electronic payment.
    What are electronic payments?
  • StatementCodeString
  • ONLY APPLICABLE FOR NZ REGION.
    Code attached to electronic payment.
  • StatementReferenceString
  • ONLY APPLICABLE FOR NZ REGION.
    Reference attached to electronic payment.
  • PaymentNumberString (8)
  • ID No of payment transaction
  • DateDateTime
  • Transaction date entry, format YYYY-MM-DD HH:MM:SS { 'Date': '2013-08-11 13:33:02' }
  • FinanceChargeDecimal (13.2)
  • Finance charge amount if applicable for late payments.
    What is a finance charge?
  • FinanceChargeForeignDecimal (13.2)
  • Finance charge amount if applicable for late payments in foreign currency.
    What is a finance charge?
  • Memo String (255)
  • Memo text of the supplier payment entry.
  • Lines []
  • An array of purchase bill or order line information.
    • Purchase
    • Purchase bill or order transaction information
      • UIDGuid (36)
      • Foreign Key: Unique guid identifier belonging to the purchase bill or order object.
      • Number String (8)
      • Purchase bill/order number.
    • AmountAppliedDecimal (13.2)
    • Mandatory for a Local currency record : Amount applied to purchase bill or order.
    • AmountAppliedForeignDecimal (13.2)
    • Mandatory for a Foreign currency record : Amount applied to purchase bill or order in foreign currency.
    • DiscountAppliedDecimal (13.2)
    • Mandatory for a Local currency record : Discount amount applied to bill or order.
    • DiscountAppliedFOreignDecimal (13.2)
    • Mandatory for a Foreign currency record : Discount amount applied to bill or order in foreign currency.
    • TypeDecimal (13.2)
    • Purchase type, can consist of the following:
      Bill
      Order
  • BillDeliveryStatusString (20)
  • Payment transaction delivery status assigned:
    Print = ToBePrinted
    Email = ToBeEmailed
    PrintAndEmail = ToBePrintedAndEmailed
    Nothing = AlreadyPrintedOrSent
 

Response

  • SupplierPayment
  • The following set of information pulls through details for the supplier payment
    • UIDGuid (36)
    • Foreign Key: Unique identifier for the supplier payment in the form of a guid.
    • PaymentNumberString (10)
    • ID No of payment transaction
    • URI String
    • Uniform resource identifier associated with the supplier payment object.
  • FinanceChargeBill
  • The following set of information pulls through details for the bill generated from a finance charge
    • UIDGuid (36)
    • Foreign Key: Unique identifier for the bill in the form of a guid.
    • NumberString (10)
    • Bill invoice number #
    • URI String
    • Uniform resource identifier associated with the purchase object.
  • DiscountAppliedBills []
  • The following set of information pulls through details for the bill generated from a discount debit memo.
    • UIDGuid (36)
    • Foreign Key: Unique identifier for the invoice in the form of a guid.
    • NumberString (10)
    • Purchase bill number #
    • URI String
    • Uniform resource identifier associated with the purchase bill object.
  • DebitSettlements []
  • The following set of information pulls through details for the settled debit memo.
    • UIDGuid (36)
    • Foreign Key: Unique identifier for the settled debit in the form of a guid.
    • NumberString (10)
    • Purchase number #
    • URI String
    • Uniform resource identifier associated with the settled debit memo object.

Example json request

  • {
  • "PayFrom" : "Account",
  • "Account" : {
    • "UID" : "7772dc25-5ee6-4a61-994e-28c04b8a35fc"
  • },
  • "Supplier" : {
    • "UID" : "63b984e5-241e-4c1a-bfe1-7868a69f5e29",
    • "DisplayID" : "SUPP000004"
  • },
  • "PaymentNumber" : "00001569",
  • "Date" : "2014-11-05T00:00:00",
  • "FinanceCharge" : 0,
  • "Memo" : "Payment; Huston & Huston Packaging",
  • "Lines" : [
    • {
    • "Purchase" : {
      • "UID" : "874c0837-ed10-4277-ad1c-ab3298b39647"
      • },
      • "AmountApplied" : 69,
      • "DiscountApplied" : 5,
      • "Type" : "Bill"
      • }
    • ]
  • }
  • Example json response

    • {
    • "SupplierPayment" : {
      • "UID" : "961038e7-85ae-4bcd-87f0-89f3be2cd9e7",
      • "PaymentNumber" : "108",
      • "URI" : "{cf_uri}/Purchase/SupplierPayment/961038e7-85ae-4bcd-87f0-89f3be2cd9e7"
      • },
    • "FinanceChargeBill" : null,
    • "DiscountAppliedBills" : [
      • {
      • "UID" : "4860fbae-7d03-41e3-b2fc-0c1f3ce4c726",
      • "Number" : "00000010",
      • "URI" : "{cf_uri}/Purchase/Bill/4860fbae-7d03-41e3-b2fc-0c1f3ce4c726"
      • }
      • ],
    • "DebitSettlements" : [
      • {
      • "UID" : "0476f13c-5f61-4513-8b14-b3023d03b998",
      • "Number" : "PJ000001",
      • "URI" : "{cf_uri}/Purchase/DebitSettlement/0476f13c-5f61-4513-8b14-b3023d03b998"
      • }
    • ]
  • }
  • 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.