Introduction

CurdBee provides easy access to all your data via a JSON and XML-based RESTful API. With the API, you can access to following resource types. Visit each section to learn about the actions available for them.

Available Resources

Getting Started

Though the CurdBee API is now public, no accounts have it enabled at the moment. Well be rolling out access on a case by case basis, so if youd like to get started right away, just login to CurdBee, go to Settings > Account Information and click on the Request API Accesslink. Your request will go into our queue and well review your account before granting or denying you access. We are putting this approval process in place because we want our most loyal users to be able to start developing without having to worry about server load and security issues. Of course, eventually the API will be available for everyone! Till then though, send those requests in and get coding right away.

Authentication

Authentication to the API is performed via the API token. Each user will have a unique API token. You can find your API token under Your Profile in your CurdBee account. You will need to append the api_tokenparameter to every request you make to the API.

Security First!

Due to security concerns, we recommend that you regenerate your API token periodically. You can do this by clicking the Regenerate link next to your API token under Your Profile.

URL

To access the API, you should use the full URL of your CurdBee acccount. Note: Custom domains will not work with the API. A request URL takes the following form:

    https://#{subdomain}.curdbee.com/#{resource URI}?api_token=#{api_token}

Heres how to make a sample request using cURL get the list of invoices.

    curl https://example.curdbee.com/invoices.json?api_token=XjAmHetAUZ7rNyRmEdIz

Response Formats

Depending on the type of data you requested via the HTTP Content-Type header or the type specified as being accepted via the HTTP Accept header, the responses will be formatted as JSON or XML. Response codes are sent via the normal HTTP Response Code, and are documented separately for each resource.

Error Types

The CurdBee API will respond with following HTTP status codes if an error occurs while processing your request. We expect the client code to catch these errors with a fallback mechanism.

401 – Access Denied

User is not authenticated. Please check whether you passed the correct api_tokenwith your request.

403 – Forbidden

You dont have access to the requested resource (e.g – a module is not enabled) or you have exceeded the maximum request rate (please read the Rate Limiting section)

422 – Bad Request

The request is not correctly formatted or is missing some parameters. Verify whether you have properly constructed the XML or JSON request and have included all the required parameters.

404 – Not Found

Requested resource is not available.

500 – Server Error

Something is wrong with the CurdBee server. Try again in a couple of minutes and if its a recurring error, please contact CurdBee support

Rate Limiting

Weve currently set a rate limit of 200 requests per hour to avoid unnecessary server load. Although this limit will be increased over the next few weeks, currently when the rate limit is exceeded CurdBee will send a HTTP 403 Forbidden status code. We thus advise you to design your applications to comply with this limitation.

Client Libraries, Samples & Integrations

For now, we have an official CurdBee gem for Ruby developers. To install the gem, run:

sudo gem install curdbee

If youd like to contribute, please check out our Github Repository. Are you working on a library or an integration based on CurdBee API? Let us know! Wed love to share it with rest of our community.

Vesess Web design & web application development - Sri Lanka

All text and design is copyright © 2008 - 2012 Vesess. All rights reserved.