Colorblends wholesale flowerbulbs API

Overview

The Colorblends API makes it possible for unauthorized or authorized users to obtain information about the spring flowering bulbs for sale through Colorblends.com. The bulbs can be organized by category or searched using multiple filters.

Developers who establish a client account can authorize users to create and obtain resources: company account information and multiple lists of bulbs, called 'gardens.'

Method URL Usage Returns User Auth Required
GET /bulbs List all bulbs Collection of bulbs with optional pagination --
GET /bulbs/{bulb} List details of a bulb Single bulb object --
GET /bulbs/search?filters={filters} List all bulbs Collection of bulbs with optional pagination --
GET /categories List all categories Collection of categories --
GET /categories/{category} List details of a category A category object that includes a collection of bulbs with optional pagination --
GET /accounts/{account_id} List Account Details Single account object admin
POST /account Add a user 201 Created admin
POST /account/{account_id}/gardens Create gardens 201 Created admin/ user
POST /account/{account_id}/gardens/{garden} Add bulbs to a garden 201 Created admin/ user
GET /account/{account_id}/gardens/{garden} List bulbs in a garden Collection of bulbs admin/ user
DELETE /account/{account_id}/gardens/{garden} Delete bulbs from a garden 204 No Content admin/ user

List all Bulbs

Description

Returns a collection of all bulbs currently in active inventory with names and thumbnail images. Each bulb record contains links to its categories and the number available to purchase, to aid in client-side sorting. To limit the number of records returned, use the limit parameter. Response will include links to previous and next pages.

Request

GET https://api.colorblends.com/v1/bulbs[?limit={limit}]

Authentication

No authentication necessary.

Parameters

Name Example Description
limit 50 Optional, number of results to return at a time. Default is to return all results.

Response Fields

Field Description
bulb_id A unique identifier for the bulb
name The name of the bulb or blend
thumbnail A source link to a square image of the bulb
categories A comma-separated list of categories the bulb belongs to
available Realtime data on how many of this bulb is currently available for purchase
next A link to the next page if a limit was passed and result set is big enough for pagination, otherwise empty
previous A link to the previous page if available, otherwise empty

Response



HTTP/1.1 200 OK

Content-Type: application/json

"self" : "https://api.colorblends.com/v1/bulbs",

"next" : "",

"previous" : "",

"kind" : "collection",

“count” : 323,

“bulbs” : [

            {

                “self” : “https://api.colorblends.com/bulbs/1010”,

                “bulb_id” : 1010,

                “name” : “Amazon”,

                “thumbnail” : “https://www.colorblends.com/img/media/prime/product/1010_Amazon_CGC2218QP.jpg”,

                “categories” : “Tulip Bulbs,Singles,Perennial Tulips,Orange,Yellow,Early Spring Blooming",

                “available” : 15850

            },

            {

                “self” : “https://api.colorblends.com/bulbs/1011”,

                “bulb_id” : 1011,

                “name” : “Bakeri Lilac Wonder”,

                “thumbnail” : “https://www.colorblends.com/img/media/prime/product/1011_BakeriLilacWonder_CWH_L1001871q.jpg”,

                “categories” : “Tulip Bulbs,Wild Tulips,Pink,Yellow,Mid Spring Blooming,Good for Naturalizing,For the South",

                “available” : 5000

            },

            {

                “self” : “https://api.colorblends.com/bulbs/1016”,

                “bulb_id” : 1016,

                “name” : “Flair”,

                “thumbnail” : “https://www.colorblends.com/img/media/prime/product/1011_BakeriLilacWonder_CWH_L1001871q.jpg”,

                “genus” : “Tulips”,

                “categories” : “Tulip Bulbs,Singles,Red,Yellow,Early Mid Spring Blooming,For the South",

                “available” : 9950

            }, ...

       ]
                

List Bulb Details

Description

Returns the full details about a bulb including its genus, colors, bloom time, height, and other characteristics

Request

GET https://api.colorblends.com/v1/bulbs/{bulb}

Authentication

No authentication necessary

Parameters

Name Example Description
bulb 1011 | OR | bakeri-lilac-wonder Required bulb_id | OR | name, all lower case, spaces replaced by hyphens

Response Fields

Field Description
bulb_id A unique identifier for the bulb
name The name of the bulb or blend
description A description of the bulb or blend
thumbnail A source link to a square image of the bulb
height A string with the flower height range
available Realtime data on how many of this bulb is currently available for purchase
colors An array of colors that describe the bulb or blend, including the name of the color and a link to all blooms in that color
bloomTimes An array of bloom times the bulb or blend covers, including links to all flowers that bloom at the same time
genus The genus that the bulb belongs to (tulip, daffodil, hyacinth, specialty), including a link to all bulbs in that genus
subCategories An array of subcategories that the bulb belongs to (e.g. tulip blends, miniature daffodils), including a link to all bulbs in that subcategory
uses An array of uses (e.g. deer resistant, southern recommended, for naturalizing) that the bulb has, including a link to all bulbs with that use
pricing An array of pricing rates, per amounts and their prices in U.S. dollars, for the product
partners An array of similar bulb items to recommend, including the name, id, thumbnail and link to each bulb detail
img An array of links to other images available for the bulb

Response


HTTP/1.1 200 OK

Content-Type: application/json

"self" : https://api.colorblends.com/v1/bulbs/trifecta,

"kind" : "bulb",

"bulb_id" : 1583,

"name" : "Trifecta",

"description" : "A race to bloom that’s never in doubt. Red is always first, followed by yellow, with purple third but by no means last.
                        This blend of tulips is a sure bet. To ensure a good run, plant the bulbs closely—just 2–3 inches apart.",

"thumbnail" : "https://www.colorblends.com/img/media/prime/product/1583_Trifecta_CWH7679q.jpg",

"height" : "16-24 inches",

"colors: [

    {

    "link" : "https://api.colorblends.com/v1/categories/red",

    "name" : "Red"

    },

    {

    "link" : "https://api.colorblends.com/v1/categories/purple",

    "name" : "Purple"

    },

    {

    "link" : "https://api.colorblends.com/v1/categories/yellow",

    "name" : "Yellow"

    }

],

"bloomTimes" : [

    {

    "link" : "https://api.colorblends.com/v1/categories/early-mid-spring-blooming",

    "name" : "Early Mid Spring Blooming"

    },

    {

    "link" : "https://api.colorblends.com/v1/categories/mid-spring-blooming",

    "name" : "Mid Spring Blooming"

    },

    {

    "link" : "https://api.colorblends.com/v1/categories/mid-late-spring-blooming",

    "name" : "Mid Late Spring Blooming"

    },

    {

    "link" : "https://api.colorblends.com/v1/categories/late-spring-blooming",

    "name" : "Late"

    }

],

"genus" : [

    {

    "link" : "https://api.colorblends.com/v1/categories/tulip-bulbs",

    "name" : "Tulip Bulbs"

    }

],

"subCategories" : [

    {

    "link" : "https://api.colorblends.com/v1/categories/cubed-tulip-blends",

    "name" : "Cubed Tulip Blends"

    },

    {

    "link" : "https://api.colorblends.com/v1/categories/tulip-blends",

    "name" : "Tulip Blends"

    }

],

"uses" :  [

    {

    "link" : "https://api.colorblends.com/v1/categories/good-for-cut-flowers",

    "name" : "Good For Cut Flowers"

    }

],

"pricing" :  [

    {

    "per" : 100,

    "price_in_usd" : 37

    },

    {

    "per" : 1000,

    "price_id_usd" : 310

    }

],

"partners" :  [

    {

    "self" : "https://api.colorblends.com/v1/bulbs/red-cubed",

    "name" : "Red Cubed",

    "thumbnail" : "https://www.colorblends.com/img/media/prime/product/1512_RedCubed_CWH1075QP.jpg"

    },

    {

    "self" : "https://api.colorblends.com/v1/bulbs/red-emperor",

    "name" : "Red Emperor",

    "thumbnail" : "https://www.colorblends.com/img/media/prime/product/1643_redEmporer_DSC_8319QP.jpg"

    },

    {

    "self" : "https://api.colorblends.com/v1/bulbs/yume-no-murasaki",

    "name" : "Yume no Murasaki",

    "thumbnail" : "https://www.colorblends.com/img/media/prime/product/1751_PurpleDream_CWH7166q.jpg"

    }

],

"img" : [

    {

    "src" : "https://www.colorblends.com/img/media/prime/product/1583_Trifecta_q.jpg"

    }

]

                    

List Bulb Categories

Description

Returns all the current bulb categories, including category_id and name required for filtering, as well as category types for client-side organization

Request

GET https://api.colorblends.com/v1/categories

Authentication

No authentication necessary

Response Fields

Field Description
name The name of the category for display purposes, can be placed in lower case and replace spaces with hyphens for filtering
category_id A unique number identifier for the category, can also be used for filtering
type The type of the category (genus, Shop By Bloom Time, Shop By Use, Bloom Color, Tulip Bulbs, or Daffodil Bulbs)
thumbnail A source link to a square image for illustrating the category
count The number of categories returned

Response


HTTP/1.1 200 OK

Content-Type: application/json

"self" : "https://api.colorblends.com/v1/categories",

"kind" : "collection",

"count" : 49,

"categories" : [

    {

        "self" : "https://api.colorblends.com/v1/categories/tulip-bulbs",

        "name" : "Tulip Bulbs",

        “category_id’ : 1,

        "type" :  "genus",

        "thumbnail" : "https://www.colorblends.com/img/media/prime/product/1501_BestRedOX_CWH5371q.jpg"

    }, .....

    {

        "self" : "https://api.colorblends.com/v1/categories/gold-standard-daffodils",

        "name" : "Gold Standard Daffodils",

        “category_id” : 92,

        "type" :  "Daffodil Bulbs",

        "thumbnail" : "https://www.colorblends.com/img/media/prime/product/3010_Marieke_CWH0890QP.jpg"

    }, .....

    {

        "self" : "https://api.colorblends.com/v1/categories/deer-and-rodent-resistant",

        "title" : "Deer Resistant",

        “category_id” :  21,

        "type" :  "Shop By Use",

        "thumbnail" : "https://www.colorblends.com/img/media/prime/product/6033_Camassia_BlueDanube_V3QP.jpg"

    }, .....

    {

        "self" : "https://api.colorblends.com/v1/categories/very-early-spring-blooming",

        "title" : "Very Early Spring Blooming",

        “category_id” :  43,

        "type" :  "Shop By Bloom Time",

        "thumbnail" : "https://www.colorblends.com/img/media/prime/product/5020_HokusCrocus_CWH_L1202200QP.jpg"

    }, .....

    {

        "self" : "https://api.colorblends.com/v1/categories/red",

        "title" : "Red",

        “category_id” :  45,

        "type" :  "Bloom Color",

         "thumbnail" : "https://www.colorblends.com/img/media/prime/product/1229_BigRed_CWH8961QP.jpg"

     }, .....

]

                    

List Bulbs in One Category

Description

Returns a description of the category if available, a link to an icon for the category, and an array of the bulbs in a category.

Request

GET https://api.colorblends.com/v1/categories/{category}[?limit={limit}]

Authentication

No authentication necessary

Parameters

Name Example Description
category mid-spring-blooming |OR| 63 Required the category name | OR | category_id requested
limit 50 Optional, number of records to results to return at a time. Default is to return all results.

Response Fields

Field Description
name The name of the category
category_id A unique number identifier for the category
type The type of the category (genus, Shop By Bloom Time, Shop By Use, Bloom Color, Tulip Bulbs, or Daffodil Bulbs)
description A paragraph or more of text describing the category. May be empty.
count The number of bulbs in the category
bulbs An array of bulb objects in the category, including the name, bulb_id, thumbnail, number available, and link to the bulb details

Response


HTTP/1.1 200 OK

Content-Type: application/json

"self" : "https://api.colorblends.com/v1/categories/fragrant-daffodils",

"kind" :  "collection",

"category_id" :  76,

"name" : "Fragrant Daffodils",

"type"   :  "Daffodil Bulbs",

"description" : "Many daffodils offer scent as well as beauty. This unseen dimension makes them especially desirable as cut flowers.
                        Even the fragrant miniatures can be cut, so long as you have a tiny vase to hold them."

"count"   :  26,

"bulbs"  : [

    {

        "self" :  “https://api.colorblends.com/v1/bulbs/acropolis",

        "available" : -3000,

        “bulb_id” : 3805,

        “name” : “Acropolis”,

        “thumbnail”  :  “https://www.colorblends.com/img/media/prime/product/3805_Acropolis__CWH7851QP.jpg"

     },

     {

        “self” : “https://api.colorblends.com/v1/bulbs/actaea",

        "available" : 67025,

        “bulb_id” : 3017,

        “name” : “Actaea”,

        “thumbnail”  :  “https://www.colorblends.com/img/media/prime/product/3017_Actaea_CWH8122QP.jpg"

    },

    {

        “self” : “https://api.colorblends.com/v1/bulbs/avalanche",

        "available" : 425450,

        “bulb_id” : 3018,

        “name” : “Avalanche”,

        “thumbnail”  :  “https://www.colorblends.com/img/media/prime/product/3018_Avalanche_CWH_L1200199QP.jpg"

     },

    ...

 ]

                    

Obtain a Token

Description

Returns an access-token to pass in the header of any account request, which require authorization

Request

POST https://api.colorblends.com/v1/token

Parameters to be passed as json in the post request

Name Example Description
grant_type "password" Required The initial request for a token will be a password grant_type
client_id 123456 Required The unique client id provided for the application by Colorblends
client_secret CLIENT_SECRET Required The client secret provided for the application by Colorblends
username USERNAME Required The email address used as the unique username
password PASSWORD Required The user's password

OR

Name Example Description
grant_type "refresh_token" Required A new token can be requested without the username and password if you use the refresh token sent with the initial password request.
client_id 123456 Required The unique client id provided for the application by Colorblends
client_secret CLIENT_SECRET Required The client secret provided for the application by Colorblends
refresh_token REFRESH_TOKEN Required The refresh token returned in a password grant_type request

Response Fields

Field Description
token_type The authorization type to return in the header of requests requiring authorization
expires_in Tokens expire in one hour. Use the refresh_token to obtain a new token.
access_token The token that needs to be passed with "Bearer" in the authorization header.
refresh_token Needs to be passed with a refresh_token type request for a token. Refresh tokens expire in one month.

Response



{
     "token_type":"Bearer",

     "expires_in":3600,

     "access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVkNzgxYzY3MmMzMWNhOGIwODFlNGMxNWM2ODJjOWRkMTZmOGIzY2Uy
                        ZDU1OTMxNDZkYzg5Y2M4ZDAwOTE0MTJmYjQyNmNhM2E4YzI2ZGY5In0.eyJhdWQiOiI0NTYwNjUiLCJqdGkiOiJlZDc4MWM2Nz
                        JjMzFjYThiMDgxZTRjMTVjNjgyYzlkZDE2ZjhiM2NlMmQ1NTkzMTQ2ZGM4OWNjOGQwMDkxNDEyZmI0MjZjYTNhOGMyNmRmOSIs
                        ImlhdCI6MTU0NTIzODU0MSwibmJmIjoxNTQ1MjM4NTQxLCJleHAiOjE1NDUyNDIxNDEsInN1YiI6IjUxNjgxNyIsInNjb3Blcy
                        I6W119.Q4tzncE-V-CearSDoW7UAtscb-zeZzWO1dHhNm-etdspOvc45hNiVNheJtOMpaO1vpxn2-8Gca22DW8Bzq0rUSEWq7OE
                        a_CRx-r8DVWLyHsEm7IGlrkPBuLkCEEQyMm0rgrTuOOPxTC9OxabbcU0dEPkS6swW536-rU0vtZWqPxKkg0NXxl2CcN1ZmVROji
                        YziXcKI1sGqVYf7qZLt6nEKuHuiKpGake7vG-UbMCf8TA1PlhQKPVdkEWSj8w7ws6_QrKjStaMdD-3aEXwRM723G2nftFUZafAP
                        svdP-pcBQn9SAHgJkxqr5WjSA7hCtkncZmaBVElnH7ZIaG7zrH-w",

     "refresh_token":"def5020015853783ca50b030850163c2a4218502ef41407a3cdef5fb50ce2decb561932f2169dec19f9a525103e44ed93537a
                        2ed2b46cec65a5feccfbb2877e51ac9e9b3c19b89be3ab048f54be9b2b594eb6f37e8a803718eb56725d2187401d7e0dfa3
                        f103d2cf381cb634980810f126b35939efb9037a01c96f9d483ebbdd8f44d6c18984eb706719962e338d3f83dd582e91c50
                        66d0735b490b3f1182612163c4e8dc4574a901e86c5cba84332ad769d14017286c79ff7822752174dff5b8f3e6aeeaf4e56
                        5fd5947170e097559c7abfac5cae4e2745e19c7b911d6ee6741cdfca347f5cec4fa6899977b42f319d672498e710a83159d
                        3172666ed4925cb9751fabb10563e39816db8359091679bfb3311b96f7e3826b11f03e46e70c81dd537b7b8a67b6e341533
                        0abeba5b84d05e446987859640d5c2ddaab1bc5c1d140fb304efb3730c0cb7d595d08e841c2f0fd2719f00da63572dfb0f5
                        b1fe1bb5a56a7d3d1a58dbfdec0978d"
}
                    

List Account Details

Description

Returns all of the account information, including users and gardens

Request

GET https://api.colorblends.com/v1/accounts

Authentication

Access token must be passed in the request header. User must have admin scope.

Authorization : Bearer ACCESS_TOKEN

Content-Type : application/json

Parameters

Name Example Description
account_id 123456 Required company account number

Response Fields

Field Description
account_id The unique identifier for the company account
users An array of the users associated with the account
logo A source link to the company logo
address The address of the company
gardens An array of the gardens saved under the account

Response


{
   "user":

       {
            "sdus_user_id":"1843",

            "sdus_account_id":"532653",

            "sdus_username":"landscapes",

            "sdus_email":"landscapes1@landscapingllc.com",

            "sdus_password":"",

            "sdus_admin":"1",

            "sdus_firstname":"Jaime Plant",

            "sdus_lastname":"Head Designer",

            "sdus_boolean1":null,

            "sdus_string1":null,

            "sdus_integer1":null,

            "sdus_date_created":"2019-05-07 09:08:02",

            "sdus_date_modified":"2019-05-10 16:43:37"
        },

   "account":

        {
            "sdac_account_id":"532653",

            "sdac_company_name":"Landscaping LLC",

            "sdac_zip":"",

            "sdac_address":"123 Main St., Town, CT 00000",

            "sdac_telephone":"(555) 555-5555",

            "sdac_logo_src":"5cd1887287636.jpg",

            "sdac_logo_path":null,

            "sdac_url":"http:\/\/www.landscaping.com",

            "sdac_sales":null,

            "sdac_string1":null,

            "sdac_integer":null,

            "sdac_boolean":null,

            "sdac_date_created":"2019-05-07 09:08:02",

            "sdac_date_modified":"2019-05-10 16:45:12",

            "users":[
                        {

                            "sdus_user_id":"1871",

                            "sdus_account_id":"532653",

                            "sdus_username":"landscapes3",

                            "sdus_email":"landscapes3@landscapingllc.com",

                            "sdus_password":"",

                            "sdus_admin":"1",

                            "sdus_firstname":"Pat",

                            "sdus_lastname":"Sage",

                            "sdus_boolean1":null,

                            "sdus_string1":null,

                            "sdus_integer1":null,

                            "sdus_date_created":"2019-05-10 16:44:37",

                            "sdus_date_modified":"2019-05-10 16:45:02"

                        },

                        {

                            "sdus_user_id":"1844",

                            "sdus_account_id":"532653",

                            "sdus_username":"landscapes2",

                            "sdus_email":"landscapes2@landscapingllc.com",

                            "sdus_password":"",

                            "sdus_admin":"1",

                            "sdus_firstname":"Robin Grass",

                            "sdus_lastname":"Designer",

                            "sdus_boolean1":null,

                            "sdus_string1":null,

                            "sdus_integer1":null,

                            "sdus_date_created":"2019-05-07 09:42:11",

                            "sdus_date_modified":"2019-05-10 16:43:51"

                        }

                   ]

        },

   "gardens":[

               {

                   "sdgr_user_id":"1844",

                   "sdgr_garden_id":"79",

                   "sdgr_name":"Fifth Avenue Sidewalk Planting",

                   "sdgr_account_id":"532653",

                   "self":"\/accounts\/532653\/gardens\/79",

                   "bulbcount":5,

                   "bulbs":[

                        {

                        "sdgl_garden_id":"79",

                        "sdgl_line_id":"756",

                        "sdgl_bulb_id":"1573",

                        "sdgl_memo":"",

                        "sdgl_qty":"0",

                        "name":"Chardonnay"

                        },

                        {

                        "sdgl_garden_id":"79",

                        "sdgl_line_id":"758",

                        "sdgl_bulb_id":"1247",

                        "sdgl_memo":"",

                        "sdgl_qty":"0","name":"Rainbow Coalition"

                        },

                        {

                        "sdgl_garden_id":"79",

                        "sdgl_line_id":"759",

                        "sdgl_bulb_id":"1237",

                        "sdgl_memo":null,

                        "sdgl_qty":"0",

                        "name":"Purdy"

                        },

                        {

                        "sdgl_garden_id":"79",

                        "sdgl_line_id":"760",

                        "sdgl_bulb_id":"1217",

                        "sdgl_memo":null,

                        "sdgl_qty":"0",

                        "name":"Torch Song"

                        },

                        {

                        "sdgl_garden_id":"79",

                        "sdgl_line_id":"761",

                        "sdgl_bulb_id":"1513",

                        "sdgl_memo":null,

                        "sdgl_qty":"0",

                        "name":"White Cubed"

                        }

                   ]

               },

               {

                   "sdgr_user_id":"1843",

                   "sdgr_garden_id":"77",

                   "sdgr_name":"Smith Backyard",

                   "sdgr_account_id":"532653",

                   "self":"\/accounts\/532653\/gardens\/77",

                   "bulbcount":5,

                   "bulbs":[

                        {

                        "sdgl_garden_id":"77",

                        "sdgl_line_id":"743",

                        "sdgl_bulb_id":"1264",

                        "sdgl_memo":null,

                        "sdgl_qty":"0",

                        "name":"Big Ups"

                        },

                        {

                        "sdgl_garden_id":"77",

                        "sdgl_line_id":"744",

                        "sdgl_bulb_id":"1570",

                        "sdgl_memo":null,

                        "sdgl_qty":"0",

                        "name":"Boutonniere"

                        },

                        {

                        "sdgl_garden_id":"77",

                        "sdgl_line_id":"745",

                        "sdgl_bulb_id":"3750",

                        "sdgl_memo":null,

                        "sdgl_qty":"0",

                        "name":"Sunshine Boys"

                        },

                        {

                        "sdgl_garden_id":"77",

                        "sdgl_line_id":"746",

                        "sdgl_bulb_id":"4053",

                        "sdgl_memo":"I was thinking of these for around the gazebo",

                        "sdgl_qty":"0",

                        "name":"Hyacinth Blue Delta"

                        },

                        {

                        "sdgl_garden_id":"77",

                        "sdgl_line_id":"747",

                        "sdgl_bulb_id":"6019",

                        "sdgl_memo":null,

                        "sdgl_qty":"0",

                        "name":"Allium Globemaster"

                        }
                   ]
               }
            ]
}

                    

Add User to Account

Description

Add a user to a company account

Request

POST https://api.colorblends.com/v1/accounts/{account_id}

Authentication

Access token must be passed in the request header.

Authorization : Bearer ACCESS_TOKEN

Content-Type : application/json

Parameters to be passed as json in the post request

Name Example Description
username USERNAME The user's email address to use as a username
password PASSWORD A password
admin true OR false Whether or not a user should have administrative access to the account information

Response


HTTP/1.1 201 CREATED

                    

Create New Gardens

Description

Create new lists of bulbs, called gardens. Each garden must have a unique name of letters and/or numbers. Spaces are ok.

Request

POST https://api.colorblends.com/v1/accounts/{account_id}/gardens

Authentication

Access token must be passed in the request header. User can have either admin or user scope.

Authorization : Bearer ACCESS_TOKEN

Content-Type : application/json

Parameters

Name Example Description
account_id 123456 Account id of the company
names Smith,Reyes,Forest Hills,City Center Comma-separated list of unique garden names. Field to be passed as json in the post request
user_id 456789 Optional, pass this field as json to create the gardens for a different user. Must have admin privileges. Default is to create gardens for current user. Can only create gardens for one user at a time.

Response


HTTP/1.1 201 CREATED

                    

Add Bulbs to a Garden

Description

Adds bulbs to a garden, can pass either one bulb or a comma-separated list of multiple bulbs

Request

POST https://api.colorblends.com/v1/accounts/{account_id}/gardens/{garden}

Authentication

Access token must be passed in the request header. User can have either admin or user scope, but users only have access to their own gardens. Admins have access to all gardens in the account.

Authorization : Bearer ACCESS_TOKEN

Content-Type : application/json

Parameters to be passed as json in the post request

Name Example Description
account_id 123456 Account number of the company the user belongs to
garden forest-hills name of the garden where the bulbs should be saved, in lower case, any spaces replaced by hyphens
bulbs 3502,6039,1501 Comma-separated list of bulb_id's. Field to be passed as json in the post request

Response


HTTP/1.1 201 CREATED

                    

List Bulbs in a Garden

Description

Obtain an array of bulbs that are contained in a garden, including the name, bulb_id, thumbnail, list of categories the bulb belongs to, number available, and links to the bulb details

Request

GET https://api.colorblends.com/v1/accounts/{account_id}/gardens/{garden}

Authentication

Access token must be passed in the request header. User can have either admin or user scope, but users only have access to their own gardens. Admins have access to all gardens in the account.

Authorization : Bearer ACCESS_TOKEN

Content-Type : application/json

Parameters

Name Example Description
account_id 123456 Account number of the company the user belongs to
garden forest-hills name of the garden where the bulbs should be saved, in lower case, any spaces replaced by hyphens

Response Fields

Field Description
account_id A unique identifier for company account that the garden belongs to
garden_name The name of the garden
count Number of bulbs in the garden
bulbs An array of bulbs, including its bulb_id, name, thumbnail, available, categories, and link to bulb details

Response


HTTP/1.1 200 OK

Content-Type: application/json

"self" : "https://api.colorblends.com/v1/accounts/57136/gardens/forest-hills",

"garden_name" :  "Forest Hills,

"count"   :  3,

"bulbs"  : [

    {

         “self” : “https://api.colorblends.com/v1/bulbs/best-purple",

          “bulb_id” : 1504,

          “name” : “Best Purple”,

          “thumbnail”  :  “https://www.colorblends.com/img/media/prime/product/1504_BestPurple_CWH4017Q.jpg",

          "available" : 0,

          "categories" : "Tulip Bulbs,Singles,Purple,For The South"

     },
     {

           “self” : “https://api.colorblends.com/bulbs/flair”,

           “bulb_id” : 1016,

           “name” : “Flair”,

           “thumbnail” : “https://www.colorblends.com/img/media/prime/product/1011_BakeriLilacWonder_CWH_L1001871q.jpg”,

           “available” : 9950,

           “categories” : “Tulip Bulbs,Singles,Red,Yellow,Early Mid Spring Blooming,For the South"

     },

     {

          “self” : “https://api.colorblends.com/v1/bulbs/actaea",

          “bulb_id” : 3017,

          “name” : “Actaea”,

          “thumbnail”  :  “https://www.colorblends.com/img/media/prime/product/3017_Actaea_CWH8122QP.jpg",

          "available" : 67025,

          "categories" : "Daffodil Bulbs,Uncommon Daffodils,White,Mid Late Spring Blooming,Good For Cut Flowers, For Naturalizing"

    }

]

                    

Delete a Bulb from a Garden

Description

Method removes bulbs from a garden

Request

DELETE https://api.colorblends.com/v1/accounts/{account_id}/gardens/{garden}

Authentication

Access token must be passed in the request header. User can have either admin or user scope, but users only have access to their own gardens. Admins have access to all gardens in the account.

Authorization : Bearer ACCESS_TOKEN

Content-Type : application/json

Parameters

Name Example Description
account_id 123456 Account number of the company the user belongs to
garden forest-hills name of the garden where the bulbs should be saved, in lower case, any spaces replaced by hyphens
bulbs 3502,6039,1501 Comma-separated list of bulb_id's to remove. Field to be passed as json in the delete request

Response


HTTP/1.1 204 BULBS DELETED