My Products
Help
LMNiko
CONTRIBUTOR *

Visma net ERP interactive API not updating date fields

by LMNiko

API calls PUT /controller/api/v1/PurchaseReceipt)/{receiptNumber} and PUT /controller/api/v1/shipment/{shipmentNbr} don't seem to update their date and shipmentDate fields. Is this on purpose?

3 REPLIES 3

by Yıldırım

Hi, please share your transaction in detail, such as used JSON and the print screen of the fields from UI that you'd like to update via PUT Purchase Receipt Endpoint.

Thanks. 

LMNiko
CONTRIBUTOR *

by LMNiko

Hey,

I would like to update this field on Purchase receipt

LMNiko_0-1676898874755.png

 

By using this json, note that I have tried multiple different date formats to no avail.

{
"branchNumber": "",
"controlAmount": 0,
"controlQty": 0,
"createBill": false,
"currency": "",
"date": "2023-02-20T13:10:31.856Z",
"hold": false,
"landedCost": null,
"lines": [{
"accountDescription": "",
"accountId": "",
"actualAccountId": null,
"actualSubaccount": null,
"allocations": null,
"amount": 0,
"branchId": "",
"branchNumber": "",
"completePoLine": true,
"discountAmount": 0,
"discountCodeId": "",
"discountPercent": 0,
"expirationDate": null,
"extCost": 0,
"inventoryId": "",
"lineNbr": {
"value": 1
},
"lineType": "GoodsForInventory",
"locationId": "",
"lotSerialNumber": "",
"manualDiscount": false,
"operation": "Update",
"poOrderLineNbr": 0,
"poOrderNbr": "",
"poOrderType": "RegularOrder",
"projectId": "",
"projectTaskId": "",
"receiptQty": {
"value": 1.000
},
"subaccount": null,
"taxCategoryId": "",
"transactionDescription": "",
"transferOrderLineNbr": 0,
"transferOrderNbr": "",
"transferOrderType": "CreditNote",
"unitCost": 0,
"uom": "",
"warehouseId": ""
}, {
"accountDescription": "",
"accountId": "",
"actualAccountId": null,
"actualSubaccount": null,
"allocations": null,
"amount": 0,
"branchId": "",
"branchNumber": "",
"completePoLine": true,
"discountAmount": 0,
"discountCodeId": "",
"discountPercent": 0,
"expirationDate": null,
"extCost": 0,
"inventoryId": "",
"lineNbr": {
"value": 3
},
"lineType": "GoodsForInventory",
"locationId": "",
"lotSerialNumber": "",
"manualDiscount": false,
"operation": "Update",
"poOrderLineNbr": 0,
"poOrderNbr": "",
"poOrderType": "RegularOrder",
"projectId": "",
"projectTaskId": "",
"receiptQty": {
"value": 1.000
},
"subaccount": null,
"taxCategoryId": "",
"transactionDescription": "",
"transferOrderLineNbr": 0,
"transferOrderNbr": "",
"transferOrderType": "CreditNote",
"unitCost": 0,
"uom": "",
"warehouseId": ""
}],
"locationId": "",
"postPeriod": "",
"receiptNbr": "",
"receiptType": "PoReceipt",
"supplierId": "",
"supplierRef": "",
"warehouseId": ""
}

 

Accepted solution
Yıldırım
VISMA

by Yıldırım

In PUT requests, you should only send the fields in the payload that you'd like to update their values.

 

The mentioned case has been tested and it is working as expected. 

 

1) PUT Purchase Receipt <https://integration.visma.net/API/controller/api/v1/PurchaseReceipt/000074>

{
    "date": {
        "value": "2023-02-21"
    }
}

 

2) ERP UI output

Purchase receipts.jpg