---
title: "List a purchase order's audit logs"
method: GET
path: "/v1/erp/payouts/purchase_orders/{id}/logs"
tags: ["Purchase Order"]
---

# List a purchase order's audit logs

`GET /v1/erp/payouts/purchase_orders/{id}/logs`

## Request

- Base URL: `https://api.cardda.com`
- URL: `https://api.cardda.com/v1/erp/payouts/purchase_orders/{id}/logs`
- Auth: HTTP bearer

Returns a paginated audit trail for the purchase order, including changes to the order
and its associated records. Each entry embeds the changed `auditable` record and the
acting `user`.

## Parameters

- `#/paths/~1v1~1erp~1payouts~1rules/get/parameters/0` (unresolved $ref)
- `#/paths/~1v1~1erp~1payouts~1rules~1%7Bid%7D/get/parameters/1` (unresolved $ref)
- `#/paths/~1v1~1erp~1payouts~1rules/get/parameters/1` (unresolved $ref)
- `#/paths/~1v1~1erp~1payouts~1rules/get/parameters/2` (unresolved $ref)

## Response `200`

Paginated audit log entries.

- Audit[]
  - `id` string, uuid
  - `auditable_id` string
  - `auditable_type` string
  - `action` 'create' | 'update' | 'destroy'
  - `audited_changes` object: Map of changed attributes to their before/after values.
  - `version` integer
  - `comment` string, nullable
  - `created_at` string, date-time
  - `user` object, nullable: The user that performed the change.
  - `auditable` object, nullable: The record that was changed.

## Other responses

- `401`: Unauthorized
- `404`: Purchase order not found

---

[API](https://skmtc.dev/cardda/apis/erp-api.md) - [All operations](https://skmtc.dev/cardda/apis/erp-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cardda/apis/erp-api/revisions/0730ed26bc3c?raw)
