Skip to content

Latest commit

 

History

History
105 lines (74 loc) · 3.23 KB

File metadata and controls

105 lines (74 loc) · 3.23 KB

CollectionApi

All URIs are relative to https://api.medusa-commerce.com/store

Method HTTP request Description
getCollections GET /collections List Collections
getCollectionsCollection GET /collections/{id} Get a Collection

getCollections

StoreCollectionsListRes getCollections(offset, limit, createdAt, updatedAt)

List Collections

Retrieve a list of Product Collection.

Example

// Import classes:
//import mobi.appcent.medusa.store.ApiException;
//import api.mobi.appcent.medusa.store.CollectionApi;


CollectionApi apiInstance = new CollectionApi();
Integer offset = 0; // Integer | The number of collections to skip before starting to collect the collections set
Integer limit = 10; // Integer | The number of collections to return
CreatedAt createdAt = new CreatedAt(); // CreatedAt | Date comparison for when resulting collections were created.
UpdatedAt updatedAt = new UpdatedAt(); // UpdatedAt | Date comparison for when resulting collections were updated.
try {
    StoreCollectionsListRes result = apiInstance.getCollections(offset, limit, createdAt, updatedAt);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling CollectionApi#getCollections");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
offset Integer The number of collections to skip before starting to collect the collections set [optional] [default to 0]
limit Integer The number of collections to return [optional] [default to 10]
createdAt CreatedAt Date comparison for when resulting collections were created. [optional]
updatedAt UpdatedAt Date comparison for when resulting collections were updated. [optional]

Return type

StoreCollectionsListRes

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getCollectionsCollection

StoreCollectionsRes getCollectionsCollection(id)

Get a Collection

Retrieves a Product Collection.

Example

// Import classes:
//import mobi.appcent.medusa.store.ApiException;
//import api.mobi.appcent.medusa.store.CollectionApi;


CollectionApi apiInstance = new CollectionApi();
String id = "id_example"; // String | The id of the Product Collection
try {
    StoreCollectionsRes result = apiInstance.getCollectionsCollection(id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling CollectionApi#getCollectionsCollection");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String The id of the Product Collection

Return type

StoreCollectionsRes

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json