Purchase Order

Get A Resource By ID

HTTP Request

GET /api/v1/purchase-order/{id}

📋 Description: Returns the single resource with the given ID.

Parameters

Name

In

Type

Required

Description

id

path

integer(int64)

true

Resource ID

Responses

Status

Meaning

Description

Schema

200

OK

OK

ResponsePurchaseOrderDto

409

Conflict

Payment amount exceeds remaining invoice balance

InvoicePaymentBalanceConflictDto

502

Bad Gateway

Downstream service call failed

PayableErrorDto

Update A Resource

HTTP Request

PUT /api/v1/purchase-order/{id}

📋 Description: Fully replaces the resource with the given ID. All fields in the request body are applied.

Parameters

Name

In

Type

Required

Description

id

path

integer(int64)

true

Resource ID

body

body

PurchaseOrderDto

true

Request body containing the updated purchase order details, including item specifications, quantities, and pricing information.

Responses

Status

Meaning

Description

Schema

200

OK

OK

ResponsePurchaseOrderDto

409

Conflict

Payment amount exceeds remaining invoice balance

InvoicePaymentBalanceConflictDto

502

Bad Gateway

Downstream service call failed

PayableErrorDto

Delete A Single Resource

HTTP Request

DELETE /api/v1/purchase-order/{id}

📋 Description: Permanently deletes the resource with the given ID.

Parameters

Name

In

Type

Required

Description

id

path

integer(int64)

true

Unique identifier for the resource

Responses

Status

Meaning

Description

Schema

200

OK

OK

ResponseVoid

409

Conflict

Payment amount exceeds remaining invoice balance

InvoicePaymentBalanceConflictDto

502

Bad Gateway

Downstream service call failed

PayableErrorDto

Partially Update A Resource (Json Patch)

HTTP Request

PATCH /api/v1/purchase-order/{id}

📋 Description: Applies a JSON Patch (RFC 6902) document to the resource with the given ID. Only the fields specified in the patch are modified; all other fields remain unchanged.

Parameters

Name

In

Type

Required

Description

id

path

integer(int64)

true

Unique identifier for the resource

body

body

JsonPatch

true

Request body containing the updated purchase order details, including item modifications, quantities, and pricing adjustments.

Responses

Status

Meaning

Description

Schema

200

OK

OK

ResponsePurchaseOrderDto

409

Conflict

Payment amount exceeds remaining invoice balance

InvoicePaymentBalanceConflictDto

502

Bad Gateway

Downstream service call failed

PayableErrorDto

Bulk Create-Or-Update Resources

HTTP Request

PUT /api/v1/purchase-order/createOrUpdate/bulk

📋 Description: Creates or updates multiple resources in a single request. Partial success: each item is processed independently. Items that pass validation are persisted; failed items are recorded in the response errors list. The response body always contains the successfully processed items alongside any per-item errors.

Parameters

Name

In

Type

Required

Description

body

body

PurchaseOrderDto

true

Request body containing an array of purchase order details for bulk creation or updates, including item specifications, quantities, and associated metadata.

Responses

Status

Meaning

Description

Schema

200

OK

OK

ResponseListPurchaseOrderDto

409

Conflict

Payment amount exceeds remaining invoice balance

InvoicePaymentBalanceConflictDto

502

Bad Gateway

Downstream service call failed

PayableErrorDto

Create Or Update A Resource

HTTP Request

PUT /api/v1/purchase-order/createOrUpdate

📋 Description: Creates the resource if no matching record exists, or fully updates it if one is found. Idempotent: safe to call multiple times with the same payload.

Parameters

Name

In

Type

Required

Description

body

body

PurchaseOrderDto

true

Request body containing the purchase order details, including item specifications, quantities, pricing, and supplier information for creating or updating a purchase order.

Responses

Status

Meaning

Description

Schema

200

OK

OK

ResponsePurchaseOrderDto

409

Conflict

Payment amount exceeds remaining invoice balance

InvoicePaymentBalanceConflictDto

502

Bad Gateway

Downstream service call failed

PayableErrorDto

Bulk-Update Resources

HTTP Request

PUT /api/v1/purchase-order/bulk

📋 Description: Updates multiple resources in a single request. Partial success: each item is processed independently. Items that pass validation are updated; failed items are recorded in the response errors list. The response body always contains the successfully updated items alongside any per-item errors.

Parameters

Name

In

Type

Required

Description

body

body

PurchaseOrderDto

true

Request body containing an array of purchase order details, including item specifications, quantities, and supplier information for bulk processing.

Responses

Status

Meaning

Description

Schema

200

OK

OK

ResponseListPurchaseOrderDto

409

Conflict

Payment amount exceeds remaining invoice balance

InvoicePaymentBalanceConflictDto

502

Bad Gateway

Downstream service call failed

PayableErrorDto

Bulk-Create Resources

HTTP Request

POST /api/v1/purchase-order/bulk

📋 Description: Creates multiple resources in a single request. Partial success: each item is processed independently. Items that pass validation are persisted; failed items are recorded in the response errors list. The response body always contains the successfully created items alongside any per-item errors.

Parameters

Name

In

Type

Required

Description

body

body

PurchaseOrderDto

true

Request body containing an array of purchase order details, including item specifications, quantities, and supplier information for bulk processing.

Responses

Status

Meaning

Description

Schema

200

OK

OK

ResponseListPurchaseOrderDto

409

Conflict

Payment amount exceeds remaining invoice balance

InvoicePaymentBalanceConflictDto

502

Bad Gateway

Downstream service call failed

PayableErrorDto

Bulk-Delete Resources

HTTP Request

DELETE /api/v1/purchase-order/bulk

📋 Description: Deletes multiple resources by ID in a single request. Partial success: each deletion is attempted independently. If one or more deletions fail (e.g. due to state constraints), the successfully deleted items are NOT rolled back. A ValidationException containing per-item errors is thrown after all items have been attempted, so the caller must inspect the error list to determine which IDs were not deleted.

Parameters

Name

In

Type

Required

Description

body

body

array[integer]

true

Request body containing an array of purchase order identifiers to be deleted in bulk, facilitating streamlined inventory management.

Responses

Status

Meaning

Description

Schema

200

OK

OK

ResponseVoid

409

Conflict

Payment amount exceeds remaining invoice balance

InvoicePaymentBalanceConflictDto

502

Bad Gateway

Downstream service call failed

PayableErrorDto

Unmark A Purchase Order As Favourite

HTTP Request

POST /api/v1/purchase-order/{purchaseOrderId}/remove-from-favorite

📋 Description: Unmark a purchase order as favourite

Parameters

Name

In

Type

Required

Description

purchaseOrderId

path

integer(int64)

true

Unique identifier for the purchase order

Responses

Status

Meaning

Description

Schema

200

OK

OK

FavouriteModel

409

Conflict

Payment amount exceeds remaining invoice balance

InvoicePaymentBalanceConflictDto

502

Bad Gateway

Downstream service call failed

PayableErrorDto

Mark A Purchase Order As Favourite

HTTP Request

POST /api/v1/purchase-order/{purchaseOrderId}/add-to-favorite

📋 Description: Mark a purchase order as favourite

Parameters

Name

In

Type

Required

Description

purchaseOrderId

path

integer(int64)

true

Unique identifier for the purchase order

Responses

Status

Meaning

Description

Schema

200

OK

OK

FavouriteModel

409

Conflict

Payment amount exceeds remaining invoice balance

InvoicePaymentBalanceConflictDto

502

Bad Gateway

Downstream service call failed

PayableErrorDto

Search Resources

HTTP Request

POST /api/v1/purchase-order/search

📋 Description: Returns a paginated list of resources matching the given filter criteria. Pass null or an empty body to return all accessible records.

Parameters

Name

In

Type

Required

Description

page

query

integer

false

Zero-based page index (0..N)

size

query

integer

false

The size of the page to be returned

sort

query

array[string]

false

Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.

body

body

PurchaseOrderExtendedDtoFilter

false

Request body containing the search criteria for purchase orders, including filters such as order status, date range, and supplier information.

Default Values

Parameter

Default

Type

page

0

query

size

100

query

sort

["CREATED_AT,ASC"]

query

Parameter Constraints

Parameter

Constraints

page

Min: 0

size

Min: 1

Responses

Status

Meaning

Description

Schema

200

OK

OK

PagePurchaseOrderDto

409

Conflict

Payment amount exceeds remaining invoice balance

InvoicePaymentBalanceConflictDto

502

Bad Gateway

Downstream service call failed

PayableErrorDto

Upload Documents To A Purchase Order

HTTP Request

POST /api/v1/purchase-order/document/upload

📋 Description: Attaches one or more files to the specified purchase order.

Parameters

Name

In

Type

Required

Description

entityId

query

integer(int64)

true

Purchase order ID

files

query

array[string]

false

An array of files to be uploaded as supporting documents for a purchase order.

Responses

Status

Meaning

Description

Schema

200

OK

OK

MultipleUploadResult

409

Conflict

Payment amount exceeds remaining invoice balance

InvoicePaymentBalanceConflictDto

502

Bad Gateway

Downstream service call failed

PayableErrorDto

Search Documents Attached To Purchase Orders

HTTP Request

POST /api/v1/purchase-order/document/search

📋 Description: Search documents attached to purchase orders

Parameters

Name

In

Type

Required

Description

body

body

object

true

Request body containing the search criteria and filters for retrieving purchase order documents, enabling efficient document management and retrieval.

» filter

body

DocumentReferenceDtoFilter

false

Data transfer object representing the criteria for filtering document references, enabling users to efficiently retrieve and manage relevant documents within the system.

»» idIn

body

[integer]

false

Filter by multiple values of id

»» idEqual

body

integer(int64)

false

Filter by exact match of id

»» idLike

body

string

false

Filter by partial match of id

»» createdAtGreaterThanOrEqual

body

string(date-time)

false

Filter where created at is greater than or equal to specified value

»» createdAtLessThanOrEqual

body

string(date-time)

false

Filter where created at is less than or equal to specified value

»» createdByLike

body

string

false

Filter by partial match of created by

»» createdByEqual

body

string

false

Filter by exact match of created by

»» modifiedAtGreaterThanOrEqual

body

string(date-time)

false

Filter where modified at is greater than or equal to specified value

»» modifiedAtLessThanOrEqual

body

string(date-time)

false

Filter where modified at is less than or equal to specified value

»» modifiedByLike

body

string

false

Filter by partial match of modified by

»» modifiedByEqual

body

string

false

Filter by exact match of modified by

»» documentIdIn

body

[integer]

false

Filter by multiple values of document id

»» documentIdEqual

body

integer(int64)

false

Filter by exact match of document id

»» entityIdIn

body

[integer]

false

Filter by multiple values of entity id

»» entityIdEqual

body

integer(int64)

false

Filter by exact match of entity id

»» entityTypeIn

body

[string]

false

Filter by multiple values of entity type

»» entityTypeEqual

body

string

false

Filter by exact match of entity type

»» filenameLike

body

string

false

Filter by partial match of filename

» pageable

body

Pageable

false

Data transfer object representing a paginated collection of results, enabling efficient navigation and retrieval of large datasets within the API. This schema supports enhanced user experience by facilitating organized data presentation and management.

»» page

body

integer(int32)

false

Page number for pagination

»» size

body

integer(int32)

false

Number of items per page

»» sort

body

[string]

false

Sort order specification

Enumerated Values

Attribute

Value

»» entityTypeEqual

GOODS_RECEIPT, INVOICE, PURCHASE_ORDER, PURCHASE_REQUISITION, WORKSPACE

»» entityTypeIn

GOODS_RECEIPT, INVOICE, PURCHASE_ORDER, PURCHASE_REQUISITION, WORKSPACE

Parameter Constraints

Parameter

Constraints

»» page

Min: 0

»» size

Min: 1

Responses

Status

Meaning

Description

Schema

200

OK

OK

PageDocumentDto

409

Conflict

Payment amount exceeds remaining invoice balance

InvoicePaymentBalanceConflictDto

502

Bad Gateway

Downstream service call failed

PayableErrorDto

List All Resources

HTTP Request

GET /api/v1/purchase-order

📋 Description: Returns a paginated list of all accessible resources ordered by ID. Prefer POST /search for filtered queries.

Parameters

Name

In

Type

Required

Description

pageable

query

Pageable

true

Indicates whether the results of the purchase order query should be returned in a paginated format, facilitating efficient data retrieval and management.

Responses

Status

Meaning

Description

Schema

200

OK

OK

PagePurchaseOrderDto

409

Conflict

Payment amount exceeds remaining invoice balance

InvoicePaymentBalanceConflictDto

502

Bad Gateway

Downstream service call failed

PayableErrorDto

Create A Resource

HTTP Request

POST /api/v1/purchase-order

📋 Description: Creates a single resource. Returns the created resource with its generated ID.

Parameters

Name

In

Type

Required

Description

body

body

PurchaseOrderDto

true

Request body containing the purchase order details, including item specifications, quantities, pricing, and vendor information necessary for processing the order.

Responses

Status

Meaning

Description

Schema

200

OK

OK

ResponsePurchaseOrderDto

409

Conflict

Payment amount exceeds remaining invoice balance

InvoicePaymentBalanceConflictDto

502

Bad Gateway

Downstream service call failed

PayableErrorDto

Get Workflow State History For A Purchase Order

HTTP Request

GET /api/v1/purchase-order/{purchaseOrderId}/state-history

📋 Description: Returns the ordered list of state transitions the purchase order has gone through.

Parameters

Name

In

Type

Required

Description

purchaseOrderId

path

integer(int64)

true

Unique identifier for the purchase order

Responses

Status

Meaning

Description

Schema

200

OK

OK

Inline

409

Conflict

Payment amount exceeds remaining invoice balance

InvoicePaymentBalanceConflictDto

502

Bad Gateway

Downstream service call failed

PayableErrorDto

Response Schema

Status Code 200

Name

Type

Required

Restrictions

Description

anonymous

[PurchaseOrderStateHistoryDto]

false

none

[Data transfer object representing the historical states of a purchase order, capturing key status changes and timestamps to provide insights into the order’s lifecycle and facilitate effective procurement management.]

» id

integer(int64)

false

none

Unique identifier for the resource

» success

boolean

false

none

Indicates whether the purchase order state transition was successful.

» failedMessage

string

false

none

Contains the error message associated with a failed purchase order transaction, providing insights for troubleshooting and resolution.

» warningMessage

string

false

none

Message indicating any warnings related to the state changes of a purchase order, providing essential insights for order management.

» fromState

string

false

none

Represents the state from which the purchase order transitioned, providing insight into its historical processing status.

» event

string

false

none

Represents the specific event associated with the purchase order state change, providing essential context for tracking order status transitions.

» comment

string

false

none

Textual feedback or remarks associated with the changes in the purchase order state, providing context for the transaction history.

» purchaseOrderId

integer(int64)

false

none

Unique identifier for the purchase order

Check Whether A Purchase Order Is Marked As Favourite By The Current User

HTTP Request

GET /api/v1/purchase-order/{purchaseOrderId}/is-favorite

📋 Description: Check whether a purchase order is marked as favourite by the current user

Parameters

Name

In

Type

Required

Description

purchaseOrderId

path

integer(int64)

true

Unique identifier for the purchase order

Responses

Status

Meaning

Description

Schema

200

OK

OK

boolean

409

Conflict

Payment amount exceeds remaining invoice balance

InvoicePaymentBalanceConflictDto

502

Bad Gateway

Downstream service call failed

PayableErrorDto

Get Recently Viewed Purchase Orders For The Current User

HTTP Request

GET /api/v1/purchase-order/recents

📋 Description: Get recently viewed purchase orders for the current user

Responses

Status

Meaning

Description

Schema

200

OK

OK

Inline

409

Conflict

Payment amount exceeds remaining invoice balance

InvoicePaymentBalanceConflictDto

502

Bad Gateway

Downstream service call failed

PayableErrorDto

Response Schema

Status Code 200

Name

Type

Required

Restrictions

Description

anonymous

[RecentModel]

false

none

[Data transfer object representing the most recent model utilized in predictive analytics, encapsulating key attributes and performance metrics to support informed decision-making in business strategy.]

» internalId

string

false

none

Unique identifier for the internal

» foreignId

string

false

none

Unique identifier for the foreign

» objectType

string

false

none

Type of the object

» recentType

string

false

none

Type of the recent

» username

string

false

none

Represents the unique identifier for a user within the system, facilitating user management and authentication processes.

» lastAccess

string(date-time)

false

none

Timestamp indicating the most recent access to the resource, facilitating tracking of user engagement and system utilization.

Enumerated Values

Attribute

Value

recentType

APPROVED, CLOSED, MODIFIED, VIEWED

Get All Purchase Orders Marked As Favourite By The Current User

HTTP Request

GET /api/v1/purchase-order/favorites

📋 Description: Get all purchase orders marked as favourite by the current user

Responses

Status

Meaning

Description

Schema

200

OK

OK

Inline

409

Conflict

Payment amount exceeds remaining invoice balance

InvoicePaymentBalanceConflictDto

502

Bad Gateway

Downstream service call failed

PayableErrorDto

Response Schema

Status Code 200

Name

Type

Required

Restrictions

Description

anonymous

[FavouriteModel]

false

none

[Data transfer object representing a user’s preferred items within the application, facilitating personalized experiences and enhancing user engagement.]

» internalId

string

false

none

Unique identifier for the internal

» foreignId

string

false

none

Unique identifier for the foreign

» objectType

string

false

none

Type of the object

» username

string

false

none

Represents the unique username associated with a user in the system, facilitating user identification and access management.

» sequenceNumber

integer(int32)

false

none

Sequential identifier for the favorite items, ensuring a consistent order within the user’s preferences.

» createdAt

string(date-time)

false

none

Timestamp when this resource was created