# Collection Collection is a class that represents a collection in the MarcSync API.
METHODS
## METHODS ### :createEntry(`data:` [EntryData](../types/EntryData)) Creates a new entry in the collection and returns it as an [Entry](./Entry) object. :::caution Exceptions [InvalidAccessToken](../errors/Authorization#InvalidAccessToken) - Thrown when the `accessToken` is invalid.
[CollectionNotFound](../errors/Collection#CollectionNotFound) - Thrown when the collection does not exist.
[InvalidEntryData](../errors/Entry#InvalidEntryData) - Thrown when the [EntryData](../types/EntryData) is invalid. ::: ### :updateEntries(`filters:` [EntryData](../types/EntryData), `data:` [EntryData](../types/EntryData)) Updates all entries that match the specified filters with the specified data. :::caution Exceptions [InvalidAccessToken](../errors/Authorization#InvalidAccessToken) - Thrown when the `accessToken` is invalid.
[CollectionNotFound](../errors/Collection#CollectionNotFound) - Thrown when the collection does not exist.
[InvalidEntryData](../errors/Entry#InvalidEntryData) - Thrown when the [EntryData](../types/EntryData) is invalid. ::: ### :getEntries(`filters:` [EntryData](../types/EntryData)) Returns all entries that match the specified filters as an array of [Entry](./Entry) objects. :::caution Exceptions [InvalidAccessToken](../errors/Authorization#InvalidAccessToken) - Thrown when the `accessToken` is invalid.
[CollectionNotFound](../errors/Collection#CollectionNotFound) - Thrown when the collection does not exist.
[InvalidEntryData](../errors/Entry#InvalidEntryData) - Thrown when the [EntryData](../types/EntryData) is invalid. ::: ### :deleteEntries(`filters:` [EntryData](../types/EntryData)) Deletes all entries that match the specified filters. :::caution Exceptions [InvalidAccessToken](../errors/Authorization#InvalidAccessToken) - Thrown when the `accessToken` is invalid.
[CollectionNotFound](../errors/Collection#CollectionNotFound) - Thrown when the collection does not exist.
[InvalidEntryData](../errors/Entry#InvalidEntryData) - Thrown when the [EntryData](../types/EntryData) is invalid. ::: ### :drop() Deletes the collection. :::caution Exceptions [InvalidAccessToken](../errors/Authorization#InvalidAccessToken) - Thrown when the `accessToken` is invalid.
[CollectionNotFound](../errors/Collection#CollectionNotFound) - Thrown when the collection does not exist.
:::