PO Change Order — Add Lines
Overview
Adds one or more summary lines to an existing change order. The change order key, line number,
sequence value, and unique identifier are all assigned automatically — if the caller supplies
any of them the whole request is rejected before anything is added.
Notes
The change order identified by
coNumber/companyCode/poNumber/releaseNumbermust
already exist — this endpoint never creates a header.The starting line number is fetched once via the existing database procedure
da.dbk_po_comst.get_new_summary_line_numand incremented in Java for subsequent lines in
the same batch. Pending inserts are not visible to the database until posted, so calling the
procedure again inside the same transaction would keep returning the same number — no
numbering logic is reimplemented.The whole batch commits in a single transaction and is rolled back entirely if any line
fails.Each inserted line's virtual UUID (
pocsVUuid) is generated on the Java side via
sys_guid()(Utility.generateVuuid).The response is read back directly from
PO_COSUMMARY_API_Vafter commit, not from the
in-memory rows.
UI Navigation
Asset Management → Purchase Order → Change Orders → Enter Change Order
Finders
Not applicable — this is a create operation scoped to a single change order.
HTTP Method & Endpoint
POST {base_url}/po-rest-api/jersey/v1/po-change-order/{coNumber}/lines
Content-Type: application/json
Path Parameters
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| coNumber | String | True | — | Change order number the lines are added to |
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| companyCode | String | True | — | Company code of the change order |
| poNumber | String | True | — | Parent PO number of the change order |
| releaseNumber | String | True | — | Release number of the change order. Must parse as an integer |
Example Request
curl -X POST "{base_url}/po-rest-api/jersey/v1/po-change-order/2/lines?companyCode=ALT&poNumber=PO000004&releaseNumber=1" \
-H "Authorization: Basic {credentials}" \
-H "Content-Type: application/json" \
-d '{
"lines": [
{
"pocsItmCode": "PAPER-A4",
"pocsDesc": "Additional paper order",
"pocsOrdQty": 50,
"pocsExptdPriceAmt": 12.50
}
]
}'
Example Response (201 Created)
{
"lines": [
{
"pocsVUuid": "57583E9AF08C542CE0630B811DACCB66",
"pocsCompCode": "ALT",
"pocsPoNum": "PO000004",
"pocsNum": "2",
"pocsReleaseNum": 1,
"pocsLineNum": 3,
"pocsItmCode": "PAPER-A4"
}
]
}
Attributes
Request body — lines[] items
Any of the following line fields may be supplied except those marked as restricted below,
which are always rejected on this endpoint if present, before any row is inserted:
| Name | Object | Description | Type | Data Length | Example | Mandatory |
|---|---|---|---|---|---|---|
| pocsVUuid | line | Virtual UUID, unique row identifier | String | 64 | — | Restricted (see table below) |
| pocsCompCode | line | Company code | String | 8 | ALT | Restricted (see table below) |
| pocsPoNum | line | Parent PO number | String | 11 | PO000004 | Restricted (see table below) |
| pocsNum | line | Change order number | String | 11 | 1 | Restricted (see table below) |
| pocsReleaseNum | line | Release number | Number(11) | 11 | 1 | Restricted (see table below) |
| pocsLineNum | line | Summary line number | Number(6) | 6 | 1 | Restricted (see table below) |
| pocsOraseq | line | Internal sequence number | Number | — | — | Restricted (see table below) |
| pocsCiitemtypCode | line | item type code | String | 2 | MA | False |
| pocsClassCode | line | Item class code | String | 4 | OFF1 | False |
| pocsDesc | line | Line description | String | 4000 | Revised paper order | False |
| pocsDiscountPct | line | Discount percentage | Number | — | 2.500 | False |
| pocsExptdPriceAmt | line | Expected unit price | Number | — | 12.5000 | False |
| pocsItemLocCode | line | Item location code | String | 7 | ILOC01 | False |
| pocsItmCode | line | Item/product code | String | 16 | PAPER-A4 | False |
| pocsOrdQty | line | Quantity ordered | Number | — | 100.0000 | False |
| pocsOvrdExptdPriceFlag | line | Override expected price flag (Y/N) | String | 1 | Y | False |
| pocsPoItemType | line | PO item type (I=Inventory, N=Non-stock, F=Free-form) | String | 1 | N | False |
| pocsRecIntoInvFlag | line | Receive into inventory flag (Y/N) | String | 1 | Y | False |
| pocsTax1Code / Tax2Code / Tax3Code | line | Tax codes 1-3 | String | 11 each | HST | False |
| pocsTax1TaxableFlag / Tax2.../Tax3... | line | Taxable flags for tax 1-3 (Y/N) | String | 1 each | Y | False |
| pocsUserField1..8 | line | User-defined fields 1-8 | String | 60 each | — | False |
| pocsUserTypeCode | line | User-defined type code | String | 3 | STD | False |
| pocsWmCode | line | Unit of measure code | String | 2 | BX | False |
| pocsTavCode1..4 | line | TAV codes 1-4 | String | 10 each | TAV01 | False |
| pocsWbsvCode1..12 | line | WBS value codes 1-12 | String | 60 each | — | False |
| Restricted field | Reason |
|---|---|
| pocsCompCode | Assigned from the companyCode query parameter |
| pocsPoNum | Assigned from the poNumber query parameter |
| pocsNum | Assigned from the coNumber path parameter |
| pocsReleaseNum | Assigned from the releaseNumber query parameter |
| pocsLineNum | Generated via get_new_summary_line_num |
| pocsOraseq | Generated via OraseqGenerator |
| pocsVUuid | Generated via sys_guid() |
Every other Line attribute is accepted as-supplied and copied verbatim onto the new row.
Response body — lines[] items
| Name | Object | Description | Type | Data Length | Example | Mandatory |
|---|---|---|---|---|---|---|
| pocsVUuid | line | Virtual UUID, unique row identifier | String | 64 | 57583E9AF08B542CE0630B811DACCB66 | System Generated |
| pocsCompCode | line | Company code | String | 8 | ALT | Key |
| pocsPoNum | line | Parent PO number | String | 11 | PO000004 | Key |
| pocsNum | line | Change order number | String | 11 | 1 | Key |
| pocsReleaseNum | line | Release number | Number(11) | 11 | 1 | Key |
| pocsLineNum | line | Summary line number | Number(6) | 6 | 1 | Key |
| pocsCiitemtypCode | line | Construction item type code | String | 2 | MA | False |
| pocsClassCode | line | Item class code | String | 4 | OFF1 | False |
| pocsDesc | line | Line description | String | 4000 | Revised paper order | False |
| pocsDiscountPct | line | Discount percentage | Number | — | 2.500 | False |
| pocsExptdPriceAmt | line | Expected unit price | Number | — | 12.5000 | False |
| pocsExtdAmt | line | Extended amount (calculated) | Number | — | 1250.00 | System Generated |
| pocsItemLocCode | line | Item location code | String | 7 | ILOC01 | False |
| pocsItmCode | line | Item/product code | String | 16 | PAPER-A4 | False |
| pocsItmName | line | Item/product name (lookup) | String | 4000 | A4 Copy Paper | System Generated |
| pocsJobName | line | Job name (lookup) | String | 60 | Office Renovation | System Generated |
| pocsPhsName | line | Phase name (lookup) | String | 50 | Phase 1 | System Generated |
| pocsCatName | line | Category name (lookup) | String | 30 | Supplies | System Generated |
| pocsLumpSumPoFlag | line | Lump-sum PO flag (Y/N, calculated) | String | 1 | N | System Generated |
| pocsOrdQty | line | Quantity ordered | Number | — | 100.0000 | False |
| pocsOvrdExptdPriceFlag | line | Override expected price flag (Y/N) | String | 1 | Y | False |
| pocsPoItemType | line | PO item type (I=Inventory, N=Non-stock, F=Free-form) | String | 1 | N | False |
| pocsPoOrdQty | line | PO ordered quantity (calculated) | Number | — | 80.0000 | System Generated |
| pocsPoOrderedQty | line | PO ordered quantity, alt calculation (calculated) | Number | — | 80.0000 | System Generated |
| pocsPoPriceAmt | line | PO price amount (calculated) | Number | — | 12.5000 | System Generated |
| pocsPobldLineNum | line | Source PO build line number (calculated) | Number(6) | 6 | 1 | System Generated |
| pocsRecIntoInvFlag | line | Receive into inventory flag (Y/N) | String | 1 | Y | False |
| pocsSuggestedPrice | line | Suggested price (calculated) | Number | — | 12.5000 | System Generated |
| pocsTax1Code / Tax2Code / Tax3Code | line | Tax codes 1-3 | String | 11 each | HST | False |
| pocsTax1TaxableFlag / Tax2.../Tax3... | line | Taxable flags for tax 1-3 (Y/N) | String | 1 each | Y | False |
| pocsTaxAmt | line | Tax amount (calculated) | Number | — | 150.00 | System Generated |
| pocsTotAmt | line | Total amount (calculated) | Number | — | 1400.00 | System Generated |
| pocsUserField1..8 | line | User-defined fields 1-8 | String | 60 each | — | False |
| pocsUserTypeCode | line | User-defined type code | String | 3 | STD | False |
| pocsWmCode | line | Unit of measure code | String | 2 | BX | False |
| pocsTavCode1..4 | line | TAV codes 1-4 | String | 10 each | TAV01 | False |
| pocsWbsvCode1..8 | line | WBS value codes 1-8 (always disabled in CMiC UI) | String | 60 each | — | System Generated |
| pocsWbsvCode9..12 | line | WBS value codes 9-12 | String | 60 each | — | False |
| pocsIuCreateDate | line | Record creation timestamp (ISO-8601) | Timestamp | — | 2026-08-20T10:15:00-04:00 | System Generated |
| pocsIuUpdateDate | line | Record last update timestamp (ISO-8601) | Timestamp | — | 2026-08-21T09:00:00-04:00 | System Generated |
Error Codes
| HTTP | Error Code | Reason |
|---|---|---|
| 400 | PO-000276-ERR | coNumber path parameter is required |
| 400 | PO-000273-ERR | companyCode is required |
| 400 | PO-000274-ERR | poNumber is required |
| 400 | PO-000272-ERR | Request body is required |
| 400 | PO-000275-ERR | releaseNumber is required |
| 400 | PO-000271-ERR | releaseNumber is not a valid integer |
| 404 | PO-000221-ERR | No change order found for coNumber/companyCode/poNumber/releaseNumber |
| 400 | PO-000266-ERR | lines array with at least one line is required in the request payload |
| 400 | PO-000223-ERR | A restricted/system field (see table above) was supplied on a line |
| 400 | PO-000277-ERR | No valid lines were provided to insert |
| 500 | (unhandled exception) | Any other unexpected error; the transaction is rolled back |
Basic authentication
Created
"{\n \"lines\": [\n {\n \"pocsVUuid\": \"58CEEE8CCAE1650DE0630B811DAC89C2\",\n \"pocsCompCode\": \"ZZ\",\n \"pocsPoNum\": \"FM2\",\n \"pocsNum\": \"2\",\n \"pocsReleaseNum\": 1,\n \"pocsLineNum\": 2,\n \"pocsOraseq\": 2653866316,\n \"pocsCalledFromAppCode\": \"PO\",\n \"pocsCiitemtypCode\": null,\n \"pocsClassCode\": null,\n \"pocsDesc\": null,\n \"pocsDiscountPct\": 0,\n \"pocsExptdPriceAmt\": 78000,\n \"pocsExtdAmt\": 936000,\n \"pocsItemLocCode\": null,\n \"pocsItmCode\": \"WA\",\n \"pocsItmName\": \"Test A\",\n \"pocsJobName\": null,\n \"pocsPhsName\": null,\n \"pocsCatName\": null,\n \"pocsLumpSumPoFlag\": null,\n \"pocsMinOrderQty\": null,\n \"pocsOnHandQty\": null,\n \"pocsOnOrderQty\": null,\n \"pocsOnReserveQty\": null,\n \"pocsOrdQty\": 12,\n \"pocsOvrdExptdPriceFlag\": \"N\",\n \"pocsPoItemType\": \"N\",\n \"pocsPoOrdQty\": null,\n \"pocsPoOrderedQty\": null,\n \"pocsPoPriceAmt\": null,\n \"pocsPobldLineNum\": null,\n \"pocsRecIntoInvFlag\": \"N\",\n \"pocsSuggestedPrice\": null,\n \"pocsTacSetupFlag\": \"Y\",\n \"pocsTax1Code\": null,\n \"pocsTax1OnTaxFlag\": null,\n \"pocsTax1Perc\": null,\n \"pocsTax1TaxableFlag\": \"Y\",\n \"pocsTax2Code\": null,\n \"pocsTax2OnTaxFlag\": null,\n \"pocsTax2Perc\": null,\n \"pocsTax2TaxableFlag\": \"Y\",\n \"pocsTax3Code\": null,\n \"pocsTax3OnTaxFlag\": null,\n \"pocsTax3Perc\": null,\n \"pocsTax3TaxableFlag\": \"Y\",\n \"pocsTaxAmt\": 0,\n \"pocsTotAmt\": 936000,\n \"pocsUserField1\": \"ZZ\",\n \"pocsUserField2\": \"00\",\n \"pocsUserField3\": \"1000.100\",\n \"pocsUserField4\": null,\n \"pocsUserField5\": null,\n \"pocsUserField6\": null,\n \"pocsUserField7\": null,\n \"pocsUserField8\": null,\n \"pocsUserFieldEdtFlag5\": \"Y\",\n \"pocsUserFieldEdtFlag6\": \"Y\",\n \"pocsUserFieldEdtFlag7\": \"Y\",\n \"pocsUserFieldEdtFlag8\": \"Y\",\n \"pocsUserFieldName5\": \"TAC Value Not On File\",\n \"pocsUserFieldName6\": \"TAC Value Not On File\",\n \"pocsUserFieldName7\": null,\n \"pocsUserFieldName8\": \"TAC Value Not On File\",\n \"pocsUserTypeCode\": \"G\",\n \"pocsWbsSetupFlag\": \"N\",\n \"pocsWmCode\": \"G\",\n \"pocsTavCode1\": null,\n \"pocsTavCode2\": null,\n \"pocsTavCode3\": null,\n \"pocsTavCode4\": null,\n \"pocsWbsvCode1\": null,\n \"pocsWbsvCode2\": null,\n \"pocsWbsvCode3\": null,\n \"pocsWbsvCode4\": null,\n \"pocsWbsvCode5\": null,\n \"pocsWbsvCode6\": null,\n \"pocsWbsvCode7\": null,\n \"pocsWbsvCode8\": null,\n \"pocsWbsvCode9\": null,\n \"pocsWbsvCode10\": null,\n \"pocsWbsvCode11\": null,\n \"pocsWbsvCode12\": null\n }\n ]\n}"