# Documents API

> List documents and retrieve them by id or by reference.

List documents and retrieve them by id or by reference.

Base URL: `https://mpp-api-mybusinessapp-san.azure-api.net/v2`

API version: `3.55.133`

## Endpoints

### GET /documents

List documents

Returns the documents for the tenant identified by the API key. Paginated: use `page`/`limit` or `paginate=false`; filter by document type. Related: `Retrieve a document by reference`.

Parameters:

- `Ocp-Apim-Subscription-Key` (header), required — Azure API Management subscription key (public: 4fb0f9a3b14a44e98698e80cef2aebeb)
- `X-MBA-Application-ID` (header), optional — Optional. Target another application's stamp; only a Studio key may target a different tenant
- `X-MBA-Application-Type` (header), optional — Optional. Application type paired with X-MBA-Application-ID
- `page` (query), optional — Page number
- `limit` (query), optional — Items per page
- `paginate` (query), optional — Enable pagination
- `documentType` (query), optional — Filter by document type
- `referenceType` (query), optional — Filter by reference type

Reference: https://mybusinessapp.co.za/developers/api/document#tag/Document/get_all_docs

### GET /documents/reference/{referenceType}/{referenceId}

Retrieve a document by reference

Returns the document linked to a `referenceType` + `referenceId` pair (e.g. an invoice or booking). Related: `List documents`.

Parameters:

- `Ocp-Apim-Subscription-Key` (header), required — Azure API Management subscription key (public: 4fb0f9a3b14a44e98698e80cef2aebeb)
- `X-MBA-Application-ID` (header), optional — Optional. Target another application's stamp; only a Studio key may target a different tenant
- `X-MBA-Application-Type` (header), optional — Optional. Application type paired with X-MBA-Application-ID
- `referenceType` (path), required — Reference type of the document resource
- `referenceId` (path), required — Reference ID of the document resource
- `documentType` (query), optional — Document type to filter by

Reference: https://mybusinessapp.co.za/developers/api/document#tag/Document/get_single_document_by_reference

### GET /documents/{id}

Retrieve a document by id

Returns the document with the given `id`. Related: `List documents`.

Parameters:

- `Ocp-Apim-Subscription-Key` (header), required — Azure API Management subscription key (public: 4fb0f9a3b14a44e98698e80cef2aebeb)
- `X-MBA-Application-ID` (header), optional — Optional. Target another application's stamp; only a Studio key may target a different tenant
- `X-MBA-Application-Type` (header), optional — Optional. Application type paired with X-MBA-Application-ID
- `id` (path), required — ID of the document resource

Reference: https://mybusinessapp.co.za/developers/api/document#tag/Document/get_single_doc

---

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

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