Skip to content

Typeless Documents

Manage typeless documents in Moneybird.

Working with Typeless Documents

Typeless documents are documents of which the type is not yet known. For example, a document uploaded via email or via the bulk uploader. It is not possible to update a typeless document, except for adding attachments. You will need to set its type first.

Basic Operations

Get a Typeless Document

Retrieve a typeless document by its ID.

$typelessDocument = $client->typelessDocuments()->get('123456789');

List Typeless Documents

Get a paginated list of typeless documents.

$typelessDocuments = $client->typelessDocuments()->paginate();
// Iterate through the pages
foreach ($typelessDocuments as $typelessDocument) {
echo $typelessDocument->reference . ': ' . $typelessDocument->date;
}

Get All Typeless Documents

Get all typeless documents without pagination.

$allTypelessDocuments = $client->typelessDocuments()->all();

Create a Typeless Document

Create a new typeless document.

$data = [
'reference' => '20230001',
'date' => '2023-01-15',
];
$typelessDocument = $client->typelessDocuments()->create($data);

Delete a Typeless Document

Delete a typeless document.

$client->typelessDocuments()->delete('123456789');

Synchronization

Get IDs for Synchronization

Get a list of typeless document IDs and versions for synchronization.

$idVersions = $client->typelessDocuments()->synchronization();

Synchronize Typeless Documents

Fetch typeless documents with given IDs.

$ids = ['123456789', '987654321'];
$typelessDocuments = $client->typelessDocuments()->synchronize($ids);

Working with Attachments

Add Attachment to Typeless Document

Add an attachment to a typeless document.

$attachmentData = [
'file' => base64_encode(file_get_contents('/path/to/file.pdf')),
'filename' => 'file.pdf',
];
$result = $client->typelessDocuments()->createAttachment('123456789', $attachmentData);

Delete Attachment

Delete an attachment from a typeless document.

$client->typelessDocuments()->deleteAttachment('123456789', 'attachment_id');

Typeless Document Properties

When working with typeless documents, you’ll have access to the following properties:

PropertyTypeDescription
idstringUnique identifier
administration_idstringID of the administration the document belongs to
contact_idstringID of the contact associated with the document (optional)
referencestringReference number or code for the document
datestringDate of the document (YYYY-MM-DD)
due_datestringDue date of the document (YYYY-MM-DD) if applicable
entry_numberstringEntry number of the document
statestringCurrent state of the document (e.g., “new”)
currencystringCurrency code (e.g., “EUR”)
exchange_ratestringExchange rate if not using the default currency
prices_are_incl_taxstringWhether prices include tax
originstringOrigin of the document
paid_atstringDate when the document was paid (if applicable)
total_price_excl_taxstringTotal price excluding tax
total_price_incl_taxstringTotal price including tax
detailsarrayLine item details
paymentsarrayPayment information
notesarrayNotes associated with the document
attachmentsarrayAttachments associated with the document
eventsarrayEvents related to the document
created_atstringISO 8601 timestamp of when the document was created
updated_atstringISO 8601 timestamp of when the document was last updated

Note: See the official API reference for the complete list of available properties.

Further reading