> For the complete documentation index, see [llms.txt](https://kb.logicerp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/accounts/push/save-a-purchase-journal-voucher.md).

# Save a Purchase Journal Voucher

Saves a **purchase journal voucher** – a journal voucher in Logic ERP's **Purchase** day book (`PU - PURCHASE`). Use it to record a supplier's bill that is not entered as a Logic ERP purchase voucher, for example for an expense, a service or a fixed asset: the purchase, expense or fixed-asset account and the GST input tax accounts are debited and the **supplier is credited**. The supplier's line becomes an **outstanding bill** that later payments can be adjusted against. No stock is received. The debits must equal the credits.

The other journal-voucher endpoints: [Save a Journal Voucher](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/accounts/push/save-a-journal-voucher.md), [Save a Sale Journal Voucher](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/accounts/push/save-a-sale-journal-voucher.md), [Save a Sale Return Journal Voucher](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/accounts/push/save-a-sale-return-journal-voucher.md), [Save a Purchase Return Journal Voucher](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/accounts/push/save-a-purchase-return-journal-voucher.md), [Save a Credit Note](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/accounts/push/save-a-credit-note.md), [Save a Debit Note](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/accounts/push/save-a-debit-note.md). Money received or paid in cash or through a bank: [Save a Cash Receipt](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/accounts/push/save-a-cash-receipt.md), [Save a Cash Payment](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/accounts/push/save-a-cash-payment.md), [Save a Bank Receipt](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/accounts/push/save-a-bank-receipt.md), [Save a Bank Payment](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/accounts/push/save-a-bank-payment.md).

### **Endpoint**

| Name          | Detail                                   |
| ------------- | ---------------------------------------- |
| Address       | `https://your-server/api/SaveJVPurchase` |
| Method        | `POST`                                   |
| Authorization | Basic Auth                               |

The response envelope, branches, dates, queueing and the common messages are explained in [How Every API Call Works](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/how-every-api-call-works.md).

### **Request fields**

Field names are not case-sensitive. Codes and names are matched as you send them; capitals do not matter, but do not put spaces in front.

| Field                         | Type   | Required                                       | Default                                                                          | Meaning                                                                                                                                                                                                                                                                                                                                                 |
| ----------------------------- | ------ | ---------------------------------------------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `BranchCode`                  | number | No – but always send it (or `BranchShortName`) | `0`                                                                              | The branch the voucher belongs to, by Logic ERP's branch number (`Branch_Code` in [Get Branch Info](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/masters/pull/get-branch-info.md)). It also decides which settings of your API site are used.                                                          |
| `BranchShortName`             | text   | No                                             | empty                                                                            | The branch by its short name; used only when `BranchCode` is `0` or less (`NIL` means branch `0`). With neither, the request runs for branch `0`, which normally has no settings for this endpoint, so it is refused with the *Configuration not Set* message.                                                                                          |
| `Doc_Date`                    | date   | No                                             | today                                                                            | The voucher date, `yyyy-MM-dd`. It also decides the financial year the voucher is saved in. A value that is not a date is refused.                                                                                                                                                                                                                      |
| `Bill_No`                     | text   | No                                             | the series name, `-` and the voucher's number in the series, for example `JP-57` | The bill or reference number of the voucher, up to 25 characters. It is also the reference of the party lines (see *Bills and adjustment*).                                                                                                                                                                                                             |
| `Bill_Date`                   | date   | No                                             | none                                                                             | The date of that bill, `yyyy-MM-dd`. Saved as the voucher's bill date, used as the due date of every line and written into the default narration. Without it the due date is the voucher date.                                                                                                                                                          |
| `PartyUserCode`               | text   | No                                             | empty                                                                            | A party code (`User_Code` in [Get Party Master](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/masters/pull/get-party-master.md)). When sent, it must match exactly one account or the request is refused – but it is **only checked, not saved**. The voucher's party always comes from `ListAccounts`. |
| `GR_No`                       | text   | No                                             | empty                                                                            | A goods-receipt or transport document number, up to 25 characters.                                                                                                                                                                                                                                                                                      |
| `GR_Date`                     | date   | No                                             | none                                                                             | The date of `GR_No`, `yyyy-MM-dd`. Saved as the voucher's GR date when `GR_No` is sent; a value that is not a date is ignored.                                                                                                                                                                                                                          |
| `Remarks_1`, `Remarks_2`      | text   | No                                             | empty                                                                            | Remarks 1 and 2 of the voucher, up to 30 characters each. Spaces at either end are removed.                                                                                                                                                                                                                                                             |
| `TranspoterName`, `AgentName` | text   | No                                             | –                                                                                | Accepted but ignored.                                                                                                                                                                                                                                                                                                                                   |
| `ListAccounts`                | list   | Yes                                            | empty list                                                                       | The debit and credit lines of the voucher – see below.                                                                                                                                                                                                                                                                                                  |

**`ListAccounts` – one entry per debit or credit line**

| Field                         | Type   | Required                                          | Default                                                            | Meaning                                                                                                                                                                                                                                                                                                                                     |
| ----------------------------- | ------ | ------------------------------------------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `PartyUserCode`               | text   | Yes                                               | –                                                                  | The account of the line, by the account code shown in Logic ERP (for a customer or supplier, `User_Code` in Get Party Master). Any account can be used – customer, supplier, sale, purchase, income, expense, fixed asset, GST tax, cash, bank or any other ledger. The account's type is not checked here, but it decides the rules below. |
| `DebitOrCredit`               | text   | Yes                                               | –                                                                  | `DR` to debit the account, `CR` to credit it. Capitals only: `dr` or `Dr` is refused.                                                                                                                                                                                                                                                       |
| `Amount`                      | number | Yes                                               | `0`                                                                | The amount of the line in rupees, above `0`; the side comes from `DebitOrCredit`. A zero or negative amount is refused.                                                                                                                                                                                                                     |
| `Narration`                   | text   | No                                                | `Bill No.` + your `Bill_No` + `Dated:` + `Bill_Date` as dd/mm/yyyy | The narration of the line, up to 250 characters. The default uses `Bill_No` and `Bill_Date` as you sent them, so with neither it reads `Bill No. Dated:`.                                                                                                                                                                                   |
| `HS_Code`                     | text   | No – unless the configuration makes it compulsory | empty                                                              | The HSN or SAC code of the line, as in Logic ERP's HSN master. When sent it must exist. Saved on the line.                                                                                                                                                                                                                                  |
| `Cost_Center`, `Cost_Element` | text   | No                                                | empty                                                              | A cost centre and a cost element, by name. Send both: the pair must be linked in Logic ERP's cost-centre setup. The line is booked to that cost centre.                                                                                                                                                                                     |
| `Quantity`                    | number | No                                                | `0`                                                                | A quantity, saved on the line for information.                                                                                                                                                                                                                                                                                              |
| `CompanyName`                 | text   | No                                                | empty                                                              | A company from Logic ERP's company master, by name. Checked but not saved – see the known issue below.                                                                                                                                                                                                                                      |
| `Txn_Category`                | text   | No                                                | empty                                                              | A transaction category, by name. Checked but not saved – see the known issue below.                                                                                                                                                                                                                                                         |
| `EmployeeName`                | text   | No                                                | empty                                                              | An employee from Logic ERP's employee master, by name (or by the employee's number). When sent it must exist. Saved on the line.                                                                                                                                                                                                            |

### **Rules Logic ERP applies**

* **What is saved.** A journal voucher in the *Purchase* day book, with one line for each entry of `ListAccounts`; each line is posted to its account's ledger on the side you send.
* **A purchase, expense or fixed-asset account is required.** At least one line must use a purchase, expense or fixed-asset account, or the request is refused.
* **The party is credited.** Customer, supplier, cash and bank lines together may not add up to a debit, or the request is refused.
* **Settings.** Your API site's settings for this endpoint and **for the branch** must name a journal voucher configuration (the list there offers only configurations made for purchase journal vouchers) and a series; without a configuration the request is refused. The configuration decides how the voucher is numbered, whether bill numbers must be unique and whether HSN codes are compulsory. The settings' *Ignore Invalid Item* option has no effect.
* **Accounts.** Each line's `PartyUserCode` is looked up among all of Logic ERP's accounts; a code that is not found stops the request. An account may appear on more than one line. The voucher's party is the account of the first customer, supplier, debtor or creditor line; without one, Logic ERP takes an asset or liability line, or else the only debit or credit line.
* **Debits must equal credits.** The `DR` amounts and the `CR` amounts must add up to exactly the same total, to the paisa, or nothing is saved. Logic ERP adds no rounding or balancing line.
* **GST.** Logic ERP does not work out GST. To record GST, add the GST tax accounts as lines of their own with the tax amounts. Every GST tax account used must have its tax % set in the account master. When the customer, supplier, cash and bank lines do not add up to zero, Logic ERP also checks the tax lines: CGST and SGST lines must come in pairs with equal amounts (in total and for each tax %), CGST/SGST and IGST cannot be mixed, and the tax type must suit the party (CGST/SGST for a party in the branch's state, IGST for another state). Reverse-charge GST accounts are refused in such a voucher, because a voucher sent through the API cannot be marked as reverse charge. Sale and purchase accounts can never be used in the same voucher. GST input-service-distributor (ISD) tax accounts can be used only in a branch set up as an ISD branch, and not together with normal GST tax accounts.
* **HSN codes.** When the JV configuration makes HSN codes compulsory, every line except customer and supplier lines – the GST tax lines too – needs an `HS_Code`.
* **TDS.** No TDS is deducted, even when an account is linked to a TDS type in Logic ERP. If you need TDS, send it as lines of its own.
* **Bills and adjustment.** Each **credited** line of a customer, supplier, debtor, creditor or cash account is recorded as a bill of that account – an amount owed to the party – with `Bill_No` as its bill number and `Bill_Date` (or the voucher date) as its due date. Later payments can be adjusted against it in Logic ERP. Logic ERP does **no bill-wise adjustment** on this endpoint: the voucher is not set off against any existing bill, receipt or payment. Make the adjustment in Logic ERP afterwards. No items or stock are involved.
* **Numbering.** The voucher gets the next number of the series in the branch and financial year, so numbering starts again each year. If that number has more digits than the series' bill-number length allows, the request is refused. Logic ERP also gives the voucher its voucher number, built as the configuration says: by default `JV`, the voucher date (`yyyyMMdd`) and a running number for that day in the branch, for example `JV202611053` for the third voucher of 5 November 2026 (the running number is not padded with zeros); when the configuration sets its own voucher numbering, `JV`, the voucher prefix, the date part the configuration chooses (for example the year and month) and a running number, for example `JVJP-2611-27`. When the series has a description or a financial-year setting, a printed voucher number is formed too, for example `26-27/JP-57`.
* **Date and financial year.** `Doc_Date` decides the financial year; a date no financial year covers is refused (see How Every API Call Works). The request is also refused when the date is after today and the Logic ERP user linked to your API site may not make post-dated journal entries, when the date is on or before that user's lock date, or when that user's back-date lock schedule locks the period.
* **Duplicates.** A `Bill_No` already used on a purchase journal voucher of the same party in the branch and financial year is always refused with *This bill already exists for this party...*; when you send no `Bill_No`, the default bill number is new, so nothing is stopped. If the JV configuration asks for unique bill numbers, a `Bill_No` already used by another voucher of the same day book in the branch and financial year is refused (*another document*); if it asks for unique bill numbers per party, a `Bill_No` already used for the same party is refused (*another supplier*). Apart from that, every request that succeeds saves a new voucher. Check `Status` before you resend.
* **All or nothing.** The voucher and all its lines are saved together. If anything fails, nothing is saved.
* **Switching off.** Your support team can switch this endpoint off **per branch**. Then nothing is saved and the answer has `Status: true` with the *In-Active* sentence in `Message` (as explained in How Every API Call Works).
* Your Logic ERP licence must include the API for journal purchase vouchers.

> **Known issue – `CompanyName` and `Txn_Category` are checked but not saved.** A name that does not exist is refused, but a valid one is not stored on the line. Leave them empty unless you only want the check.

> **Known issue – an apostrophe in `Bill_No` can stop the request.** When the JV configuration asks for unique bill numbers, an apostrophe (`'`) in `Bill_No` makes the request fail with a technical error. Do not use apostrophes in `Bill_No`.

### **Example request**

```json
{
  "BranchCode": 2,
  "BranchShortName": "",
  "Doc_Date": "2026-11-07",
  "Bill_No": "SFI/26-27/1184",
  "Bill_Date": "2026-11-04",
  "PartyUserCode": "",
  "GR_No": "",
  "GR_Date": "",
  "TranspoterName": "",
  "AgentName": "",
  "Remarks_1": "Display racks",
  "Remarks_2": "",
  "ListAccounts": [
    { "PartyUserCode": "FA-FIXTURES", "Amount": 20000.00, "DebitOrCredit": "DR", "Narration": "Display racks for MG Road store", "CompanyName": "", "HS_Code": "9403", "EmployeeName": "", "Cost_Center": "MG ROAD", "Cost_Element": "FIXTURES", "Quantity": 0, "Txn_Category": "" },
    { "PartyUserCode": "CGST-IN9", "Amount": 1800.00, "DebitOrCredit": "DR", "Narration": "", "CompanyName": "", "HS_Code": "9403", "EmployeeName": "", "Cost_Center": "", "Cost_Element": "", "Quantity": 0, "Txn_Category": "" },
    { "PartyUserCode": "SGST-IN9", "Amount": 1800.00, "DebitOrCredit": "DR", "Narration": "", "CompanyName": "", "HS_Code": "9403", "EmployeeName": "", "Cost_Center": "", "Cost_Element": "", "Quantity": 0, "Txn_Category": "" },
    { "PartyUserCode": "S2031", "Amount": 23600.00, "DebitOrCredit": "CR", "Narration": "Bill SFI/26-27/1184 dated 04/11/2026", "CompanyName": "", "HS_Code": "", "EmployeeName": "", "Cost_Center": "", "Cost_Element": "", "Quantity": 0, "Txn_Category": "" }
  ]
}
```

### **Test it**

Send a request to the Logic ERP **sandbox** (a test company) from this page: open the block below, enter the sandbox user name and password (ask your Logic ERP support team), change the request if you like, and press **Test it**. This really saves in the sandbox: each send saves a new purchase journal voucher of ₹7.00 that credits the test party `APITESTS01` and debits the expense account `290`. Change `Bill_No` each time (for example `APITEST-JV-7`), set `Doc_Date` and `Bill_Date` to today's date, and keep the small amounts and the "API TEST" values. Keep the `HS_Code` on the second line: the sandbox asks for an HSN code on this kind of voucher.

## Save a Purchase Journal Voucher

> Saves a purchase journal voucher – a journal voucher in Logic ERP's Purchase day book (\`PU - PURCHASE\`). Use it to record a supplier's bill that is not entered as a Logic ERP purchase voucher, for example for an expense, a service or a fixed asset: the purchase, expense or fixed-asset account and the GST input tax accounts are debited and the supplier is credited. The supplier's line becomes an outstanding bill that later payments can be adjusted against. No stock is received. The debits must equal the credits.

```json
{"openapi":"3.0.3","info":{"title":"Logic ERP API","version":"1.0"},"tags":[{"name":"Accounts - Push"}],"servers":[{"url":"https://demo.logicerp.com/api","description":"Logic ERP sandbox (test company)"}],"security":[{"basicAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic","description":"The user name and password of your API site."}}},"paths":{"/SaveJVPurchase":{"post":{"tags":["Accounts - Push"],"operationId":"SaveJVPurchase","summary":"Save a Purchase Journal Voucher","description":"Saves a purchase journal voucher – a journal voucher in Logic ERP's Purchase day book (`PU - PURCHASE`). Use it to record a supplier's bill that is not entered as a Logic ERP purchase voucher, for example for an expense, a service or a fixed asset: the purchase, expense or fixed-asset account and the GST input tax accounts are debited and the supplier is credited. The supplier's line becomes an outstanding bill that later payments can be adjusted against. No stock is received. The debits must equal the credits.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"BranchCode":{"type":"integer","description":"The branch the voucher belongs to, by Logic ERP's branch number (`Branch_Code` in Get Branch Info). It also decides which settings of your API site are used."},"BranchShortName":{"type":"string","description":"The branch by its short name; used only when `BranchCode` is `0` or less (`NIL` means branch `0`). With neither, the request runs for branch `0`, which normally has no settings for this endpoint, so it is refused with the Configuration not Set message."},"Doc_Date":{"type":"string","description":"The voucher date, `yyyy-MM-dd`. It also decides the financial year the voucher is saved in. A value that is not a date is refused."},"Bill_No":{"type":"string","description":"The bill or reference number of the voucher, up to 25 characters. It is also the reference of the party lines (see Bills and adjustment)."},"Bill_Date":{"type":"string","description":"The date of that bill, `yyyy-MM-dd`. Saved as the voucher's bill date, used as the due date of every line and written into the default narration. Without it the due date is the voucher date."},"PartyUserCode":{"type":"string","description":"A party code (`User_Code` in Get Party Master). When sent, it must match exactly one account or the request is refused – but it is only checked, not saved. The voucher's party always comes from `ListAccounts`."},"GR_No":{"type":"string","description":"A goods-receipt or transport document number, up to 25 characters."},"GR_Date":{"type":"string","description":"The date of `GR_No`, `yyyy-MM-dd`. Saved as the voucher's GR date when `GR_No` is sent; a value that is not a date is ignored."},"TranspoterName":{"type":"string","description":"Accepted but ignored."},"AgentName":{"type":"string","description":"Accepted but ignored."},"Remarks_1":{"type":"string","description":"Remarks 1 and 2 of the voucher, up to 30 characters each. Spaces at either end are removed."},"Remarks_2":{"type":"string","description":"Remarks 1 and 2 of the voucher, up to 30 characters each. Spaces at either end are removed."},"ListAccounts":{"type":"array","items":{"type":"object","properties":{"PartyUserCode":{"type":"string","description":"The account of the line, by the account code shown in Logic ERP (for a customer or supplier, `User_Code` in Get Party Master). Any account can be used – customer, supplier, sale, purchase, income, expense, fixed asset, GST tax, cash, bank or any other ledger. The account's type is not checked here, but it decides the rules below."},"Amount":{"type":"number","description":"The amount of the line in rupees, above `0`; the side comes from `DebitOrCredit`. A zero or negative amount is refused."},"DebitOrCredit":{"type":"string","description":"`DR` to debit the account, `CR` to credit it. Capitals only: `dr` or `Dr` is refused."},"Narration":{"type":"string","description":"The narration of the line, up to 250 characters. The default uses `Bill_No` and `Bill_Date` as you sent them, so with neither it reads ` Bill No. Dated: `."},"CompanyName":{"type":"string","description":"A company from Logic ERP's company master, by name. Checked but not saved – see the known issue below."},"HS_Code":{"type":"string","description":"The HSN or SAC code of the line, as in Logic ERP's HSN master. When sent it must exist. Saved on the line."},"EmployeeName":{"type":"string","description":"An employee from Logic ERP's employee master, by name (or by the employee's number). When sent it must exist. Saved on the line."},"Cost_Center":{"type":"string","description":"A cost centre and a cost element, by name. Send both: the pair must be linked in Logic ERP's cost-centre setup. The line is booked to that cost centre."},"Cost_Element":{"type":"string","description":"A cost centre and a cost element, by name. Send both: the pair must be linked in Logic ERP's cost-centre setup. The line is booked to that cost centre."},"Quantity":{"type":"integer","description":"A quantity, saved on the line for information."},"Txn_Category":{"type":"string","description":"A transaction category, by name. Checked but not saved – see the known issue below."}},"required":["PartyUserCode","DebitOrCredit","Amount"]},"description":"The debit and credit lines of the voucher – see below."}},"required":["ListAccounts"]}}}},"responses":{"200":{"description":"Always HTTP 200. Check Status and Message.","content":{"application/json":{"schema":{"type":"object","properties":{"LastSavedDocNo":{"type":"string","description":"The voucher number, the day-book code (`PU`) and the voucher's number in the series, joined by `-`, for example `JVJP-2611-27-PU-57`. `null` when not saved."},"LastSavedVouchNo":{"type":"string","description":"The printed voucher number formed from the series settings, for example `26-27/JP-57`; empty when the series forms none. `null` when not saved."},"LastSavedBillNo":{"type":"string","description":"The bill number saved on the voucher – your `Bill_No`, or the default one. `null` when not saved."},"ErrorCode":{"type":"string","description":"A number for some refusals (shown in the table below, for example `220003`); otherwise empty."},"Status":{"type":"boolean","description":"`true` when the voucher was saved."},"Message":{"type":"string","description":"`Success` when saved; otherwise the reason."},"LastSavedCode":{"type":"integer","description":"Logic ERP's internal number of the new voucher; `0` when not saved."},"request_ID":{"type":"string","description":"The ID of this request – quote it to support. `null` when the endpoint is switched off for the branch (the In-Active answer); empty when the request is refused before it reaches this endpoint (see below)."}}}}}},"401":{"description":"No login was sent."}}}}}}
```

### **Response**

| Field              | Type         | Meaning                                                                                                                                                                                                        |
| ------------------ | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Status`           | true / false | `true` when the voucher was saved.                                                                                                                                                                             |
| `Message`          | text         | `Success` when saved; otherwise the reason.                                                                                                                                                                    |
| `ErrorCode`        | text         | A number for some refusals (shown in the table below, for example `220003`); otherwise empty.                                                                                                                  |
| `LastSavedCode`    | number       | Logic ERP's internal number of the new voucher; `0` when not saved.                                                                                                                                            |
| `LastSavedDocNo`   | text         | The voucher number, the day-book code (`PU`) and the voucher's number in the series, joined by `-`, for example `JVJP-2611-27-PU-57`. `null` when not saved.                                                   |
| `LastSavedVouchNo` | text         | The printed voucher number formed from the series settings, for example `26-27/JP-57`; empty when the series forms none. `null` when not saved.                                                                |
| `LastSavedBillNo`  | text         | The bill number saved on the voucher – your `Bill_No`, or the default one. `null` when not saved.                                                                                                              |
| `request_ID`       | text         | The ID of this request – quote it to support. `null` when the endpoint is switched off for the branch (the *In-Active* answer); empty when the request is refused before it reaches this endpoint (see below). |

When a request is refused before it reaches this endpoint (for example an unknown `BranchShortName`, or a `Doc_Date` no financial year covers), the answer has only `Status`, `Message`, `LastSavedCode` and `request_ID`.

### **Example response**

```json
{
  "LastSavedDocNo": "JVJP-2611-27-PU-57",
  "LastSavedVouchNo": "",
  "LastSavedBillNo": "SFI/26-27/1184",
  "ErrorCode": "",
  "Status": true,
  "Message": "Success",
  "LastSavedCode": 15338,
  "request_ID": "8a2d6e40-3f1c-4b7a-9e58-c6d1b2a7f094"
}
```

### **Messages you may see**

The reason may be followed by technical detail – read the first line.

| Message                                                                                                                   | Meaning                                                                                                                                                                          | What to do                                                                                               |
| ------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `Journal Voucher - Configuration not Set in API Template for Branch Code: …`                                              | Your API site's settings for this endpoint name no journal voucher configuration for this branch (the branch number is shown).                                                   | Ask your Logic ERP team to choose the configuration and series for the branch, or send the right branch. |
| `Invalid header Party User Code... :…`                                                                                    | The header `PartyUserCode` is not found.                                                                                                                                         | Send an existing party code, or leave it empty – it is not saved anyway.                                 |
| `Invalid Doc_Date : …`                                                                                                    | `Doc_Date` is not empty and not a date.                                                                                                                                          | Send `yyyy-MM-dd`, or leave it out for today.                                                            |
| `Post Dated enteries are not allowed.......`                                                                              | `Doc_Date` is after today and the API site's Logic ERP user may not make post-dated journal entries.                                                                             | Send today's date or an earlier one.                                                                     |
| `Entry/Modification is locked for this period....`                                                                        | The back-date lock schedule of the API site's Logic ERP user locks `Doc_Date`.                                                                                                   | Send a later date or ask your Logic ERP team.                                                            |
| `Modification rights not available for this date.....`                                                                    | `Doc_Date` is on or before the lock date of the API site's Logic ERP user.                                                                                                       | Send a later date or ask your Logic ERP team.                                                            |
| `Invalid Accounts Details PartyUserCode.. :` (followed by a space, nothing else)                                          | A line has an empty `PartyUserCode`. `ErrorCode` `220002`.                                                                                                                       | Send the account code on every line.                                                                     |
| `Unable to found PartyUserCode : …`                                                                                       | No account has the code of a line. `ErrorCode` `220003`.                                                                                                                         | Send the code exactly as in Logic ERP.                                                                   |
| `ListAccounts is required`                                                                                                | `ListAccounts` is empty or `null`.                                                                                                                                               | Send at least one line.                                                                                  |
| `Debit/Credit not defined...`                                                                                             | A line's `DebitOrCredit` is not `DR` or `CR` in capitals.                                                                                                                        | Send `DR` or `CR`.                                                                                       |
| `Invalid Amount against PartyUserCode : …`                                                                                | A line has `Amount` `0` or less (the code shown is that line's `PartyUserCode`).                                                                                                 | Send an amount above `0`.                                                                                |
| `Unable to found TXN Category : …`                                                                                        | `Txn_Category` is not found. `ErrorCode` `220004`.                                                                                                                               | Send an existing name or leave it empty.                                                                 |
| `Unable to found HS_Code : …`                                                                                             | `HS_Code` is not in the HSN master. `ErrorCode` `220005`.                                                                                                                        | Send an existing HSN / SAC code.                                                                         |
| `HSN Code is mandatory.....`                                                                                              | The JV configuration makes HSN codes compulsory and a line other than a customer or supplier line has no `HS_Code`. `ErrorCode` `220006`.                                        | Send `HS_Code` on every such line.                                                                       |
| `Unable to found Company Name : …`                                                                                        | `CompanyName` is not found. `ErrorCode` `220007`.                                                                                                                                | Send an existing name or leave it empty.                                                                 |
| `Unable to found Employee Name : …`                                                                                       | No employee has that name (or number). `ErrorCode` `220008`.                                                                                                                     | Send the name exactly as in Logic ERP, or leave `EmployeeName` empty.                                    |
| `Unable to found Cost_Center : … Or Cost_Element :…`                                                                      | The cost centre and cost element are not found as a linked pair (also when only one of them is sent). `ErrorCode` `220009`.                                                      | Send both names exactly as in Logic ERP, or neither.                                                     |
| `This bill already exists for this party...`                                                                              | A purchase journal voucher with this `Bill_No` already exists for the party in this branch and financial year.                                                                   | Check whether the bill was sent before; otherwise send another `Bill_No`.                                |
| `This Bill No. already exists for another document....`                                                                   | The JV configuration asks for unique bill numbers and `Bill_No` is already used in this day book.                                                                                | Send another `Bill_No`.                                                                                  |
| `This Bill No. already exists for another supplier....`                                                                   | The JV configuration asks for unique bill numbers per party and `Bill_No` is already used for this party.                                                                        | Send another `Bill_No`.                                                                                  |
| `Debit/Credits are not equal`                                                                                             | The `DR` total and the `CR` total differ.                                                                                                                                        | Make the totals equal.                                                                                   |
| `No Purchase/Fixed Asset/Expense A/c Exist in this Voucher....... Please Check.`                                          | No line uses a purchase, expense or fixed-asset account.                                                                                                                         | Add that line.                                                                                           |
| `Party Account cannot be Debited in case of Purchase`                                                                     | Customer, supplier, cash and bank lines add up to a debit.                                                                                                                       | Credit the party.                                                                                        |
| `Tax(%) for account … not defined in masters. Define Tax(%) in accounts master.`                                          | A GST tax account used has no tax %.                                                                                                                                             | Ask your Logic ERP team to set it, or use another account.                                               |
| `Both Sale and Purchase accounts cannot be used in the same document.`                                                    | The voucher has a sale and a purchase account.                                                                                                                                   | Split it into separate vouchers.                                                                         |
| `CGST/SGST and IGST cannot be allowed in the same document.`                                                              | CGST/SGST and IGST lines are mixed.                                                                                                                                              | Use one kind of tax only.                                                                                |
| `CGST and SGST accounts do not match.` or `CGST and SGST amounts do not match.`                                           | The CGST and SGST lines are not in pairs, or their totals differ.                                                                                                                | Send a CGST line and an SGST line of the same amount.                                                    |
| `CGST and SGST amounts of Tax(%) … accounts do not match.`                                                                | For one tax %, the CGST and SGST totals differ.                                                                                                                                  | Make them equal for each tax %.                                                                          |
| `Party GST Type and Document GST Type does not match,Please check.`                                                       | CGST/SGST was used for a party in another state, or IGST for a party in the branch's state.                                                                                      | Use the tax type that suits the party.                                                                   |
| `This branch is not configured as an ISD branch. ISD-GST document creation is not allowed.`, or another message about ISD | An input-service-distributor (ISD) GST tax account is used in a branch that is not an ISD branch, or together with normal GST accounts, or its CGST and SGST lines do not match. | Leave ISD tax accounts out, or ask your Logic ERP team.                                                  |
| `Reverse charge accounts exist in this document but Reverse Charge not selected for this document.`                       | A reverse-charge GST account is used; the API cannot mark the voucher as reverse charge.                                                                                         | Leave reverse-charge accounts out, or enter the voucher in Logic ERP.                                    |
| `Bill No Length Is greater than length defined in bill series settings` (followed by a space)                             | The voucher's number in the series has more digits than the series allows.                                                                                                       | Ask your Logic ERP team to check the series.                                                             |
| `"Status": false` with `The operation was canceled.`                                                                      | Saving stopped inside Logic ERP without a reason. Nothing was saved.                                                                                                             | Retry once; if it repeats, send the `request_ID` to support.                                             |
| Another technical error                                                                                                   | Saving failed inside Logic ERP; nothing was saved.                                                                                                                               | Retry once; if it repeats, send the `request_ID` to support.                                             |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/accounts/push/save-a-purchase-journal-voucher.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
