Mina produkter
Hjälp
Anonymous
Inte tillämpbar

Error message "For Invoice type INV with invoice number..."

av Anonymous

Trying to POST a customerinvoice from swagger to visma but keep getting this error message

"message": "For Invoice type INV with invoice number , you cannot update Field. Document status: Balanced." 

 

Im using the CustomerInvoiceV2 version

https://integration.visma.net/API/controller/api/v2/customerinvoice

 

 My JSON string looks like this

 

{
  "creditTermsId": {
    "value": "30"
  },
  "cashDiscountDate": {
    "value": "2021-01-29T00:00:00"
  },
  "documentDueDate": {
    "value": "2021-01-29T00:00:00"
  },
  "taxDetailLines": [
    {
      "taxId": {
        "value": "01"
      }
    }
  ],
  "invoiceLines": [
    {
      "operation": "Insert",
      "accountNumber": {
        "value": "3041"
      },
      "subaccount": [
        {
          "segmentId": 49422,
          "segmentValue": "00000000000000"
        }
      ],
	"lineNumber": {
        "value": 0
      }
    },
  ],
  "customerNumber": {
    "value": "10021"
  },
  "documentDate": {
    "value": "2020-12-30T00:00:00"
  },
  "origInvoiceDate": {
    "value": "2020-12-30T00:00:00"
  },
  "postPeriod": {
    "value": "122020"
  },
  "locationId": {
    "value": "Primär"
  },
}

 

 

1 SVAR 1
Godkänd lösning
Anonymous
Inte tillämpbar

av Anonymous

The minimum attributes that is needed when creating customerinvoice are customerNumber, postPeriod, documentDate, invoiceText, invoiceLines (operation, accountNumber, quantity, unitPriceInCurrency, manualAmountInCurrency, lineNumber and vatCodeId). 
I missed that and could not found it in the documentation. 

Få uppdateringar på det här inlägget i din inkorg

Klicka på de tre prickarna till höger i inlägget/artikeln och välj Prenumerera.

Läs mer om prenumeration här