1

Does anyone know why Sage 300 rejected my valid json payload (attached below) with Invalid payload error message?

Authorization: Basic Auth User:********* Pass: **********

Header Content-Type: application/json Accept: text/plain

{
  "Invoices" : [
    {
      "VendorNumber" : "vendorA",
      "DocumentNumber" : "1234",
      "DocumentType" : "Invoice",
      "DocumentDate" : "2019-09-06T06:00:00.000Z",
      "DueDate" : "2019-10-06T06:00:00.000Z",
      "Taxable" : "1",
      "TaxAmountControl" : "0",
      "TaxGroup" : "GST",
      "TaxAuthority1" : "GST",
      "TaxClass1" : 1,
      "TaxAmount1" : 5,
      "DocumentTotalIncludingTax" : 105,
      "InvoiceDetails" : [
        {
          "ManualTaxEntry" : "1",
          "TaxClass1" : 1,
          "TaxAmount1" : 5,
          "GLAccount" : "00000000000000",
          "DistributedAmount" : 100,
          "DestinationDescription" : "Description"
        }
      ]
    }
  ],
  "UpdateOperation" : "Insert"
}

I have already tried update content types and updated my request profile with swagger definition.

User able to execute same json payload under swagger and success response.

kcrisman
  • 4,374
  • 20
  • 41
Liu James
  • 11
  • 1

1 Answers1

0

I'm trying a GL Entry. Sage creates an entry, but with no data in it.

{
  "BatchNumber": "000000",

  "Description": "gl journal entry",

  "JournalHeaders": [

{

  "BatchNumber": "000000",

  "EntryNumber": "00001",

  "SourceLedger": "GL",

  "SourceType": "JE",

  "Description": "entry 1",

  "DocumentDate": "2019-11-05",

  "JournalDetails": [

    {

      "BatchNumber": "000000",

      "EntryNumber": "00001",

      "TransactionNumber": "0000000020",

      "AccountNumber": "1221200617",

      "Amount": 30,

      "Description": "desc",

      "Reference": "ref"

    },

    {

      "BatchNumber": "000000",

      "EntryNumber": "00001",

      "TransactionNumber": "0000000040",

      "AccountNumber": "1221200517",

      "Amount": -30

    }

  ],

  "UpdateOperation": "Insert"

}



 ],

  "UpdateOperation": "Insert"
}
Datacrawler
  • 2,780
  • 8
  • 46
  • 100
David Lipschitz
  • 104
  • 2
  • 7
  • This does not really answer the question. If you have a different question, you can ask it by clicking [Ask Question](https://stackoverflow.com/questions/ask). You can also [add a bounty](https://stackoverflow.com/help/privileges/set-bounties) to draw more attention to this question once you have enough [reputation](https://stackoverflow.com/help/whats-reputation). - [From Review](/review/low-quality-posts/24680527) – Eduardo Baitello Nov 25 '19 at 14:08
  • Sorry Eduardo. You are right. I added my note here because my point is similar to the first question. And I was hoping that someone might answer if more than one person is experiencing the same problem. – David Lipschitz Nov 26 '19 at 15:17