# mba-cli document

> Read documents (key-scoped)

Read documents (key-scoped)

CLI version: `0.3.2`

## Commands

### mba-cli document get

Get one document by id

Get single document resource

Get a single document resource by its unique identifier

Get one document by id

Flags:

- `--id` (string): Document record id

API endpoints:

- GET /documents/{id} — https://mybusinessapp.co.za/developers/api/document#tag/Document/get_single_doc

### mba-cli document get-by-reference

Get one document by reference type and id

Get single document resource by reference

Get a single document resource by its reference type and reference ID, with optional document type filtering

Get one document by reference type and id

Flags:

- `--ref-id` (string): Reference id
- `--type` (string): Reference type

API endpoints:

- GET /documents/reference/{referenceType}/{referenceId} — https://mybusinessapp.co.za/developers/api/document#tag/Document/get_single_document_by_reference

### mba-cli document ls

List documents

Get all document resources

Get all the document resources with optional filtering by document type and reference type

List documents

Flags:

- `--all` (bool, default `false`): Return all rows (paginate=false)
- `--document-type` (string): Query parameter documentType (from the API spec)
- `--limit` (int, default `20`): Query parameter limit (from the API spec)
- `--page` (int, default `1`): Query parameter page (from the API spec)
- `--paginate` (bool, default `true`): Query parameter paginate (from the API spec)
- `--reference-type` (string): Query parameter referenceType (from the API spec)

API endpoints:

- GET /documents — https://mybusinessapp.co.za/developers/api/document#tag/Document/get_all_docs

---

[Rendered page](https://mybusinessapp.co.za/developers/cli/reference/document)

© MyBusinessApp (Pty) Ltd. Proprietary documentation — do not republish.
