---
title: "Edit Purchase Order"
method: POST
path: "/api/v1/PurchaseOrders/edit"
tags: ["PurchaseOrders"]
---

# Edit Purchase Order

`POST /api/v1/PurchaseOrders/edit`

## Query parameters

- `getResult` integer — Numeric code used to reduce the amount of response data received

## Headers

- `Time-Stamp` string, required
- `Time-Signature` string, required
- `User-Token` string, required
- `Client-Token` string, required

## Request body

- PeakAPIsLibraryModelRequestPurchaseOrdersPurchaseOrdersEditModel
  - `peakPurchaseOrders` PeakAPIsLibraryModelRequestPurchaseOrdersPurchaseOrdersEditModelPurchaseOrders
    - `id` string — The Unique Identifier of the purchase order to be edited
    - `code` string — The code of the purchase order to be edited
    - `purchaseOrders` PeakAPIsLibraryModelRequestTransactionSharedNormalTransactions
      - `code` string — The code displayed in the PEAK. If no value is provided, PEAK will generate it automatically
      - `issuedDate` string — Document issuance date
      - `dueDate` string — Document due date, which must be after the document issuance date
      - `contactId` string — Unique Identifier of the contact associated with the document
      - `contactCode` string — Code of the contact associated with the document (If contactId has been assigned a value, contactCode is not required)
      - `reference` string — Reference information of the document
      - `remark` string — Additional remarks or notes
      - `taxStatus` integer — Specify the tax status of the document to indicate whether the price includes tax or the tax is separate
      - `discountTotal` string — The total discount should not exceed the net total of the document or be greater than 100%. Additionally, it can only be applied when the tax type of each item is the same
      - `isTaxInvoice` integer — isTaxInvoice status indicating whether the document can be used as a tax invoice or not
      - `tags` string[] — Label attached to someone or something for the purpose of identification or to give other information
      - `products` PeakAPIsLibraryModelRequestTransactionSharedNormalProductsTransaction[] — An array of objects that will contain various data for the list of products or services
        - `id` string
        - `productId` string
        - `productCode` string
        - `description` string
        - `accountCode` string
        - `accountSubId` string
        - `accountSubCode` string
        - `quantity` number, double
        - `price` number, double
        - `discount` string
        - `vatType` integer
        - `isDescription` integer
        - `withHoldingTaxAmount` string
      - `paidPayments` PeakAPIsLibraryModelRequestTransactionSharedNormalPaymentsTransaction
        - `payments` PeakAPIsLibraryModelRequestTransactionSharedNormalPayment[] — The object with payment details
          - `cheque` PeakAPIsLibraryModelRequestTransactionSharedNormalCheque
            - `accountNo` string — Bank account number
            - `branchNo` string — Bank branch number
            - `chequeNo` string — Cheque number
            - `amount` number, double — Amount specified in the Cheque
            - `chequeDate` string — Cheque issuance date in the format yyyyMMdd
            - `bankId` integer — The numerical code that indicates a financial institution (If type is 2, bankId is required)
            - `paymentMethodId` string — The Unique Identifier of the payment method used to record the Cheque payment
            - `paymentMethodCode` string — The Code of the payment method used to record the Cheque payment
          - `note` string — Additional remarks or notes for that specific payment received
          - `isCheque` integer — The numerical code indicating whether this payment is made by Cheque or not
          - `amount` number, double — Payment amount
          - `paymentMethodId` string — The Unique Identifier of the payment method
          - `paymentMethodCode` string — Code of the payment method (If paymentMethodId has been assigned a value, paymentMethodCode is not required)
          - `accountCode` string — Account code to be used for recording financial transactions
          - `accountSubId` string — Sub account Unique Identifier to be used for recording financial transactions
          - `accountSubCode` string — Sub account code to be used for recording financial transactions
        - `paymentDate` string — Payment date in the format yyyyMMdd
        - `withHoldingTaxAmount` string
      - `status` string — Status of the document, which can have multiple states such as Draft, Approve, Voided, etc
      - `preTaxAmount` number, double — Amount before tax is applied (If value is null, PEAK will calculate it automatically)
      - `vatAmount` number, double — Tax collected from the increased value of products or services (If value is null, PEAK will calculate it automatically)
      - `netAmount` number, double — Total value of the document after tax and discounts have been applied (If value is null, PEAK will calculate it automatically)
      - `currency` PeakAPIsLibraryModelRequestTransactionSharedNormalCurrencyTransaction
        - `currencyId` integer
        - `exchangeRate` number, double
      - `receivedTaxInvoice` PeakAPIsLibraryModelRequestTransactionSharedNormalReceivedTaxInvoiceTransaction
        - `taxInvoiceNumber` string
        - `taxInvoiceDate` string
        - `journalDate` string
        - `periodDate` string
    - `getResult` integer — Numeric code used to reduce the amount of response data received

## Response `200`

Success

- PeakWCFModelsAPIResponseResponsePurchaseOrderModel
  - `peakPurchaseOrders` PeakWCFModelsAPIBodyAPIBodyPurchaseOrder
    - `purchaseOrders` PeakWCFModelsAPIAPITransactionsAPITransactionsModel[]
      - `resCode` string
      - `resDesc` string
      - `id` string
      - `code` string
      - `issuedDate` string
      - `dueDate` string
      - `contactId` string
      - `contactCode` string
      - `reference` string
      - `status` string
      - `isTaxInvoice` integer
      - `isVoid` integer
      - `preTaxAmount` number, double
      - `vatAmount` number, double
      - `netAmount` number, double
      - `whtAmount` number, double
      - `paymentAmount` number, double
      - `remainAmount` number, double
      - `remainWhtAmount` number, double
      - `documentLink` string
      - `onlineViewLink` string
      - `isPartialReceipt` integer
      - `remark` string
      - `taxStatus` integer
      - `discountTotal` string
      - `tags` string[]
      - `products` PeakWCFModelsAPIAPITransactionsAPITransactionProducts[]
        - `id` string
        - `productId` string
        - `productCode` string
        - `accountCode` string
        - `accountSubId` string
        - `accountSubCode` string
        - `description` string
        - `quantity` number, double
        - `price` number, double
        - `discount` string
        - `vatType` integer
        - `isDescription` integer
        - `withHoldingTaxAmount` string
      - `paidPayments` PeakWCFModelsAPIAPITransactionsAPITransactionPayments[]
        - `id` string
        - `paymentDate` string
        - `withHoldingTaxAmount` string
        - `paymentGroupId` integer
        - `paymentTotal` number, double
        - `payments` PeakWCFModelsAPIAPITransactionsAPITransactionPaymentLists[]
          - `paymentMethodId` string
          - `paymentMethodCode` string
          - `accountCode` string
          - `accountSubId` string
          - `accountSubCode` string
          - `amount` number, double
          - `note` string
          - `isCheque` integer
          - `cheque` PeakWCFModelsAPIAPITransactionsAPITransactionChequePayment
            - `chequeDate` string
            - `paymentMethodId` string
            - `paymentMethodCode` string
            - `bankId` integer
            - `bankName` string
            - `amount` number, double
            - `chequeNo` string
            - `branchNo` string
            - `accountNo` string
            - `isDeposited` integer
        - `journals` PeakWCFModelsAPIAPITransactionsAPITransactionJournals[]
          - `id` string
          - `code` string
        - `referenceCode` string
        - `referenceId` string
        - `referenceType` string
      - `billingNotes` PeakWCFModelsAPIAPITransactionsAPITransactionBillingNotes[]
        - `id` string
        - `code` string
        - `amount` number, double
        - `isPaid` integer
      - `creditNotes` PeakWCFModelsAPIAPITransactionsAPITransactionCreditNotes[]
        - `id` string
        - `code` string
        - `creditAmount` number, double
        - `deductedAmount` number, double
        - `refundedAmount` number, double
      - `journals` PeakWCFModelsAPIAPITransactionsAPITransactionJournals[]
        - `id` string
        - `code` string
      - `referenceCode` string
      - `referenceId` string
      - `referenceType` string
      - `statusId` integer
      - `currency` PeakWCFModelsAPIAPITransactionsAPITransactionCurrency
        - `currencyId` integer
        - `exchangeRate` number, double
      - `receivedTaxInvoice` PeakWCFModelsAPIAPITransactionsAPITransactionReceivedTaxInvoice
        - `taxInvoiceNumber` string
        - `taxInvoiceDate` string
        - `journalDate` string
        - `periodDate` string
    - `totalPurchaseOrder` integer
    - `resDesc` string
    - `resCode` string
  - `eventType` string
  - `apiType` string

---

[API](https://skmtc.net/peakaccount/apis/peakapis-core.md) · [All operations](https://skmtc.net/peakaccount/apis/peakapis-core/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/peakaccount/peakapis-core/versions/516e79534d77/schema)
