All URIs are relative to https://api.medusa-commerce.com/store
Method | HTTP request | Description |
---|---|---|
getSwapsSwapCartId | GET /swaps/{cart_id} | Get by Cart ID |
postSwaps | POST /swaps | Create a Swap |
StoreSwapsRes getSwapsSwapCartId(cartId)
Get by Cart ID
Retrieves a Swap by the id of the Cart used to confirm the Swap.
// Import classes:
//import mobi.appcent.medusa.store.ApiException;
//import api.mobi.appcent.medusa.store.SwapApi;
SwapApi apiInstance = new SwapApi();
String cartId = "cartId_example"; // String | The id of the Cart
try {
StoreSwapsRes result = apiInstance.getSwapsSwapCartId(cartId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SwapApi#getSwapsSwapCartId");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
cartId | String | The id of the Cart |
No authorization required
- Content-Type: Not defined
- Accept: application/json
StoreSwapsRes postSwaps(body)
Create a Swap
Creates a Swap on an Order by providing some items to return along with some items to send back
// Import classes:
//import mobi.appcent.medusa.store.ApiException;
//import api.mobi.appcent.medusa.store.SwapApi;
SwapApi apiInstance = new SwapApi();
StorePostSwapsReq body = new StorePostSwapsReq(); // StorePostSwapsReq |
try {
StoreSwapsRes result = apiInstance.postSwaps(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SwapApi#postSwaps");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | StorePostSwapsReq | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json