1. Catalog REST API
1.1. General Jeeshop REST principles
1.1.1. Methods
Method | Operations |
---|---|
GET |
Get a single resource or get a collection of resources. |
POST |
Create a new resource. |
PUT |
Update properties of an existing resource. |
DELETE |
Delete an existing resource. |
HEAD |
Check authentication credentials. (Only available on User resource) |
The media-type of HTTP requests should be set to application/json.
The media-type of HTTP responses is always application/json unless binary content is requested (eg. deployment resource data), the media-type of the content is used.
Items relationships are always lazy loaded and must be explicitly requested to get them. (they are not eagerly fetched)
1.1.2. Authentication and authorization
Jeeshop REST API operations are protected by role based access. Therefore, most of REST operations require authentication.
Jeeshop authentication and authorization are managed using JaaS. See this documentation for details about Jeeshop JaaS configuration on Wildfly application server.
Currently, only Basic HTTP access authentication is documented, so you should include a Authorization: Basic ...== HTTP-header when performing requests to API methods which are not public.
For security purpose we only allow Basic Authentication in combination with HTTPS. See this documentation for details about Jeeshop SSL configuration on Wildfly application server. |
Each REST operation documentation declares one or many roles which are required for method use :
-
admin - Role dedicated to admin / back office operations. (Typically, it has to be set on Jeeshop administrators accounts for Jeeshop-Admin application use)
-
user - Default role bound to Jeeshop users. (Every online store registered users have this role)
-
ALL - Public. Methods which declare this role are public. Authentication is not required for their use.
1.2. Catalogs resource
Manages catalog items and their relationships.
1.2.1. Get all catalog items
URL |
/rs/catalogs |
||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Method |
GET |
||||||||||||||||||
Roles allowed |
admin |
||||||||||||||||||
Parameters |
|
||||||||||||||||||
Response HTTP statuses |
|
||||||||||||||||||
Response Body |
|
1.2.2. Get catalog items count
URL |
/rs/catalogs/count |
||||||
---|---|---|---|---|---|---|---|
Method |
GET |
||||||
Roles allowed |
admin |
||||||
Parameters |
|
||||||
Response HTTP statuses |
|
||||||
Response Body |
Unresolved directive in <stdin> - include::snippets/catalog_count.json.adoc[] |
1.2.3. Get a specific catalog
URL |
/rs/catalogs/[id] |
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Method |
GET |
|||||||||
Roles allowed |
ALL |
|||||||||
Parameters |
|
|||||||||
Response HTTP statuses |
|
|||||||||
Response Body |
|
1.2.4. Create a catalog
URL |
/rs/catalogs |
||||||
---|---|---|---|---|---|---|---|
Method |
POST |
||||||
Roles allowed |
admin |
||||||
Parameters |
|
||||||
Request Body |
|
||||||
Response HTTP statuses |
|
||||||
Response Body |
|
1.2.5. Modify a catalog
URL |
/rs/catalogs |
||||||
---|---|---|---|---|---|---|---|
Method |
PUT |
||||||
Roles allowed |
admin |
||||||
Parameters |
|
||||||
Request Body |
|
||||||
Response HTTP statuses |
|
||||||
Response Body |
|
1.2.6. Delete a catalog
URL |
/rs/catalogs/[id] |
||||||
---|---|---|---|---|---|---|---|
Method |
DELETE |
||||||
Roles allowed |
admin |
||||||
Parameters |
|
||||||
Response HTTP statuses |
|
1.2.7. Get catalog related locales
URL |
/rs/catalogs/[id]/presentationslocales |
||||||
---|---|---|---|---|---|---|---|
Method |
GET |
||||||
Roles allowed |
admin |
||||||
Parameters |
|
||||||
Response HTTP statuses |
|
||||||
Response Body |
|
1.2.8. Get catalog localized content
URL |
/rs/catalogs/[id]/presentations/[locale] |
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Method |
GET |
|||||||||
Roles allowed |
ALL |
|||||||||
Parameters |
|
|||||||||
Response HTTP statuses |
|
|||||||||
Response Body |
|
1.2.9. Delete catalog localized content
URL |
/rs/catalogs/[id]/presentations/[locale] |
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Method |
DELETE |
|||||||||
Roles allowed |
admin |
|||||||||
Parameters |
|
|||||||||
Response HTTP statuses |
|
|||||||||
Response Body |
|
1.2.10. Create catalog localized content
URL |
/rs/catalogs/[id]/presentations/[locale] |
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Method |
POST |
||||||||||||
Roles allowed |
admin |
||||||||||||
Parameters |
|
||||||||||||
Request Body |
|
||||||||||||
Response HTTP statuses |
|
||||||||||||
Response Body |
|
1.2.11. Modify catalog localized content
URL |
/rs/catalogs/[id]/presentations/[locale] |
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Method |
PUT |
||||||||||||
Roles allowed |
admin |
||||||||||||
Parameters |
|
||||||||||||
Request Body |
|
||||||||||||
Response HTTP statuses |
|
||||||||||||
Response Body |
|
1.2.12. Get catalog related categories
URL |
/rs/catalogs/[id]/categories |
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Method |
GET |
|||||||||
Roles allowed |
All |
|||||||||
Parameters |
|
|||||||||
Response HTTP statuses |
|
|||||||||
Response Body |
|
1.3. Categories resource
Manages category items and their relationships.
1.3.1. Get all category items
URL |
/rs/categories |
||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Method |
GET |
||||||||||||||||||
Roles allowed |
admin |
||||||||||||||||||
Parameters |
|
||||||||||||||||||
Response HTTP statuses |
|
||||||||||||||||||
Response Body |
|
1.3.2. Get category items count
URL |
/rs/categories/count |
||||||
---|---|---|---|---|---|---|---|
Method |
GET |
||||||
Roles allowed |
admin |
||||||
Parameters |
|
||||||
Response HTTP statuses |
|
||||||
Response Body |
Unresolved directive in <stdin> - include::snippets/category_count.json.adoc[] |
1.3.3. Get a specific category
URL |
/rs/categories/[id] |
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Method |
GET |
|||||||||
Roles allowed |
ALL |
|||||||||
Parameters |
|
|||||||||
Response HTTP statuses |
|
|||||||||
Response Body |
|
1.3.4. Create a category
URL |
/rs/categories |
||||||
---|---|---|---|---|---|---|---|
Method |
POST |
||||||
Roles allowed |
admin |
||||||
Parameters |
|
||||||
Request Body |
|
||||||
Response HTTP statuses |
|
||||||
Response Body |
|
1.3.5. Modify a category
URL |
/rs/categories |
||||||
---|---|---|---|---|---|---|---|
Method |
PUT |
||||||
Roles allowed |
admin |
||||||
Parameters |
|
||||||
Request Body |
|
||||||
Response HTTP statuses |
|
||||||
Response Body |
|
1.3.6. Delete a category
URL |
/rs/categories/[id] |
||||||
---|---|---|---|---|---|---|---|
Method |
DELETE |
||||||
Roles allowed |
admin |
||||||
Parameters |
|
||||||
Response HTTP statuses |
|
1.3.7. Get category related locales
URL |
/rs/categories/[id]/presentationslocales |
||||||
---|---|---|---|---|---|---|---|
Method |
GET |
||||||
Roles allowed |
admin |
||||||
Parameters |
|
||||||
Response HTTP statuses |
|
||||||
Response Body |
|
1.3.8. Get category localized content
URL |
/rs/categories/[id]/presentations/[locale] |
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Method |
GET |
|||||||||
Roles allowed |
ALL |
|||||||||
Parameters |
|
|||||||||
Response HTTP statuses |
|
|||||||||
Response Body |
|
1.3.9. Delete category localized content
URL |
/rs/categories/[id]/presentations/[locale] |
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Method |
DELETE |
|||||||||
Roles allowed |
admin |
|||||||||
Parameters |
|
|||||||||
Response HTTP statuses |
|
|||||||||
Response Body |
|
1.3.10. Create category localized content
URL |
/rs/categories/[id]/presentations/[locale] |
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Method |
POST |
||||||||||||
Roles allowed |
admin |
||||||||||||
Parameters |
|
||||||||||||
Request Body |
|
||||||||||||
Response HTTP statuses |
|
||||||||||||
Response Body |
|
1.3.11. Modify category localized content
URL |
/rs/categories/[id]/presentations/[locale] |
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Method |
PUT |
||||||||||||
Roles allowed |
admin |
||||||||||||
Parameters |
|
||||||||||||
Request Body |
|
||||||||||||
Response HTTP statuses |
|
||||||||||||
Response Body |
|
1.3.12. Get category related categories
URL |
/rs/categories/[id]/categories |
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Method |
GET |
|||||||||
Roles allowed |
All |
|||||||||
Parameters |
|
|||||||||
Response HTTP statuses |
|
|||||||||
Response Body |
|
1.3.13. Get category related products
URL |
/rs/categories/[id]/products |
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Method |
GET |
|||||||||
Roles allowed |
All |
|||||||||
Parameters |
|
|||||||||
Response HTTP statuses |
|
|||||||||
Response Body |
|
1.4. Products resource
Manages product items and their relationships.
1.4.1. Get all product items
URL |
/rs/products |
||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Method |
GET |
||||||||||||||||||
Roles allowed |
admin |
||||||||||||||||||
Parameters |
|
||||||||||||||||||
Response HTTP statuses |
|
||||||||||||||||||
Response Body |
|
1.4.2. Get product items count
URL |
/rs/products/count |
||||||
---|---|---|---|---|---|---|---|
Method |
GET |
||||||
Roles allowed |
admin |
||||||
Parameters |
|
||||||
Response HTTP statuses |
|
||||||
Response Body |
Unresolved directive in <stdin> - include::snippets/product_count.json.adoc[] |
1.4.3. Get a specific product
URL |
/rs/products/[id] |
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Method |
GET |
|||||||||
Roles allowed |
ALL |
|||||||||
Parameters |
|
|||||||||
Response HTTP statuses |
|
|||||||||
Response Body |
|
1.4.4. Create a product
URL |
/rs/products |
||||||
---|---|---|---|---|---|---|---|
Method |
POST |
||||||
Roles allowed |
admin |
||||||
Parameters |
|
||||||
Request Body |
|
||||||
Response HTTP statuses |
|
||||||
Response Body |
|
1.4.5. Modify a product
URL |
/rs/products |
||||||
---|---|---|---|---|---|---|---|
Method |
PUT |
||||||
Roles allowed |
admin |
||||||
Parameters |
|
||||||
Request Body |
|
||||||
Response HTTP statuses |
|
||||||
Response Body |
|
1.4.6. Delete a product
URL |
/rs/products/[id] |
||||||
---|---|---|---|---|---|---|---|
Method |
DELETE |
||||||
Roles allowed |
admin |
||||||
Parameters |
|
||||||
Response HTTP statuses |
|
1.4.7. Get product related locales
URL |
/rs/products/[id]/presentationslocales |
||||||
---|---|---|---|---|---|---|---|
Method |
GET |
||||||
Roles allowed |
admin |
||||||
Parameters |
|
||||||
Response HTTP statuses |
|
||||||
Response Body |
|
1.4.8. Get product localized content
URL |
/rs/products/[id]/presentations/[locale] |
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Method |
GET |
|||||||||
Roles allowed |
ALL |
|||||||||
Parameters |
|
|||||||||
Response HTTP statuses |
|
|||||||||
Response Body |
|
1.4.9. Delete product localized content
URL |
/rs/products/[id]/presentations/[locale] |
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Method |
DELETE |
|||||||||
Roles allowed |
admin |
|||||||||
Parameters |
|
|||||||||
Response HTTP statuses |
|
|||||||||
Response Body |
|
1.4.10. Create product localized content
URL |
/rs/products/[id]/presentations/[locale] |
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Method |
POST |
||||||||||||
Roles allowed |
admin |
||||||||||||
Parameters |
|
||||||||||||
Request Body |
|
||||||||||||
Response HTTP statuses |
|
||||||||||||
Response Body |
|
1.4.11. Modify product localized content
URL |
/rs/products/[id]/presentations/[locale] |
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Method |
PUT |
||||||||||||
Roles allowed |
admin |
||||||||||||
Parameters |
|
||||||||||||
Request Body |
|
||||||||||||
Response HTTP statuses |
|
||||||||||||
Response Body |
|
1.4.12. Get product related skus
URL |
/rs/products/[id]/skus |
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Method |
GET |
|||||||||
Roles allowed |
All |
|||||||||
Parameters |
|
|||||||||
Response HTTP statuses |
|
|||||||||
Response Body |
|
1.4.13. Get product related discounts
URL |
/rs/products/[id]/discounts |
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Method |
GET |
|||||||||
Roles allowed |
All |
|||||||||
Parameters |
|
|||||||||
Response HTTP statuses |
|
|||||||||
Response Body |
|
1.5. Stock Keeping Units resource
Manages sku items and their relationships.
1.5.1. Get all sku items
URL |
/rs/skus |
||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Method |
GET |
||||||||||||||||||
Roles allowed |
admin |
||||||||||||||||||
Parameters |
|
||||||||||||||||||
Response HTTP statuses |
|
||||||||||||||||||
Response Body |
|
1.5.2. Get sku items count
URL |
/rs/skus/count |
||||||
---|---|---|---|---|---|---|---|
Method |
GET |
||||||
Roles allowed |
admin |
||||||
Parameters |
|
||||||
Response HTTP statuses |
|
||||||
Response Body |
Unresolved directive in <stdin> - include::snippets/sku_count.json.adoc[] |
1.5.3. Get a specific sku
URL |
/rs/skus/[id] |
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Method |
GET |
|||||||||
Roles allowed |
ALL |
|||||||||
Parameters |
|
|||||||||
Response HTTP statuses |
|
|||||||||
Response Body |
|
1.5.4. Create a sku
URL |
/rs/skus |
||||||
---|---|---|---|---|---|---|---|
Method |
POST |
||||||
Roles allowed |
admin |
||||||
Parameters |
|
||||||
Request Body |
|
||||||
Response HTTP statuses |
|
||||||
Response Body |
|
1.5.5. Modify a sku
URL |
/rs/skus |
||||||
---|---|---|---|---|---|---|---|
Method |
PUT |
||||||
Roles allowed |
admin |
||||||
Parameters |
|
||||||
Request Body |
|
||||||
Response HTTP statuses |
|
||||||
Response Body |
|
1.5.6. Delete a sku
URL |
/rs/skus/[id] |
||||||
---|---|---|---|---|---|---|---|
Method |
DELETE |
||||||
Roles allowed |
admin |
||||||
Parameters |
|
||||||
Response HTTP statuses |
|
1.5.7. Get sku related locales
URL |
/rs/skus/[id]/presentationslocales |
||||||
---|---|---|---|---|---|---|---|
Method |
GET |
||||||
Roles allowed |
admin |
||||||
Parameters |
|
||||||
Response HTTP statuses |
|
||||||
Response Body |
|
1.5.8. Get sku localized content
URL |
/rs/skus/[id]/presentations/[locale] |
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Method |
GET |
|||||||||
Roles allowed |
ALL |
|||||||||
Parameters |
|
|||||||||
Response HTTP statuses |
|
|||||||||
Response Body |
|
1.5.9. Delete sku localized content
URL |
/rs/skus/[id]/presentations/[locale] |
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Method |
DELETE |
|||||||||
Roles allowed |
admin |
|||||||||
Parameters |
|
|||||||||
Response HTTP statuses |
|
|||||||||
Response Body |
|
1.5.10. Create sku localized content
URL |
/rs/skus/[id]/presentations/[locale] |
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Method |
POST |
||||||||||||
Roles allowed |
admin |
||||||||||||
Parameters |
|
||||||||||||
Request Body |
|
||||||||||||
Response HTTP statuses |
|
||||||||||||
Response Body |
|
1.5.11. Modify sku localized content
URL |
/rs/skus/[id]/presentations/[locale] |
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Method |
PUT |
||||||||||||
Roles allowed |
admin |
||||||||||||
Parameters |
|
||||||||||||
Request Body |
|
||||||||||||
Response HTTP statuses |
|
||||||||||||
Response Body |
|
1.5.12. Get sku related discounts
URL |
/rs/skus/[id]/discounts |
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Method |
GET |
|||||||||
Roles allowed |
All |
|||||||||
Parameters |
|
|||||||||
Response HTTP statuses |
|
|||||||||
Response Body |
|
1.6. Discounts resource
Manages discount items and their relationships.
1.6.1. Get all discount items
URL |
/rs/discounts |
||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Method |
GET |
||||||||||||||||||
Roles allowed |
admin |
||||||||||||||||||
Parameters |
|
||||||||||||||||||
Response HTTP statuses |
|
||||||||||||||||||
Response Body |
|
1.6.2. Get discount items count
URL |
/rs/discounts/count |
||||||
---|---|---|---|---|---|---|---|
Method |
GET |
||||||
Roles allowed |
admin |
||||||
Parameters |
|
||||||
Response HTTP statuses |
|
||||||
Response Body |
Unresolved directive in <stdin> - include::snippets/discount_count.json.adoc[] |
1.6.3. Get a specific discount
URL |
/rs/discounts/[id] |
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Method |
GET |
|||||||||
Roles allowed |
admin |
|||||||||
Parameters |
|
|||||||||
Response HTTP statuses |
|
|||||||||
Response Body |
|
1.6.4. Create a discount
URL |
/rs/discounts |
||||||
---|---|---|---|---|---|---|---|
Method |
POST |
||||||
Roles allowed |
admin |
||||||
Parameters |
|
||||||
Request Body |
|
||||||
Response HTTP statuses |
|
||||||
Response Body |
|
1.6.5. Modify a discount
URL |
/rs/discounts |
||||||
---|---|---|---|---|---|---|---|
Method |
PUT |
||||||
Roles allowed |
admin |
||||||
Parameters |
|
||||||
Request Body |
|
||||||
Response HTTP statuses |
|
||||||
Response Body |
|
1.6.6. Delete a discount
URL |
/rs/discounts/[id] |
||||||
---|---|---|---|---|---|---|---|
Method |
DELETE |
||||||
Roles allowed |
admin |
||||||
Parameters |
|
||||||
Response HTTP statuses |
|
1.6.7. Get discount related locales
URL |
/rs/discounts/[id]/presentationslocales |
||||||
---|---|---|---|---|---|---|---|
Method |
GET |
||||||
Roles allowed |
admin |
||||||
Parameters |
|
||||||
Response HTTP statuses |
|
||||||
Response Body |
|
1.6.8. Get discount localized content
URL |
/rs/discounts/[id]/presentations/[locale] |
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Method |
GET |
|||||||||
Roles allowed |
ALL |
|||||||||
Parameters |
|
|||||||||
Response HTTP statuses |
|
|||||||||
Response Body |
|
1.6.9. Delete discount localized content
URL |
/rs/discounts/[id]/presentations/[locale] |
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Method |
DELETE |
|||||||||
Roles allowed |
admin |
|||||||||
Parameters |
|
|||||||||
Response HTTP statuses |
|
|||||||||
Response Body |
|
1.6.10. Create discount localized content
URL |
/rs/discounts/[id]/presentations/[locale] |
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Method |
POST |
||||||||||||
Roles allowed |
admin |
||||||||||||
Parameters |
|
||||||||||||
Request Body |
|
||||||||||||
Response HTTP statuses |
|
||||||||||||
Response Body |
|
1.6.11. Modify discount localized content
URL |
/rs/discounts/[id]/presentations/[locale] |
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Method |
PUT |
||||||||||||
Roles allowed |
admin |
||||||||||||
Parameters |
|
||||||||||||
Request Body |
|
||||||||||||
Response HTTP statuses |
|
||||||||||||
Response Body |
|
1.6.12. Get all eligible disounct items related to an order or an item
URL |
/rs/discounts/visible |
|||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Method |
GET |
|||||||||||||
Roles allowed |
ALL |
|||||||||||||
Parameters |
|
|||||||||||||
Response Body |
|
1.7. Medias resource
1.7.1. Get a specific media file
URL |
/rs/medias/[type]/[id]/[locale]/[filename] |
|||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Method |
GET |
|||||||||||||||
Roles allowed |
admin |
|||||||||||||||
Parameters |
|
|||||||||||||||
Response HTTP statuses |
|
1.7.2. Upload a media file
URL |
/rs/medias/[type]/[id]/[locale]/upload |
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Method |
POST |
||||||||||||
Roles allowed |
admin |
||||||||||||
Parameters |
|
||||||||||||
Request header |
Content-Type = "multipart/form-data" |
||||||||||||
Response HTTP statuses |
|