API Overview

Base Endpoints

The endpoint for this API is http[s]://domain.com/marketplace/api/v1/ for the default market for the site. URIs mentioned in this document are relative to this location.

The general format for API endpoints:

/{app_label}/{model_name}/[{custom_handler}/][{object_id}/]
Format Resource type Methods
/{app_label}/{model_name}/ {Object list} GET, POST
/{app_label}/{model_name}/{object_id} {Object} GET, PUT, DELETE
/{app_label}/{model_name}/{custom_handler}/ {Object list} GET
/{app_label}/{model_name}/schema/ {Object Schema} GET

For example, to retrieve a list of businesses:

-> GET /marketplace/api/v1/business/business/
.. Content-Type: application/json

<- 200 OK
{
  ‘objects’: [{Business}, ...],
  ‘meta’: {...}
}

To retrieve a specific business with id #123:

-> GET /marketplace/api/v1/business/business/123/
.. Content-Type: application/json

<- 200 OK
{Business}

To create a business, POST a dictionary to the base resource URI:

-> POST /marketplace/api/v1/business/business/
.. Content-Type: application/json
..
.. {Business}

<- 201 CREATED

To update a business, PUT a dictionary with updates to the object resource URI:

-> PUT /marketplace/api/v1/business/business/123/
.. Content-Type: application/json
..
.. {Business}

<- 204 NO CONTENT

To delete a business, DELETE the business URI:

-> DELETE /marketplace/api/v1/business/business/123/

<- 204 NO CONTENT

All Endpoints

URI Resource Methods Notes
/ads/ads/ {Ad} list GET, POST  
/ads/ads/{object_id}/ {Ad} GET, PUT, DELETE  
/ads/ads/near/ {Ad} list GET See Geo Queries
/ads/fullads/ {Full Ad} list GET, POST  
/ads/fullads/{object_id}/ {Full Ad} GET, PUT, DELETE  
/ads/fullads/near/ {Full Ad} list GET See Geo Queries
/business/business/ {Business} list GET, POST  
/business/business/search/ {Business} results GET Full-text search
/business/business/{object_id}/ {Business} GET, PUT, DELETE  
/business/business/near/ {Business} list GET See Geo Queries
/categories/categories/ {Category} list GET, POST  
/categories/categories/{object_id}/ {Category} GET, PUT, DELETE  
/markets/markets/ {Market} list GET, POST  
/markets/markets/{object_id}/ {Market} GET, PUT, DELETE  
/mp_events/events/ {Event} list GET, POST  
/mp_events/events/search/ {Event} results GET  
/mp_events/events/{object_id}/ {Event} GET, PUT, DELETE  
/mp_events/events/near/ {Event} list GET See Geo Queries
/mp_news/posts/ {Post} list GET, POST  
/mp_news/posts/{object_id}/ {Post} GET, PUT, DELETE  
/mp_photos/photos/ {Photo} list GET, POST,  
/mp_photos/photos/{object_id}/ {Photo} GET, PUT, DELETE  
/mp_photos/photos/near/ {Photo} list GET See Geo Queries
/products/products/ {Product} list GET, POST  
/products/products/{object_id}/ {Product} GET, PUT, DELETE  
/products/products/near/ {Photo} list GET See Geo Queries
/reviews/reviews/ {Review} list GET, POST, Filter by user, staff, or both.
/reviews/reviews/{object_id}/ {Review} GET, PUT, DELETE  
/videos/videos/ {Video} list GET, POST,  
/videos/videos/{object_id}/ {Video} GET, PUT, DELETE  
/videos/videos/near/ {Video} list GET See Geo Queries

Note

Each API endpoint also accepts OPTIONS which will determine which methods are supported.

Authentication

  • Allow anonymous access to public information for each resource (GET method only).
  • Allow full read/write access to all information for each resource when authenticated with HTTP Basic Auth.

Note

See Authentication for more information.

Home

Browse

Glossary

You are here:

This Page