RESTful API

 

/api/v2/collection/folder/{folderId}

Request Type
GET
 
Returns a list of folders from the authenticated user's Discogs collection list.
 
Example URL
https://example.stitchz.net/api/v2/collection/folder/123456?identity=http%3a%2f%2fwww.discogs.com%2fuser%2f3408qq4958qw3
 
Supported Providers
 
Request
Required Parameter Type Description
yes Bearer string The application's unique Oauth2 bearer token (access token) in the request header
yes Identity string The identity string provided by Stitchz when the user logged in.
  folderId number The id of the selected folder from the authenticated user's collection list. This is a folder in the user's collection. If you include the folderId in the URL, e.g. /api/v2/collection/folder/123456, then the folder's details will be returned in the response.
  Format string The format of the authenticated Stitchz response, XML, JSON, JSONP. A query string parameter can be included in the request (e.g. ?format=json) or a header variable of "Accept" with the proper value, e.g. 'application/json', 'application/xml', etc. The default response is in "JSON" format.
Example Request
$ curl -H "Authorization: Bearer e72e16c7e42f292c6912e7710c838347ae178b4a"
-H "Accept: application/json"
-A "example client"
https://example.stitchz.net/api/v2/collection/folder/123456?identity=http%3a%2f%2fwww.discogs.com%2fuser%2f3408Rq4958qw3

GET /api/v2/collection/folder/123456?identity=http%3a%2f%2fwww.discogs.com%2fuser%2f3408Rq4958qw3 HTTP/1.1
User-Agent: example client
Host: example.stitchz.net
Accept: application/json
Authorization: Bearer e72e16c7e42f292c6912e7710c838347ae178b4a
Response
The response returned contains the fields and attributes as defined by the service provider, i.e. Discogs, etc.
 
Example XML Response
Example JSON Response
<folders>
    <folders>
        <count>1</count>
        <resource_url>http://api.discogs.com/users/<username>/collection/folders/0</resource_url>
        <id>0</id>
        <name>All</name>
    </folders>
    <folders>
        <count>1</count>
        <resource_url>http://api.discogs.com/users/<username>/collection/folders/123456</resource_url>
        <id>123456</id>
        <name>The Doors</name>
    </folders>
    <folders>
        <count>0</count>
        <resource_url>http://api.discogs.com/users/<username>/collection/folders/1</resource_url>
        <id>1</id>
        <name>Uncategorized</name>
    </folders>
</folders>
{
    "folders":
    [
        {
            "count":1,
            "resource_url":"http://api.discogs.com/users/<username>/collection/folders/0",
            "id":0,
            "name":"All"
        },
        {
            "count":1,
            "resource_url":"http://api.discogs.com/users/<username>/collection/folders/123456",
            "id":123456,
            "name":"The Doors"
        },
        {
            "count":0,
            "resource_url":"http://api.discogs.com/users/<username>/collection/folders/1",
            "id":1,
            "name":"Uncategorized"
        }
    ]
}
Request Type
POST
 
Adds a new folder to the authenticated user's Discogs collection list.
 
Example URL
https://login.stitchz.net/api/v2/collection/folder?identity=http%3a%2f%2fwww.discogs.com%2fuser%2f3408qq4958qw3
 
Supported Providers
Discogs supported request
 
Request
Required Parameter Type Description
yes Bearer string The application's unique Oauth2 bearer token (access token) in the request header
yes Identity string The identity string provided by Stitchz when the user logged in.
yes folderName number The name of a new folder to add to the authenticated user's collection list. This folder can be used to add releases to the authenticated user's collection. Post this parameter in the body of the request when adding a release to the collection list, e.g. folderName=My New Folder.
  Format string The format of the authenticated Stitchz response, XML, JSON, JSONP. The default response is in "JSON" format.
Response
The response returned contains the fields and attributes as defined by the service provider, i.e. Discogs, etc.
 
Example XML Response
Example JSON Response
<folder>
    <count>0</count>
    <resource_url>http://api.discogs.com/users/<username>/collection/folders/987654</resource_url>
    <id>987654</id>
    <name>The Doors</name>
</folder>
{
    "folder":
    {
            "count":"0",
            "resource_url":"http://api.discogs.com/users/<username>/collection/folders/987654",
            "id":987654,
            "name":"The Doors"
    }
}
Request Type
DELETE
 
Deletes the folder (only if it is empty) from the authenticated user's Discogs collection list.
 
Example URL
https://login.stitchz.net/api/v2/collection/folder/987654?identity=http%3a%2f%2fwww.discogs.com%2fuser%2f3408qq4958qw3
 
Supported Providers
Discogs supported request
 
Request
Required Parameter Type Description
yes Bearer string The application's unique Oauth2 bearer token (access token) in the request header
yes Identity string The identity string provided by Stitchz when the user logged in.
yes folderId number The id of the selected folder from the authenticated user's collection list. This is a folder in the user's collection. Include this value in the URL of the request to remove the folder from the collection list, e.g. folderId=987654
  Format string The format of the authenticated Stitchz response, XML, JSON, JSONP. The default response is in "JSON" format.
Response
The response returned contains the fields and attributes as defined elow.
 
Example XML Response
Example JSON Response
<response status="ok" version="1">
    <delete>true</delete>
</response>
{
    "response":
    {
        "delete": true
    }
}