My Products
Help
Stefan Hult
PARTNER

Insert LandedCost causes an error

by Stefan Hult

Hi

 

Insert LandedCost on a Receipt with following endpoint 

 

 
causes this error: VismaId: a8fb3f26-b9bd-455a-87ff-ec022b39f954. Error updating purchase receipt. Object reference not set to an instance of an object.
 
Tried to isolate the error but nothing helps.

{
  "landedCost": [
    {
      "operation""Insert",

      "landedCostCode": {
        "value""PACKING1"
      },
      "apBillDate": {
        "value""2021-06-08T16:44:28.012Z"
      },
      "currency": {
        "value""SEK"
      },
      "locationId": {
        "value""Primär"
      },
      "description": {
        "value""Kostnad för packning"
      },
      "supplierID": {
          "value""50010"
      },
      "amount": {
          "value"100
      },
      "apDocType": {
        "value""Check"
      },
      "inDocType": {
        "value""Undefined"
      },
      "inRefNbr": {
        "value""1600004"
      },
      "postponePurchaseInvoiceCreation": {
        "value"true
      }
    }
  ]
}
2 REPLIES 2

by Magnus Johnsen

We can confirm even sending the minimum fields result in the same error:

{
    "landedCost": [
        {
            "operation": "Insert",
            "landedCostCode": {
                "value": "TESTCODE"
            },
            "supplierID": {
                "value": "50000"
            },
            "purchaseInvoiceNbr": {
                "value": "SupRef"
            },
            "locationId": {
                "value": "Main"
            },
            "description": {
                "value": "Test"
            }
        }
    ]
}
 
It has been reported to the development team.
Thank you. 

by Magnus Johnsen

Hi,

We're having a look at this and will get back to you.