---
title: "Create Goods Receipt All In One"
method: POST
path: "/api/v1/GoodsReceipts/allinone"
tags: ["GoodsReceipts"]
---

# Create Goods Receipt All In One

`POST /api/v1/GoodsReceipts/allinone`

## Request

- Base URL: `https://api.peakaccount.com`
- URL: `https://api.peakaccount.com/api/v1/GoodsReceipts/allinone`
- Auth: none declared. Required headers: `Time-Stamp`, `Time-Signature`, `User-Token`, `Client-Token`
- TypeScript: <https://skmtc.dev/peakaccount/apis/peakapis-core/docs/api/v1/GoodsReceipts/allinone/post.ts> (a function with typed inputs; its response is checked against the schema)

## Query parameters

- `getResult` 0 | 1: Numeric code indicating whether the result data is returned in the response

## Headers

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

## Request body

- object
  - `peakGoodsReceipts` object, required
    - `goodsReceipts` object[], required
      - `code` string: The code displayed in the PEAK. If no value is provided, PEAK will generate it automatically
      - `issuedDate` string, required: Document issuance date
      - `dueDate` string: Document due date, which must be after the document issuance date
      - `contact` object, required
        - `name` string, required: Contact name
        - `type` 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11, required: Type of contact
        - `prefixNameType` 0 | 1 | 2 | 3 | 4 | 5: If the value of "type" is 5 (Individual/Person), the "prefixNameType" field is a required variable that indicates the prefix of the contact's name
        - `prefixNameOther` string: If the value of "prefixNameType" is 5 (Other), the "prefixNameOther" field is a required variable that indicates the custom prefix for the contact's name
        - `taxNumber` string: Tax Identification Number (TIN)
        - `branchCode` string: The 5-digit number that identifies the branch of your contact's business
        - `address` string: The address registered for the branch.
        - `subDistrict` string: Sub-district of the contact's address
        - `district` string: District of the contact's address
        - `province` string: Province of the contact's address
        - `country` string: Country of the contact's address
        - `postCode` string: Post code of the contact's address
        - `callCenterNumber` string: Call center phone number of the contact
        - `faxNumber` string: Fax number of the contact
        - `email` string: Email address of the contact
        - `website` string: Website of the contact
        - `contactFirstName` string: First name of the contactable person
        - `contactLastName` string: Last name of the contactable person
        - `contactNickName` string: Nickname of the contactable person
        - `contactPosition` string: Position of the contactable person
        - `contactPhoneNumber` string: Phone number of the contactable person
        - `contactEmail` string: Email of the contactable person
        - `purchaseAccount` string: If the contact is a seller, PEAK will record the transaction in this account
        - `sellAccount` string: If the contact is a buyer, PEAK will record the transaction in this account
        - `bankAccount` PeakAPIsLibraryModelRequestContactsContactBankAccount
          - `bankId` 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: Numeric code indicating the bank of the contact's bank account
          - `bankBranch` string: Branch of the contact's bank account
          - `bankAccountNo` string: Contact's bank account number
          - `bankAccountName` string: Name of the contact's bank account
        - `id` string: The Unique Identifier will generated by PEAK for referencing the contacts
        - `code` string, required: Code of the contact that will be displayed in PEAK
        - `contactFinanceType` 0 | 1 | 2: The numerical code indicating which side of the business this contact is used on, which controls whether the contact can be selected in revenue documents, expense documents, or both
      - `reference` string: Reference information of the document
      - `remark` string: Additional remarks or notes
      - `taxStatus` 0 | 1 | 2: 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` 0 | 1: 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
      - `status` 'Draft' | 'Approve': Status to create the document with: Draft (save as draft) or Approve (create and approve). If omitted, the document is approved
      - `products` object[], required
        - `id` string: The Unique Identifier of an existing line on the document (used when editing a document)
        - `productTemplate` object, required
          - `id` string: The Unique Identifier generated by PEAK to identify data
          - `name` string, required: Product/Service name
          - `type` 0 | 1 | 2, required: Numeric code indicate whether it is a product or a service
          - `code` string, required: The code displayed in the PEAK
          - `purchaseValue` number, double: Purchase price per unit
          - `purchaseVatType` 1 | 2 | 3: Purchase tax rate
          - `purchaseAccount` string: Account used to record purchase transactions
          - `sellValue` number, double: Selling price per unit
          - `sellVatType` 1 | 2 | 3: Selling tax rate
          - `sellAccount` string: Account used to record selling transactions
          - `description` string: Additional description of the product/service
          - `carryingBalanceValue` number, double: Opening stock cost per unit. Products only; recorded together with carryingBalanceAmount when both are greater than 0
          - `carryingBalanceAmount` number, double: Opening stock quantity. Products only; recorded together with carryingBalanceValue when both are greater than 0
          - `unit` PeakAPIsLibraryModelEcoSystemResponseProductAPIUnitModel
            - `id` string: The Unique Identifier of the unit of measure
            - `code` string: Code of the unit of measure
            - `nameTh` string: Thai name of the unit of measure
            - `nameEn` string: English name of the unit of measure
        - `description` string: Description of the line. Required when isDescription is 1, or when the line has no product/service and no accountCode
        - `accountCode` string: Account code to record this line in. Used when the line is not linked to a product/service
        - `accountSubId` string: The Unique Identifier of the sub account under accountCode. Send accountSubId or accountSubCode, not both
        - `accountSubCode` string: Code of the sub account under accountCode, used as an alternative to accountSubId
        - `quantity` number, double, required: Quantity of the line. Required unless isDescription is 1
        - `price` number, double, required: Price per unit of the line. Required unless isDescription is 1
        - `discount` string: Discount of the line, as an amount (e.g. "100") or a percentage (e.g. "10%"). Must not be negative
        - `vatType` 1 | 2 | 3, required: Numeric code indicating the VAT rate of the line
        - `isDescription` 0 | 1: Numeric code indicating whether this line is a description-only text row
        - `withHoldingTaxAmount` string: Withholding tax of the line, as an amount (e.g. "30") or a percentage of the line net amount (e.g. "3%")
      - `paidPayments` PeakAPIsLibraryModelRequestTransactionSharedAllInOnePaymentsTransactionAllInOne
        - `payments` PeakAPIsLibraryModelRequestTransactionSharedAllInOnePayment[]: The object with payment details
          - `cheque` PeakAPIsLibraryModelRequestTransactionSharedAllInOneCheque
            - `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` 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: The numerical code that indicates a financial institution
            - `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` 0 | 1: The numerical code indicating whether this payment is made by Cheque or not
          - `amount` number, double: Payment amount
          - `paymentMethod` PeakAPIsLibraryModelRequestPaymentMethodsPaymentMethods
            - `id` string: The Unique Identifier generated by PEAK to identify data
            - `code` string: The code displayed in the PEAK
            - `name` string: Payment method name
            - `type` 0 | 1 | 2 | 3 | 4: Numeric code indicating the type of payment method
            - `memo` string: Additional notes or remarks about the product or service
            - `carringBalanceValue` integer: Opening balance of the bank account
            - `bankId` 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: The numerical code that indicates a financial institution (If type is 2, bankId is required)
            - `eWalletId` 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: E-Wallet account number or identifier (If type is 4, accountCode is required)
            - `bankName` string: Name of the bank not available in the system (If type is 0, bankName is required)
            - `accountType` 0 | 1 | 2 | 3: Numeric code indicating the type of bank account
            - `accountNumber` string: Bank account number
            - `isHaveCheque` 0 | 1: Specify that it is a checking account capable of issuing checks from that bank account
            - `accountCode` string: Account to record transactions from the E-Wallet (If type is 4, accountCode is 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: Withholding tax deducted from this payment, as an amount (e.g. "30") or a percentage (e.g. "3%")
        - `transactionId` string: The Unique Identifier of the document for which payment is requested (Required if transactionCode is not provided)
      - `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` 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: Numeric code indicating the currency of the document
        - `exchangeRate` number, double: Exchange rate from the document currency to THB. Required for invoices and receipts
      - `receivedTaxInvoice` PeakAPIsLibraryModelRequestTransactionSharedNormalReceivedTaxInvoiceTransaction
        - `taxInvoiceNumber` string: Number of the tax invoice received from the supplier
        - `taxInvoiceDate` string: Date of the tax invoice received from the supplier (yyyyMMdd)
        - `journalDate` string: Date the received tax invoice is recorded (yyyyMMdd)
        - `periodDate` string: Tax period the received tax invoice is claimed in (yyyyMMdd)
    - `getResult` 0 | 1: Numeric code indicating whether the result data is returned in the response

## Response `200`

Success

- PeakAPIsLibraryModelResponseGoodsReceiptsResponseGoodsReceiptModel
  - `peakGoodsReceipts` PeakAPIsLibraryModelResponseGoodsReceiptsAPIBodyGoodsReceipt
    - `goodsReceipts` PeakAPIsLibraryModelGoodsReceiptsAPIGoodsReceiptModel[]
      - `id` string
      - `code` string
      - `issuedDate` string
      - `contactId` string
      - `status` integer
      - `isAllocation` boolean
      - `referenceName` string
      - `preTaxAmount` number, double
      - `vatAmount` number, double
      - `netAmount` number, double
      - `whtAmount` number, double
      - `referenceTransactionId` string
      - `referenceTransactionType` integer
      - `warehouseId` integer
      - `products` PeakAPIsLibraryModelResponseSharedAPITransactionProducts[]
        - `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
    - `resDesc` string
    - `resCode` string
  - `eventType` string
  - `apiType` string

## Changes

- **2026-11-03** `433c913c750f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/peakaccount/apis/peakapis-core/changes/api/v1/GoodsReceipts/allinone/post.md)

---

[API](https://skmtc.dev/peakaccount/apis/peakapis-core.md) - [All operations](https://skmtc.dev/peakaccount/apis/peakapis-core/llms.txt) - [OpenAPI document](https://skmtc.dev/peakaccount/apis/peakapis-core/revisions/433c913c750f?raw)
