Forum Discussion

silverwolf's avatar
10 months ago

I am getting error while creating invoice

Endpoint : */Sale/Invoice/Service

Method : POST

 

My Json Body:

{
  "Number": "INV66915662",
  "Date": "2024-01-10T18:37:09.3816544+05:30",
  "Customer": { "UID": "db0b6cb1-6a38-414c-bb65-ef875735c832" },
  "ShipToAddress": "222 Margaret St, Brisbane City QLD 4000, Australia",
  "Terms": {
    "PaymentIsDue": "DayOfMonthAfterEOM",
    "DiscountDate": 1,
    "BalanceDueDate": 30,
    "DiscountForEarlyPayment": 0.0,
    "MonthlyChargeForLatePayment": 0.0,
    "DiscountExpiryDate": "2024-01-10T18:37:09.3836915+05:30",
    "Discount": 0,
    "DueDate": "2024-01-10T18:37:09.3836915+05:30"
  },
  "IsTaxInclusive": true,
  "IsReportable": false,
  "Lines": [
    {
      "Type": "Transaction",
      "Description": "SWP_2401005",
      "Account": { 
        "UID": "eeabd27a-bef0-4fdc-8964-b79819af9a49" 
    },
      "Total": 0.0,
      "TotalForeign": 0.0,
      "Job": null,
      "TaxCode": { "UID": "c7a5f95f-0aee-4240-8637-e5b3eb342219" }
    }
  ],
  "Subtotal": 0,
  "Freight": 0,
  "FreightTaxCode": { "UID": "c7a5f95f-0aee-4240-8637-e5b3eb342219" },
  "TotalTax": 0,
  "TotalAmount": 0,
  "Category": null,
  "Comment": "werwer",
  "ShippingMethod": null,
  "PromisedDate": "2024-01-10T18:37:09.3927056+05:30",
  "JournalMemo": "7",
  "BillDeliveryStatus": "Print",
  "AppliedToDate": 0,
  "BalanceDueAmount": 30,
  "Status": "Open",
  "LastPaymentDate": "2024-01-10T18:37:09.3956523+05:30",
  "Order": null,
  "ForeignCurrency": null
}

After posting above JSON data. I am getting below errors. I try to found error meanif on MyOB websites but no luck can anyone help me what is the meaning of this error.

 

{
    "Errors": [
      {
        "Name": "ValidationWarning",
        "Message": "TransferEvent_VoidTransactionWarning",
        "AdditionalDetails": "Amount:(SaleEvent)",
        "ErrorCode": 4462,
        "Severity": "Warning",
        "LearnMore": null
      },
      {
        "Name": "ValidationError",
        "Message": "BusinessLine_AccountHeaderNotAllowed",
        "AdditionalDetails": "AccountId:(SaleEventLine)",
        "ErrorCode": 4244,
        "Severity": "Error",
        "LearnMore": null
      },
      {
        "Name": "ValidationError",
        "Message": "BusinessLine_AccountPostable",
        "AdditionalDetails": "AccountId:(SaleEventLine)",
        "ErrorCode": 4245,
        "Severity": "Error",
        "LearnMore": null
      }
    ],
    "Information": "Warning, error messages have not been finalised in this release and may change"
  }
  • Earl_HD's avatar
    Earl_HD
    MYOB Moderator

    Hi silverwolf,

    Thank you so much for your post and welcome to the Community Forum!

    I appreciate your reaching out. If you're encountering the ValidationException error, I recommend checking out this informative help article: [ Error: ValidationException]. It provides valuable insights and guidance to help you find a solution to this issue. If you have any further questions or need additional assistance, feel free to let us know. We're here to help!

    Regards,
    Earl

  • Earl_HD's avatar
    Earl_HD
    MYOB Moderator

    Hi silverwolf,

    I would like to check if you're still having this issue? If so, feel free to post again and one of us will be happy to assist you.

    Regards,
    Earl