Sample - Box Platform API
GET/collections/{collection_id}

Get a collection by ID

Retrieves a collection by its identifier. Use collection_id to access the collection's metadata and identify the collection type. The available collection is the Favorites collection, represented with collection type favorites.

1 parameter
collection_idstringrequired
The identifier of the collection to retrieve.

2 status codes
200Returns the collection object with its identifier, `collection` type, `Favorites` name, and `favorites` collection type.
idstringoptional
The unique identifier for this collection.
typestringoptional
The value will always be `collection`.
Allowed:collection
namestringoptional
The name of the collection.
Allowed:Favorites
collection_typestringoptional
The type of the collection. This is used to determine the proper visual treatment for collections.
Allowed:favorites
defaultReturns a generic error object for an unexpected client error.
typestringoptional
The value will always be `error`.
Allowed:error
statusintegeroptional
The HTTP status of the response.
codestringoptional
A Box-specific error code.
Allowed:createdacceptedno_contentredirectnot_modifiedbad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictprecondition_failed
messagestringoptional
A short message describing the error.
context_infoobjectoptional
A free-form object that contains additional context about the error. The possible fields are defined on a per-endpoint basis. `message` is only one example.
help_urlstringoptional
A URL that links to more information about why this error occurred.
request_idstringoptional
A unique identifier for this response, which can be used when contacting Box support.

Error handling

collection_id must identify an existing collection. The collection response uses type set to collection, name set to Favorites, and collection_type set to favorites.