(documents)
Retrieve a list of documents for the authenticated team.
from midday import Midday
with Midday(
token="MIDDAY_API_KEY",
) as m_client:
res = m_client.documents.list(cursor="20", page_size=20, q="invoice", tags=[
"tag1",
"tag2",
])
# Handle response
print(res)| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
cursor |
OptionalNullable[str] | ➖ | N/A | 20 |
sort |
List[str] | ➖ | N/A | |
page_size |
Optional[float] | ➖ | N/A | 20 |
q |
OptionalNullable[str] | ➖ | N/A | invoice |
tags |
List[str] | ➖ | N/A | [ "tag1", "tag2" ] |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
Retrieve a document by its unique identifier for the authenticated team.
from midday import Midday
with Midday(
token="MIDDAY_API_KEY",
) as m_client:
res = m_client.documents.get(id="<id>")
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
id |
Nullable[str] | ✔️ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.GetDocumentByIDResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
Delete a document by its unique identifier for the authenticated team.
from midday import Midday
with Midday(
token="MIDDAY_API_KEY",
) as m_client:
res = m_client.documents.delete(id="<id>")
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
id |
str | ✔️ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |