All Projects → chitchats → chitchats-api-doc

chitchats / chitchats-api-doc

Licence: other
Documentation for the Chit Chats API

Projects that are alternatives of or similar to chitchats-api-doc

chappe
🧑‍💻 Developer Docs builder. Write guides in Markdown and references in API Blueprint. Comes with a built-in search engine.
Stars: ✭ 132 (+528.57%)
Mutual labels:  api-documentation
mkapi
A documentation generation tool for MkDocs.
Stars: ✭ 68 (+223.81%)
Mutual labels:  api-documentation
Custom-Software-For-Xiaomi-Dafang
API and panel site for Xiaomi Dafang
Stars: ✭ 36 (+71.43%)
Mutual labels:  api-documentation
docodile
Generate HTML API documentation from a Postman collection
Stars: ✭ 63 (+200%)
Mutual labels:  api-documentation
blue bird
API Documentation Generator for the Phoenix Framework
Stars: ✭ 52 (+147.62%)
Mutual labels:  api-documentation
wow-api-docs
An in-game graphical browser for Blizzard's API Documentation
Stars: ✭ 16 (-23.81%)
Mutual labels:  api-documentation
platform
Apinf - Open source API management platform with multi proxy and protocol support
Stars: ✭ 69 (+228.57%)
Mutual labels:  api-documentation
eoLinker
在线 API 研发管理测试工具,最后能用的开源修复版本(4.0.1本地测试插件兼容3.5与4.0版本)。
Stars: ✭ 62 (+195.24%)
Mutual labels:  api-documentation
doc
The bunq API documentation
Stars: ✭ 18 (-14.29%)
Mutual labels:  api-documentation
idoc
📒📚Generate beautiful interactive documentation and Open-API 3.0 spec file from your existing Laravel app.
Stars: ✭ 95 (+352.38%)
Mutual labels:  api-documentation
tripletex-api2
Tripletex API 2 resources and examples
Stars: ✭ 32 (+52.38%)
Mutual labels:  api-documentation
RebillyAPI
Archived and moved into the monorepo https://github.com/Rebilly/api-definitions
Stars: ✭ 51 (+142.86%)
Mutual labels:  api-documentation
vim-www
Toolbox to open & search URLs from vim
Stars: ✭ 32 (+52.38%)
Mutual labels:  api-documentation
swagger-rb
Swagger parser for Ruby (WARNING: see issue #19)
Stars: ✭ 38 (+80.95%)
Mutual labels:  api-documentation
webapi
WAI based library for web api
Stars: ✭ 27 (+28.57%)
Mutual labels:  api-documentation
ad integration
Documentação para a Importação de Anúncios (API, JSON e XML) da OLX Brasil
Stars: ✭ 36 (+71.43%)
Mutual labels:  api-documentation
notary
A contracts broker that provides a declarative way of sharing, validating & discovering contracts between multiple projects.
Stars: ✭ 16 (-23.81%)
Mutual labels:  api-documentation
node-slate
📓 Node.js port of lord/slate
Stars: ✭ 18 (-14.29%)
Mutual labels:  api-documentation
phpdoc-vuepress
🎨 Template for generating your PHP API documentation in a pretty VuePress format
Stars: ✭ 19 (-9.52%)
Mutual labels:  api-documentation
reslate
Beautiful static documentation for your API
Stars: ✭ 98 (+366.67%)
Mutual labels:  api-documentation

The Chit Chats API

Welcome to the Chit Chats API! If you're looking to integrate your application with Chit Chats or create your own application in concert with data inside of Chit Chats, you're in the right place. We're happy to have you!

API Access Tokens

To use the API you will need to create an API Access Token. You can do this from the Settings > Account page once you are signed into Chit Chats.

Making a request

All URLs start with https://chitchats.com/api/v1/. URLs are HTTPS only.

To make a request for all the shipments on your account, use your client ID in the URL replacing the 999999 placeholder to form something like https://chitchats.com/api/v1/clients/999999/shipments. In cURL, it looks like this:

curl -H "Authorization: $ACCESS_TOKEN" \
  "https://chitchats.com/api/v1/clients/999999/shipments"

To create something, it's the same idea, but you also have to include the Content-Type header and the JSON data:

curl -X POST \
  -H "Authorization: $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Jane Doe",
    "address_1": "123 ANYWHERE ST.",
    "city": "Vancouver",
    "province_code": "BC",
    "postal_code": "V6K 1A1",
    "country_code": "CA",
    "description": "Hand made bracelet",
    "value": "85",
    "value_currency": "usd",
    "package_type": "parcel",
    "size_unit": "cm",
    "size_x": 10,
    "size_y": 5,
    "size_z": 2.5,
    "weight_unit": "g",
    "weight": 250,
    "postage_type": "chit_chats_canada_tracked",
    "ship_date": "today"
  }' \
  "https://chitchats.com/api/v1/clients/999999/shipments"

Throughout the Chit Chats API docs, we include "Copy as cURL" examples. To try the examples in your shell, copy your access token into your clipboard and run:

export ACCESS_TOKEN=PASTE_ACCESS_TOKEN_HERE
export CLIENT_ID=999999

Then you should be able to copy/paste any example from the docs. After pasting a cURL example, you can pipe it to a JSON pretty printer to make it more readable. Try jsonpp or json_pp on OSX:

curl -s -H "Authorization: $ACCESS_TOKEN" "https://chitchats.com/api/v1/clients/$CLIENT_ID/shipments" | json_pp

Authentication

Before you can use the API you must first create an API access token. You do this from the Settings > Account section of the Chit Chats website. Treat the access tokens as passwords and do not share them or check them into source code repositories. Deleting an access token will immediately revoke access.

Once you have an access token you must pass it in the Authorization header with every request.

JSON only

We use JSON for all API data. The style is no root element and snake_case for object keys. This means that you have to send the Content-Type header Content-Type: application/json; charset=utf-8 when you're POSTing or PUTing data into Chit Chats.

You'll receive a 415 Unsupported Media Type response code if you don't include the Content-Type header or you try to use a URL suffix other than .json.

Pagination

Most collection APIs paginate their results. The default is usually 100. The limit can be increased to 1000. Use the limit and page URL parameters to control pagination or the count endpoint to get the number of records in a collection.

Handling errors

If Chit Chats is having trouble, you might get a 5xx error. 500 means that the application is entirely down, but 502 Bad Gateway, 503 Service Unavailable, or 504 Gateway Timeout errors are also possible. In all of these cases, it's your responsibility to retry your request later.

Rate limiting

You can perform up to 2000 requests per 5 minute period from the same IP address for the same account. If you exceed this limit, you'll get a 429 Too Many Requests response for subsequent requests. Check the Retry-After header to learn how many seconds to wait before retrying the request.

We recommend baking 429 response-handling in to your HTTP handling at a low level so your integration handles retries gracefully and automatically.

Testing

We run a testing/sandbox site at https://staging.chitchats.com that you can use to test your API integration without actually buying postage. You will need to create a separate account on this site to use it. To add credits use credit card number 4111 1111 1111 1111 with any expiry and CVC.

API endpoints

Examples

Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in discussions about the Chit Chats API, you agree to abide by these terms.

License

These API docs are licensed under Creative Commons (CC BY-SA 4.0). Please share, remix, and distribute as you see fit.

Thanks to Basecamp for providing a starting point for documenting an API.


If you have a specific feature request or find a bug, please open a GitHub issue. We encourage you to fork these docs for local reference and happily accept pull requests with improvements.

To talk with us and other developers about the API, post a question on StackOverflow tagged chitchats. If you need help from us directly, please open a support ticket.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].