Skip to content

Welcome to AlternateCMS Rest API documentation

What are Rest APIs?

AlternateCMS is built on Django and thus supports the Django Rest Framework. Django REST framework is a powerful and flexible toolkit for building Web APIs.

Some reasons you might want to use REST framework:

The Web browsable API is a huge usability win for your developers.

Authentication policies including packages for OAuth1a and OAuth2.

Serialization that supports both ORM and non-ORM data sources.

Customizable all the way down - just use regular function-based views if you don't need the more powerful features.

Extensive documentation, and great community support.

Used and trusted by internationally recognised companies including Mozilla, Red Hat, Heroku, and Eventbrite.

How to Access your Rest APIs

The fastest way to discover what is available in your application is by visiting localhost:8000/api-auth

Learn about the Django Rest Framework

Visit https://www.django-rest-framework.org/ for more information

Basic Usage of AlternateCMS Rest APIs

GET ​/api​/ api_list

GET ​/api​/basket​/ api_basket_list

POST ​/api​/basket​/add-product​/ Add a certain quantity of a product to the basket. api_basket_add-product_create

POST ​/api​/basket​/add-product{format} Add a certain quantity of a product to the basket. api_basket_create

POST ​/api​/basket​/add-voucher​/ Add a voucher to the basket. api_basket_add-voucher_create

POST ​/api​/basket​/add-voucher{format} Add a voucher to the basket. api_basket_create

GET ​/api​/basket​/shipping-methods​/ api_basket_shipping-methods_list

POST ​/api​/basket​/shipping-methods​/ api_basket_shipping-methods_create

GET ​/api​/basket​/shipping-methods{format} api_basket_read

POST ​/api​/basket​/shipping-methods{format} api_basket_create

GET ​/api​/baskets​/ api_baskets_list

GET ​/api​/baskets​/{basket_pk}​/lines​/{id}​/ api_baskets_lines_read

PUT ​/api​/baskets​/{basket_pk}​/lines​/{id}​/ api_baskets_lines_update

PATCH ​/api​/baskets​/{basket_pk}​/lines​/{id}​/ api_baskets_lines_partial_update

DELETE ​/api​/baskets​/{basket_pk}​/lines​/{id}​/ api_baskets_lines_delete

GET ​/api​/baskets​/{basket_pk}​/lines​/{id}{format} api_baskets_lines_read

PUT ​/api​/baskets​/{basket_pk}​/lines​/{id}{format} api_baskets_lines_update

PATCH ​/api​/baskets​/{basket_pk}​/lines​/{id}{format} api_baskets_lines_partial_update

DELETE ​/api​/baskets​/{basket_pk}​/lines​/{id}{format} api_baskets_lines_delete

GET ​/api​/baskets​/{basket_pk}​/lines​/{line_pk}​/lineattributes​/{id}​/ api_baskets_lines_lineattributes_read

PUT ​/api​/baskets​/{basket_pk}​/lines​/{line_pk}​/lineattributes​/{id}​/ api_baskets_lines_lineattributes_update

PATCH ​/api​/baskets​/{basket_pk}​/lines​/{line_pk}​/lineattributes​/{id}​/ api_baskets_lines_lineattributes_partial_update

GET ​/api​/baskets​/{basket_pk}​/lines​/{line_pk}​/lineattributes​/{id}{format} api_baskets_lines_lineattributes_read

PUT ​/api​/baskets​/{basket_pk}​/lines​/{line_pk}​/lineattributes​/{id}{format} api_baskets_lines_lineattributes_update

PATCH ​/api​/baskets​/{basket_pk}​/lines​/{line_pk}​/lineattributes​/{id}{format} api_baskets_lines_lineattributes_partial_update

GET ​/api​/baskets​/{id}​/ api_baskets_read

PUT ​/api​/baskets​/{id}​/ api_baskets_update

PATCH ​/api​/baskets​/{id}​/ api_baskets_partial_update

DELETE ​/api​/baskets​/{id}​/ api_baskets_delete

GET ​/api​/baskets​/{id}​/lines​/ Api for adding lines to a basket. api_baskets_lines_list

POST ​/api​/baskets​/{id}​/lines​/ Api for adding lines to a basket. api_baskets_lines_create

GET ​/api​/baskets​/{id}​/lines{format} Api for adding lines to a basket. api_baskets_read

POST ​/api​/baskets​/{id}​/lines{format} Api for adding lines to a basket. api_baskets_create

GET ​/api​/baskets​/{id}{format} api_baskets_read

PUT ​/api​/baskets​/{id}{format} api_baskets_update

PATCH ​/api​/baskets​/{id}{format} api_baskets_partial_update

DELETE ​/api​/baskets​/{id}{format} api_baskets_delete

GET ​/api​/baskets{format} api_read

GET ​/api​/basket{format} api_read

GET ​/api​/categories​/ api_categories_list

GET ​/api​/categories​/{breadcrumbs}​/ api_categories_read

GET ​/api​/categories​/{id}​/ api_categories_read

GET ​/api​/categories​/{id}{format} api_categories_read

GET ​/api​/categories{format} api_read

POST ​/api​/checkout​/ Prepare an order for checkout. api_checkout_create

POST ​/api​/checkout{format} Prepare an order for checkout. api_create

GET ​/api​/countries​/ api_countries_list

GET ​/api​/countries​/{iso_3166_1_a2}​/ api_countries_read

GET ​/api​/countries{format} api_read

GET ​/api​/login​/ api_login_list

POST ​/api​/login​/ api_login_create

DELETE ​/api​/login​/ Destroy the session. api_login_delete

GET ​/api​/login{format} api_read

POST ​/api​/login{format} api_create

DELETE ​/api​/login{format} Destroy the session. api_delete

GET ​/api​/options​/ api_options_list

GET ​/api​/options​/{id}​/ api_options_read

GET ​/api​/options​/{id}{format} api_options_read

GET ​/api​/options{format} api_read

GET ​/api​/orderlineattributes​/{id}​/ api_orderlineattributes_read

GET ​/api​/orderlineattributes​/{id}{format} api_orderlineattributes_read

GET ​/api​/orderlines​/{id}​/ api_orderlines_read

GET ​/api​/orderlines​/{id}{format} api_orderlines_read

GET ​/api​/orders​/ api_orders_list

GET ​/api​/orders​/{id}​/ api_orders_read

GET ​/api​/orders​/{id}​/lines​/ api_orders_lines_list

GET ​/api​/orders​/{id}​/lines{format} api_orders_read

GET ​/api​/orders​/{id}{format} api_orders_read

GET ​/api​/orders{format} api_read

GET ​/api​/products​/ api_products_list

GET ​/api​/products​/{id}​/ api_products_read

GET ​/api​/products​/{id}​/availability​/ api_products_availability_read

GET ​/api​/products​/{id}​/availability{format} api_products_read

GET ​/api​/products​/{id}​/price​/ api_products_price_read

GET ​/api​/products​/{id}​/price{format} api_products_read

GET ​/api​/products​/{id}​/stockrecords​/ api_products_stockrecords_list

GET ​/api​/products​/{id}​/stockrecords{format} api_products_read

GET ​/api​/products​/{id}{format} api_products_read

GET ​/api​/products​/{product_pk}​/stockrecords​/{id}​/ api_products_stockrecords_read

GET ​/api​/products​/{product_pk}​/stockrecords​/{id}{format} api_products_stockrecords_read

GET ​/api​/products{format} api_read

GET ​/api​/ranges​/ api_ranges_list

GET ​/api​/ranges​/{id}​/ api_ranges_read

GET ​/api​/ranges​/{id}{format} api_ranges_read

GET ​/api​/ranges{format} api_read

POST ​/api​/register​/ API for registering users api_register_create

POST ​/api​/register{format} API for registering users api_create

GET ​/api​/useraddresses​/ api_useraddresses_list

POST ​/api​/useraddresses​/ api_useraddresses_create

GET ​/api​/useraddresses​/{id}​/ api_useraddresses_read

PUT ​/api​/useraddresses​/{id}​/ api_useraddresses_update

PATCH ​/api​/useraddresses​/{id}​/ api_useraddresses_partial_update

DELETE ​/api​/useraddresses​/{id}​/ api_useraddresses_delete

GET ​/api​/useraddresses​/{id}{format} api_useraddresses_read

PUT ​/api​/useraddresses​/{id}{format} api_useraddresses_update

PATCH ​/api​/useraddresses​/{id}{format} api_useraddresses_partial_update

DELETE ​/api​/useraddresses​/{id}{format} api_useraddresses_delete

GET ​/api​/useraddresses{format} api_read

POST ​/api​/useraddresses{format} api_create

GET ​/api​/users​/{id}​/ api_users_read

GET ​/api​/users​/{id}{format} api_users_read

GET ​/api​/{format} api_read

comments

POST ​/comments​/api​/comment​/ comments_api_comment_create

POST ​/comments​/api​/feedback​/ comments_api_feedback_create

POST ​/comments​/api​/flag​/ comments_api_flag_create

POST ​/comments​/api​/preview​/ comments_api_preview_create

GET ​/comments​/api​/{content_type}​/{object_pk}​/ comments_api_read

GET ​/comments​/api​/{content_type}​/{object_pk}​/count​/ comments_api_count_list

To get all of your Rest APIs, travel to https://(your-domain)/swagger or if hosted locally go to http://localhost:8000/swagger/

Comments