> For the complete documentation index, see [llms.txt](https://host2host.onibonje.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://host2host.onibonje.com/docs/36-admin-api-reference.md).

# Admin API Reference

## 1. Overview

**Module:** `h2h-admin-api` | **Base path:** `/api/v1` | **Auth:** Keycloak Bearer JWT

All mutations create **DRAFT** records unless noted. Publish via `/publish` endpoints.

***

## 2. Partners

| Method | Path                      | Description           |
| ------ | ------------------------- | --------------------- |
| GET    | `/partners`               | List (scope-filtered) |
| POST   | `/partners`               | Create partner        |
| GET    | `/partners/{id}`          | Get partner           |
| PUT    | `/partners/{id}`          | Update draft          |
| POST   | `/partners/{id}/channels` | Add channel config    |

## 3. Integration Profiles

| Method | Path                  | Description      |
| ------ | --------------------- | ---------------- |
| GET    | `/profiles`           | List profiles    |
| POST   | `/profiles`           | Create profile   |
| PUT    | `/profiles/{id}`      | Update draft     |
| POST   | `/profiles/{id}/test` | Run test harness |

## 4. Transforms & Templates

| Method   | Path                    | Description          |
| -------- | ----------------------- | -------------------- |
| GET/POST | `/transforms`           | CRUD transform specs |
| POST     | `/transforms/{id}/test` | Run sample transform |
| GET/POST | `/templates`            | Route templates      |
| GET/POST | `/templates/{id}/steps` | Route steps          |

## 5. Rules & Schedules

| Method   | Path                | Description       |
| -------- | ------------------- | ----------------- |
| GET/POST | `/rules/validation` | Validation rules  |
| GET/POST | `/rules/routing`    | Routing rules     |
| GET/POST | `/schedules`        | Cut-off schedules |
| GET/POST | `/calendars`        | Holiday calendars |

## 6. Customization

| Method   | Path                            | Description                      |
| -------- | ------------------------------- | -------------------------------- |
| GET/POST | `/customization-profiles`       | CustomizationProfile CRUD        |
| GET      | `/customization-profiles/merge` | Preview merged effective profile |
| GET/POST | `/custom-attributes`            | EAV definitions/values           |
| GET/POST | `/extension-entities`           | Extension entity schemas/rows    |

## 7. Extensibility

| Method   | Path                    | Description           |
| -------- | ----------------------- | --------------------- |
| GET/POST | `/scripts`              | Script definitions    |
| POST     | `/scripts/{id}/test`    | Sandbox execute       |
| GET/POST | `/hooks`                | Hook definitions      |
| GET/POST | `/jobs`                 | Job definitions       |
| POST     | `/jobs/{id}/run`        | Manual trigger        |
| GET      | `/jobs/executions`      | Execution log         |
| GET/POST | `/event-subscriptions`  | Event handlers        |
| GET/POST | `/webhooks`             | Webhook subscriptions |
| GET      | `/spi/extension-points` | Extension catalog     |
| GET      | `/spi/step-types`       | Registered step codes |

## 7.1 Notifications

| Method   | Path                                 | Description               |
| -------- | ------------------------------------ | ------------------------- |
| GET/POST | `/notifications/providers`           | Email/SMS provider config |
| GET/POST | `/notifications/templates`           | Message templates         |
| GET/POST | `/notifications/subscriptions`       | Event → channel bindings  |
| POST     | `/notifications/templates/{id}/test` | Send test notification    |
| GET      | `/notifications/deliveries`          | Delivery audit log        |
| POST     | `/notifications/send`                | Ad-hoc send (supervisor)  |

## 8. Publish & Approvals

| Method | Path                       | Description                                      |
| ------ | -------------------------- | ------------------------------------------------ |
| POST   | `/publish/submit`          | Maker submits for approval                       |
| POST   | `/publish/approve`         | Approve and publish (delegates to workflow)      |
| POST   | `/publish/rollback`        | Rollback to version                              |
| GET    | `/publish/pending`         | Legacy alias → `/approvals/pending`              |
| GET    | `/publish/audit`           | Config audit log                                 |
| GET    | `/approvals/pending`       | Checker inbox (role + scope filtered)            |
| GET    | `/approvals/{id}`          | Request detail, diff, action history             |
| POST   | `/approvals/{id}/approve`  | Approve current step                             |
| POST   | `/approvals/{id}/reject`   | Reject — entity returns to DRAFT / hold released |
| POST   | `/approvals/{id}/delegate` | Reassign task                                    |
| GET    | `/approvals/policies`      | List approval policies                           |
| POST   | `/approvals/policies`      | Create/update policy and steps                   |

## 9. Operations

| Method | Path                                  | Description                            |
| ------ | ------------------------------------- | -------------------------------------- |
| GET    | `/operations/transactions`            | Search by correlationId, partner, date |
| POST   | `/operations/transactions/{id}/retry` | Retry failed                           |
| GET    | `/operations/dlq`                     | DLQ browser                            |
| POST   | `/operations/dlq/{id}/reprocess`      | Reprocess DLQ                          |
| GET    | `/files`                              | File registry search                   |
| POST   | `/files/{id}/reprocess`               | Reprocess file                         |

## 10. Reconciliation

| Method | Path            | Description         |
| ------ | --------------- | ------------------- |
| GET    | `/recon/items`  | Unmatched items     |
| POST   | `/recon/match`  | Manual match        |
| GET    | `/recon/config` | Recon configuration |

## 11. Files (Signed URL)

| Method | Path                       | Description                    |
| ------ | -------------------------- | ------------------------------ |
| POST   | `/files/upload-url`        | Generate pre-signed upload URL |
| POST   | `/files/{id}/complete`     | Confirm upload complete        |
| POST   | `/files/{id}/download-url` | Generate download URL          |

## 12. Standard Response Envelope

```json
{
  "data": {},
  "meta": { "correlationId": "...", "timestamp": "..." },
  "errors": [{ "code": "VAL_001", "message": "..." }]
}
```

## 13. Related Documents

* [05 Low-Code Admin Platform](/docs/05-low-code-admin-platform.md)
* [06 Personas and RBAC](/docs/06-personas-and-rbac.md)
* [20 Universal Library Extensibility](/docs/20-universal-library-extensibility.md)


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://host2host.onibonje.com/docs/36-admin-api-reference.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
