Back

Search

Search

Methods

Inventory

Orders

PurchaseOrder /Modify_PaymentStatement

Response: Modify_PaymentStatementResponse



Modify purchase order payment statements. You can add new lines, update and delete existing. The method will return modified list back to you with each record identified by unique identifier.

Parameters

NameTypeDescription
requestModify_PaymentStatementRequest

HTTP Endpoint

Server /PurchaseOrder / Modify_PaymentStatement

Permissions

GlobalPermissions.PurchaseOrder.EditPurchaseOrderNode

Example Code

Example Request

The following request format is required for this method.

POST https://eu-ext.linnworks.net//api/PurchaseOrder/Modify_PaymentStatement HTTP/1.1
Host: eu-ext.linnworks.net
Connection: keep-alive
Accept: application/json, text/javascript, */*; q=0.01
Origin: https://www.linnworks.net
Accept-Language: en
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: https://www.linnworks.net/
Accept-Encoding: gzip, deflate
Authorization: INSERT_YOUR_TOKEN_HERE

request={
  "itemsToAdd": [
    {
      "Id": "0e308cbc-dca8-4ecc-8e14-e3567be4f146",
      "Reference": "sample string 2",
      "ConversionRate": 3.0,
      "Currency": "sample string 4",
      "fkPurchaseAdditionalCostItemId": 1,
      "LineCost": 5.0,
      "PaymentDate": "2018-10-03T11:12:33.0845121+01:00",
      "CreationDate": "2018-10-03T11:12:33.0845121+01:00"
    },
    {
      "Id": "0e308cbc-dca8-4ecc-8e14-e3567be4f146",
      "Reference": "sample string 2",
      "ConversionRate": 3.0,
      "Currency": "sample string 4",
      "fkPurchaseAdditionalCostItemId": 1,
      "LineCost": 5.0,
      "PaymentDate": "2018-10-03T11:12:33.0845121+01:00",
      "CreationDate": "2018-10-03T11:12:33.0845121+01:00"
    }
  ],
  "itemsToUpdate": [
    {
      "PurchasePaymentStatementId": 1,
      "Id": "e07d2abc-8934-4aea-8c46-94aa323e0f5f",
      "Reference": "sample string 3",
      "ConversionRate": 4.0,
      "Currency": "sample string 5",
      "fkPurchaseAdditionalCostItemId": 1,
      "LineCost": 6.0,
      "PaymentDate": "2018-10-03T11:12:33.0845121+01:00",
      "CreationDate": "2018-10-03T11:12:33.0845121+01:00"
    },
    {
      "PurchasePaymentStatementId": 1,
      "Id": "e07d2abc-8934-4aea-8c46-94aa323e0f5f",
      "Reference": "sample string 3",
      "ConversionRate": 4.0,
      "Currency": "sample string 5",
      "fkPurchaseAdditionalCostItemId": 1,
      "LineCost": 6.0,
      "PaymentDate": "2018-10-03T11:12:33.0845121+01:00",
      "CreationDate": "2018-10-03T11:12:33.0845121+01:00"
    }
  ],
  "itemsToDelete": [
    1,
    2
  ],
  "PurchaseId": "773335fa-3392-4f80-9115-980e6c6c0723"
}

Response

This is an example response. Results may vary depending on your data.

{
  "ModifiedItems": [
    {
      "Id": "a8c9489d-70aa-442a-9de6-9494c9753c4a",
      "PurchasePaymentStatementId": 2,
      "LineCost": 3.0,
      "ConversionRate": 4.0,
      "Currency": "sample string 5",
      "Reference": "sample string 6",
      "CreationDate": "2018-10-03T11:12:35.4471765+01:00",
      "PaymentDate": "2018-10-03T11:12:35.4471765+01:00",
      "fkPurchaseAdditionalCostItemId": 1
    },
    {
      "Id": "a8c9489d-70aa-442a-9de6-9494c9753c4a",
      "PurchasePaymentStatementId": 2,
      "LineCost": 3.0,
      "ConversionRate": 4.0,
      "Currency": "sample string 5",
      "Reference": "sample string 6",
      "CreationDate": "2018-10-03T11:12:35.4471765+01:00",
      "PaymentDate": "2018-10-03T11:12:35.4471765+01:00",
      "fkPurchaseAdditionalCostItemId": 1
    }
  ]
}