---
updatedAt: 2026-10-01T04:40:49.000Z
agentTools:
  projectIndex: https://developers.peakaccount.com/llms.txt
---

# Edit Goods Receipt

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "PeakAPIs.Core",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.peakaccount.com",
      "description": "Production"
    },
    {
      "url": "https://peakengineapidev.azurewebsites.net",
      "description": "UAT"
    }
  ],
  "paths": {
    "/api/v1/GoodsReceipts/edit": {
      "post": {
        "tags": [
          "GoodsReceipts"
        ],
        "summary": "Edit Goods Receipt",
        "parameters": [
          {
            "name": "getResult",
            "in": "query",
            "description": "Numeric code indicating whether the result data is returned in the response",
            "schema": {
              "enum": [
                0,
                1
              ],
              "type": "integer",
              "description": "Numeric code indicating whether the result data is returned in the response",
              "format": "int32",
              "x-enumDescriptions": {
                "0": "Do not return the result data in the response",
                "1": "Return the result data in the response"
              }
            }
          },
          {
            "name": "Time-Stamp",
            "in": "header",
            "description": "Timestamp (yyyyMMddHHmmss)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Time-Signature",
            "in": "header",
            "description": "HMAC-SHA1 encrypted Time-Stamp where Secret Key is connectId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "User-Token",
            "in": "header",
            "description": "This token will be generated by PEAK.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Client-Token",
            "in": "header",
            "description": "Token used to identify between client and PEAK to call API.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "peakGoodsReceipts"
                ],
                "type": "object",
                "properties": {
                  "peakGoodsReceipts": {
                    "required": [
                      "code",
                      "goodsReceipt"
                    ],
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "description": "The code of the goods receipt to be edited"
                      },
                      "goodsReceipt": {
                        "required": [
                          "issuedDate",
                          "products"
                        ],
                        "type": "object",
                        "properties": {
                          "code": {
                            "maxLength": 50,
                            "type": "string",
                            "description": "The code displayed in the PEAK. If no value is provided, PEAK will generate it automatically"
                          },
                          "issuedDate": {
                            "type": "string",
                            "description": "Document issuance date"
                          },
                          "dueDate": {
                            "type": "string",
                            "description": "Document due date, which must be after the document issuance date"
                          },
                          "contactId": {
                            "type": "string",
                            "description": "Unique Identifier of the contact associated with the document"
                          },
                          "contactCode": {
                            "maxLength": 20,
                            "type": "string",
                            "description": "Code of the contact associated with the document (If contactId has been assigned a value, contactCode is not required)"
                          },
                          "reference": {
                            "maxLength": 32,
                            "type": "string",
                            "description": "Reference information of the document"
                          },
                          "remark": {
                            "maxLength": 1000,
                            "type": "string",
                            "description": "Additional remarks or notes"
                          },
                          "taxStatus": {
                            "enum": [
                              0,
                              1,
                              2
                            ],
                            "type": "integer",
                            "description": "Specify the tax status of the document to indicate whether the price includes tax or the tax is separate",
                            "format": "int32",
                            "x-enumDescriptions": {
                              "0": "Price excludes VAT (VAT is added on top)",
                              "1": "Price already includes VAT",
                              "2": "No VAT applies to this document"
                            }
                          },
                          "discountTotal": {
                            "type": "string",
                            "description": "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": {
                            "enum": [
                              0,
                              1
                            ],
                            "type": "integer",
                            "description": "isTaxInvoice status indicating whether the document can be used as a tax invoice or not",
                            "format": "int32",
                            "x-enumDescriptions": {
                              "0": "Cannot be used as a tax invoice",
                              "1": "This document can be used as a tax invoice"
                            }
                          },
                          "tags": {
                            "maxItems": 10,
                            "type": "array",
                            "items": {
                              "maxLength": 128,
                              "type": "string"
                            },
                            "description": "Label attached to someone or something for the purpose of identification or to give other information"
                          },
                          "products": {
                            "type": "array",
                            "items": {
                              "required": [
                                "quantity",
                                "price",
                                "vatType"
                              ],
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "The Unique Identifier of an existing line on the document (used when editing a document)"
                                },
                                "productId": {
                                  "type": "string",
                                  "description": "The Unique Identifier of the product/service for this line. Send productId or productCode, not both"
                                },
                                "productCode": {
                                  "maxLength": 50,
                                  "type": "string",
                                  "description": "Code of the product/service for this line, used as an alternative to productId"
                                },
                                "description": {
                                  "maxLength": 1000,
                                  "type": "string",
                                  "description": "Description of the line. Required when isDescription is 1, or when the line has no product/service and no accountCode"
                                },
                                "accountCode": {
                                  "type": "string",
                                  "description": "Account code to record this line in. Used when the line is not linked to a product/service"
                                },
                                "accountSubId": {
                                  "type": "string",
                                  "description": "The Unique Identifier of the sub account under accountCode. Send accountSubId or accountSubCode, not both"
                                },
                                "accountSubCode": {
                                  "type": "string",
                                  "description": "Code of the sub account under accountCode, used as an alternative to accountSubId"
                                },
                                "quantity": {
                                  "type": "number",
                                  "description": "Quantity of the line. Required unless isDescription is 1",
                                  "format": "double"
                                },
                                "price": {
                                  "type": "number",
                                  "description": "Price per unit of the line. Required unless isDescription is 1",
                                  "format": "double"
                                },
                                "discount": {
                                  "type": "string",
                                  "description": "Discount of the line, as an amount (e.g. \"100\") or a percentage (e.g. \"10%\"). Must not be negative"
                                },
                                "vatType": {
                                  "enum": [
                                    1,
                                    2,
                                    3
                                  ],
                                  "type": "integer",
                                  "description": "Numeric code indicating the VAT rate of the line",
                                  "format": "int32",
                                  "x-enumDescriptions": {
                                    "1": "No VAT (VAT-exempt item)",
                                    "2": "0% VAT",
                                    "3": "7% VAT"
                                  }
                                },
                                "isDescription": {
                                  "enum": [
                                    0,
                                    1
                                  ],
                                  "type": "integer",
                                  "description": "Numeric code indicating whether this line is a description-only text row",
                                  "format": "int32",
                                  "x-enumDescriptions": {
                                    "0": "Normal priced line item",
                                    "1": "This line is a description-only text row (no price / quantity)"
                                  }
                                },
                                "withHoldingTaxAmount": {
                                  "type": "string",
                                  "description": "Withholding tax of the line, as an amount (e.g. \"30\") or a percentage of the line net amount (e.g. \"3%\")"
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "paidPayments": {
                            "$ref": "#/components/schemas/PeakAPIs.Library.Model.Request.Transaction.Shared.Normal.PaymentsTransaction"
                          },
                          "status": {
                            "enum": [
                              "Draft",
                              "Approve"
                            ],
                            "type": "string",
                            "description": "Status to create the document with: Draft (save as draft) or Approve (create and approve). If omitted, the document is approved",
                            "x-enumDescriptions": {
                              "Draft": "Save as draft",
                              "Approve": "Create and approve"
                            }
                          },
                          "preTaxAmount": {
                            "type": "number",
                            "description": "Amount before tax is applied (If value is null, PEAK will calculate it automatically)",
                            "format": "double"
                          },
                          "vatAmount": {
                            "type": "number",
                            "description": "Tax collected from the increased value of products or services (If value is null, PEAK will calculate it automatically)",
                            "format": "double"
                          },
                          "netAmount": {
                            "type": "number",
                            "description": "Total value of the document after tax and discounts have been applied (If value is null, PEAK will calculate it automatically)",
                            "format": "double"
                          },
                          "currency": {
                            "$ref": "#/components/schemas/PeakAPIs.Library.Model.Request.Transaction.Shared.Normal.CurrencyTransaction"
                          },
                          "receivedTaxInvoice": {
                            "$ref": "#/components/schemas/PeakAPIs.Library.Model.Request.Transaction.Shared.Normal.ReceivedTaxInvoiceTransaction"
                          }
                        },
                        "additionalProperties": false
                      },
                      "getResult": {
                        "enum": [
                          0,
                          1
                        ],
                        "type": "integer",
                        "description": "Numeric code indicating whether the result data is returned in the response",
                        "format": "int32",
                        "x-enumDescriptions": {
                          "0": "Do not return the result data in the response",
                          "1": "Return the result data in the response"
                        }
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              },
              "examples": {
                "Edit by document code": {
                  "summary": "Edit by document code",
                  "value": {
                    "PeakGoodsReceipts": {
                      "code": "GR-202609-0001",
                      "goodsReceipt": {
                        "issuedDate": "20260925",
                        "contactCode": "C00002",
                        "reference": "PR-2026-09-0037",
                        "remark": "",
                        "taxStatus": 0,
                        "discountTotal": "0",
                        "products": [
                          {
                            "productCode": "P00015",
                            "description": "Ceramic coffee mug 350 ml",
                            "quantity": 3,
                            "price": 850,
                            "discount": "0",
                            "vatType": 3,
                            "withHoldingTaxAmount": "0"
                          }
                        ],
                        "status": "Approve"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeakAPIs.Library.Model.Response.GoodsReceipts.ResponseGoodsReceiptModel"
                },
                "examples": {
                  "Success": {
                    "value": {
                      "PeakGoodsReceipts": {
                        "goodsReceipts": [
                          {
                            "code": "GR-202609-0001",
                            "issuedDate": "20260925",
                            "contactId": "f3a1c9de-6b8e-4a2f-9d3c-1e7f0a5b2c6d",
                            "status": 2,
                            "isAllocation": false,
                            "referenceName": "PO-202609-0001",
                            "preTaxAmount": 2547.2,
                            "vatAmount": 178.3,
                            "netAmount": 2725.5,
                            "whtAmount": 0,
                            "warehouseId": 1
                          }
                        ],
                        "resDesc": "PeakGoodsReceipts have Completed",
                        "resCode": "200"
                      }
                    }
                  },
                  "Bad request": {
                    "value": {
                      "PeakGoodsReceipts": {
                        "goodsReceipts": [],
                        "resDesc": "Bad Request : Missing code",
                        "resCode": "400"
                      }
                    }
                  },
                  "Internal server error": {
                    "value": {
                      "PeakGoodsReceipts": {
                        "goodsReceipts": [],
                        "resDesc": "PEAK internal server error. Please contact our support team for assistance. (Code:0, CorrelationId:da05c1c1-e2d8-40a7-89e0-eaafe337507b)",
                        "resCode": "500"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-readme": {
          "code-samples": [
            {
              "language": "json",
              "name": "Edit by document code",
              "code": "{\n  \"PeakGoodsReceipts\": {\n    \"code\": \"GR-202609-0001\",\n    \"goodsReceipt\": {\n      \"issuedDate\": \"20260925\",\n      \"contactCode\": \"C00002\",\n      \"reference\": \"PR-2026-09-0037\",\n      \"remark\": \"\",\n      \"taxStatus\": 0,\n      \"discountTotal\": \"0\",\n      \"products\": [\n        {\n          \"productCode\": \"P00015\",\n          \"description\": \"Ceramic coffee mug 350 ml\",\n          \"quantity\": 3,\n          \"price\": 850,\n          \"discount\": \"0\",\n          \"vatType\": 3,\n          \"withHoldingTaxAmount\": \"0\"\n        }\n      ],\n      \"status\": \"Approve\"\n    }\n  }\n}",
              "correspondingExample": "Edit by document code"
            }
          ],
          "samples-languages": [
            "json"
          ]
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PeakAPIs.Library.Model.GoodsReceipts.APIGoodsReceiptModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "issuedDate": {
            "type": "string"
          },
          "contactId": {
            "type": "string"
          },
          "status": {
            "type": "integer",
            "format": "int32"
          },
          "isAllocation": {
            "type": "boolean"
          },
          "referenceName": {
            "type": "string"
          },
          "preTaxAmount": {
            "type": "number",
            "format": "double"
          },
          "vatAmount": {
            "type": "number",
            "format": "double"
          },
          "netAmount": {
            "type": "number",
            "format": "double"
          },
          "whtAmount": {
            "type": "number",
            "format": "double"
          },
          "referenceTransactionId": {
            "type": "string"
          },
          "referenceTransactionType": {
            "type": "integer",
            "format": "int32"
          },
          "warehouseId": {
            "type": "integer",
            "format": "int32"
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PeakAPIs.Library.Model.Response.Shared.APITransactionProducts"
            }
          }
        },
        "additionalProperties": false
      },
      "PeakAPIs.Library.Model.Request.Transaction.Shared.Normal.Cheque": {
        "type": "object",
        "properties": {
          "accountNo": {
            "maxLength": 12,
            "type": "string",
            "description": "Bank account number"
          },
          "branchNo": {
            "maxLength": 6,
            "type": "string",
            "description": "Bank branch number"
          },
          "chequeNo": {
            "maxLength": 8,
            "type": "string",
            "description": "Cheque number"
          },
          "amount": {
            "type": "number",
            "description": "Amount specified in the Cheque",
            "format": "double"
          },
          "chequeDate": {
            "type": "string",
            "description": "Cheque issuance date in the format yyyyMMdd"
          },
          "bankId": {
            "enum": [
              0,
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              8,
              9,
              10,
              11,
              12,
              13,
              14,
              15,
              16,
              17,
              18,
              20,
              21,
              22,
              23,
              24,
              25,
              26,
              27,
              28,
              29,
              30,
              31,
              32,
              33,
              34,
              35,
              36,
              37
            ],
            "type": "integer",
            "description": "The numerical code that indicates a financial institution",
            "format": "int32",
            "x-enumDescriptions": {
              "0": "Other / bank not listed (use bankName)",
              "1": "Bangkok Bank",
              "2": "Kasikornbank",
              "3": "Siam Commercial Bank",
              "4": "SME Development Bank",
              "5": "Krungthai Bank",
              "6": "Bank of Ayudhya (Krungsri)",
              "7": "Kiatnakin Phatra Bank",
              "8": "CIMB Thai Bank",
              "9": "TMBThanachart Bank (ttb)",
              "10": "TISCO Bank",
              "11": "Thai Credit Bank",
              "12": "Thanachart / TCAP",
              "13": "Bank for Agriculture and Agricultural Cooperatives",
              "14": "Export-Import Bank of Thailand",
              "15": "United Overseas Bank (Thai)",
              "16": "Land and Houses Bank",
              "17": "Standard Chartered Bank (Thai)",
              "18": "Government Savings Bank",
              "20": "Islamic Bank of Thailand",
              "21": "Industrial and Commercial Bank of China (Thai)",
              "22": "J.P. Morgan Chase Bank",
              "23": "Citibank",
              "24": "Sumitomo Mitsui Banking Corporation",
              "25": "Deutsche Bank",
              "26": "BNP Paribas",
              "27": "Mizuho Bank",
              "28": "Mega International Commercial Bank",
              "29": "Bank of China (Thai)",
              "30": "Bank of America",
              "31": "Sumitomo Mitsui Trust Bank",
              "32": "RHB Bank",
              "33": "Indian Overseas Bank",
              "34": "HSBC",
              "35": "ANZ Bank",
              "36": "OCBC Bank",
              "37": "Government Housing Bank"
            }
          },
          "paymentMethodId": {
            "type": "string",
            "description": "The Unique Identifier of the payment method used to record the Cheque payment"
          },
          "paymentMethodCode": {
            "type": "string",
            "description": "The Code of the payment method used to record the Cheque payment"
          }
        },
        "additionalProperties": false
      },
      "PeakAPIs.Library.Model.Request.Transaction.Shared.Normal.CurrencyTransaction": {
        "type": "object",
        "properties": {
          "currencyId": {
            "enum": [
              0,
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              8,
              9,
              10,
              11,
              12,
              13,
              14,
              15,
              16,
              17,
              18,
              19,
              20,
              21,
              22,
              23,
              24,
              25,
              26,
              27,
              28,
              29,
              30,
              31,
              32,
              33,
              34,
              35,
              36,
              37,
              38,
              39,
              40,
              41,
              42,
              43,
              44,
              45,
              46,
              47,
              48
            ],
            "type": "integer",
            "description": "Numeric code indicating the currency of the document",
            "format": "int32",
            "x-enumDescriptions": {
              "0": "Thai Baht",
              "1": "US Dollar",
              "2": "Pound Sterling",
              "3": "Euro",
              "4": "Japanese Yen",
              "5": "Hong Kong Dollar",
              "6": "Malaysian Ringgit",
              "7": "Singapore Dollar",
              "8": "Brunei Dollar",
              "9": "Philippine Peso",
              "10": "Indonesian Rupiah",
              "11": "Indian Rupee",
              "12": "Swiss Franc",
              "13": "Australian Dollar",
              "14": "New Zealand Dollar",
              "15": "Canadian Dollar",
              "16": "Swedish Krona",
              "17": "Danish Krone",
              "18": "Norwegian Krone",
              "19": "Chinese Yuan (Renminbi)",
              "20": "Mexican Peso",
              "21": "South African Rand",
              "22": "South Korean Won",
              "23": "New Taiwan Dollar",
              "24": "Kuwaiti Dinar",
              "25": "Saudi Riyal",
              "26": "UAE Dirham",
              "27": "Myanmar Kyat",
              "28": "Bangladeshi Taka",
              "29": "Czech Koruna",
              "30": "Cambodian Riel",
              "31": "Kenyan Shilling",
              "32": "Lao Kip",
              "33": "Russian Ruble",
              "34": "Vietnamese Dong",
              "35": "Egyptian Pound",
              "36": "Polish Zloty",
              "37": "Sri Lankan Rupee",
              "38": "Iraqi Dinar",
              "39": "Bahraini Dinar",
              "40": "Omani Rial",
              "41": "Jordanian Dinar",
              "42": "Qatari Riyal",
              "43": "Maldivian Rufiyaa",
              "44": "Nepalese Rupee",
              "45": "Papua New Guinean Kina",
              "46": "Israeli New Shekel",
              "47": "Hungarian Forint",
              "48": "Pakistani Rupee"
            }
          },
          "exchangeRate": {
            "type": "number",
            "description": "Exchange rate from the document currency to THB. Required for invoices and receipts",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "PeakAPIs.Library.Model.Request.Transaction.Shared.Normal.Payment": {
        "type": "object",
        "properties": {
          "cheque": {
            "$ref": "#/components/schemas/PeakAPIs.Library.Model.Request.Transaction.Shared.Normal.Cheque"
          },
          "note": {
            "type": "string",
            "description": "Additional remarks or notes for that specific payment received"
          },
          "isCheque": {
            "enum": [
              0,
              1
            ],
            "type": "integer",
            "description": "The numerical code indicating whether this payment is made by Cheque or not",
            "format": "int32",
            "x-enumDescriptions": {
              "0": "Not a cheque payment",
              "1": "This payment is made by cheque (the cheque object is required)"
            }
          },
          "amount": {
            "type": "number",
            "description": "Payment amount",
            "format": "double"
          },
          "paymentMethodId": {
            "type": "string",
            "description": "The Unique Identifier of the payment method"
          },
          "paymentMethodCode": {
            "type": "string",
            "description": "Code of the payment method (If paymentMethodId has been assigned a value, paymentMethodCode is not required)"
          },
          "accountCode": {
            "type": "string",
            "description": "Account code to be used for recording financial transactions"
          },
          "accountSubId": {
            "type": "string",
            "description": "Sub account Unique Identifier to be used for recording financial transactions"
          },
          "accountSubCode": {
            "type": "string",
            "description": "Sub account code to be used for recording financial transactions"
          }
        },
        "additionalProperties": false
      },
      "PeakAPIs.Library.Model.Request.Transaction.Shared.Normal.PaymentsTransaction": {
        "type": "object",
        "properties": {
          "payments": {
            "maxItems": 10,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PeakAPIs.Library.Model.Request.Transaction.Shared.Normal.Payment"
            },
            "description": "The object with payment details"
          },
          "paymentDate": {
            "type": "string",
            "description": "Payment date in the format yyyyMMdd"
          },
          "withHoldingTaxAmount": {
            "type": "string",
            "description": "Withholding tax deducted from this payment, as an amount (e.g. \"30\") or a percentage (e.g. \"3%\")"
          }
        },
        "additionalProperties": false
      },
      "PeakAPIs.Library.Model.Request.Transaction.Shared.Normal.ReceivedTaxInvoiceTransaction": {
        "type": "object",
        "properties": {
          "taxInvoiceNumber": {
            "maxLength": 50,
            "type": "string",
            "description": "Number of the tax invoice received from the supplier"
          },
          "taxInvoiceDate": {
            "type": "string",
            "description": "Date of the tax invoice received from the supplier (yyyyMMdd)"
          },
          "journalDate": {
            "type": "string",
            "description": "Date the received tax invoice is recorded (yyyyMMdd)"
          },
          "periodDate": {
            "type": "string",
            "description": "Tax period the received tax invoice is claimed in (yyyyMMdd)"
          }
        },
        "additionalProperties": false
      },
      "PeakAPIs.Library.Model.Response.GoodsReceipts.APIBodyGoodsReceipt": {
        "type": "object",
        "properties": {
          "goodsReceipts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PeakAPIs.Library.Model.GoodsReceipts.APIGoodsReceiptModel"
            }
          },
          "resDesc": {
            "type": "string"
          },
          "resCode": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "PeakAPIs.Library.Model.Response.GoodsReceipts.ResponseGoodsReceiptModel": {
        "type": "object",
        "properties": {
          "peakGoodsReceipts": {
            "$ref": "#/components/schemas/PeakAPIs.Library.Model.Response.GoodsReceipts.APIBodyGoodsReceipt"
          },
          "eventType": {
            "type": "string"
          },
          "apiType": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "PeakAPIs.Library.Model.Response.Shared.APITransactionProducts": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "productId": {
            "type": "string"
          },
          "productCode": {
            "type": "string"
          },
          "accountCode": {
            "type": "string"
          },
          "accountSubId": {
            "type": "string"
          },
          "accountSubCode": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "quantity": {
            "type": "number",
            "format": "double"
          },
          "price": {
            "type": "number",
            "format": "double"
          },
          "discount": {
            "type": "string"
          },
          "vatType": {
            "type": "integer",
            "format": "int32"
          },
          "isDescription": {
            "type": "integer",
            "format": "int32"
          },
          "withHoldingTaxAmount": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    }
  },
  "x-readme": {
    "explorer-enabled": false,
    "proxy-enabled": false
  }
}
```