AR Invoice - API - Miscellanous Invoice

Hi

What am I missing here?

Erp.BO.ARInvoiceSvc/GetNewInvcMisc

{
  "ds": {
    "InvcHead": [
      {
      "Company": "19261A",
      "OpenInvoice": true,
      "CreditMemo": false,
      "GroupID": "SBDEV",
      "InvoiceNum": 0,
      "InvoiceType": "Mis",
      "InvoiceDate": "2024-01-01",
      "ApplyDate": "2024-01-01",
      "SoldToCustID": "MEU1011",
      "TaxRegionCode": "AUST",
      "Description": "Test Load via API"
      }
    ]
  },
  "invoiceNum": 0,
  "invoiceLine": 0
}

yet Epicor’s reponse is

{
  "HttpStatus": 400,
  "ReasonPhrase": "REST API Exception",
  "ErrorMessage": "InvcHead not found.",
  "ErrorType": "Ice.BLException",
  "ErrorDetails": [
    {
      "Message": "InvcHead not found.",
      "Type": "Error",
      "Table": "InvcHead",
      "Field": "InvoiceNum",
      "Program": "Erp.Services.BO.ARInvoice.dll",
      "Method": "InvcMiscAfterGetNew",
      "ColumnNumber": 17,
      "LineNumber": 17945
    }
  ],
  "CorrelationId": "ffffffff-abd7-4a56-a616-3cbf53ecc6ec"
}

All I want to do is create a miscellaneous type invoice and get back the invoice number so I can then add invoice lines and the GL account codes (for TGLC) to create a complete invoice.

What am I missing here?

Thanks

InvcMisc is a Misc Charge for an Invoice Line.

You want to use GetNewInvcHeadType instead.

If you are not familiar with the Epicor REST API, open Kinetic in your browser, open your browsers Dev Tools by pressing F12, switch to the Network tab, perform the actions you want in Epicor and study the network calls that are made.