All URIs are relative to https://api.api2cart.com/v1.1
Method | HTTP request | Description |
---|---|---|
basketInfo | GET /basket.info.json | basket.info |
basketInfoWithHttpInfo | GET /basket.info.json | basket.info |
basketItemAdd | POST /basket.item.add.json | basket.item.add |
basketItemAddWithHttpInfo | POST /basket.item.add.json | basket.item.add |
basketLiveShippingServiceCreate | POST /basket.live_shipping_service.create.json | basket.live_shipping_service.create |
basketLiveShippingServiceCreateWithHttpInfo | POST /basket.live_shipping_service.create.json | basket.live_shipping_service.create |
basketLiveShippingServiceDelete | DELETE /basket.live_shipping_service.delete.json | basket.live_shipping_service.delete |
basketLiveShippingServiceDeleteWithHttpInfo | DELETE /basket.live_shipping_service.delete.json | basket.live_shipping_service.delete |
basketLiveShippingServiceList | GET /basket.live_shipping_service.list.json | basket.live_shipping_service.list |
basketLiveShippingServiceListWithHttpInfo | GET /basket.live_shipping_service.list.json | basket.live_shipping_service.list |
basketInfo(basketInfoRequest): ApiRequest[BasketInfo200Response]
basket.info
Retrieve basket information.
// Import classes:
import
import org.openapitools.client.core._
import org.openapitools.client.core.CollectionFormats._
import org.openapitools.client.core.ApiKeyLocations._
import akka.actor.ActorSystem
import scala.concurrent.Future
import scala.util.{Failure, Success}
object Example extends App {
implicit val system: ActorSystem = ActorSystem()
import system.dispatcher
// Configure API key authorization: StoreKeyAuth
implicit val StoreKeyAuth: ApiKeyValue = ApiKeyValue("YOUR API KEY")
// Configure API key authorization: ApiKeyAuth
implicit val ApiKeyAuth: ApiKeyValue = ApiKeyValue("YOUR API KEY")
val apiInvoker = ApiInvoker()
val apiInstance = BasketApi("https://api.api2cart.com/v1.1")
val id: String = 10 // String | Entity id
val storeId: String = 1 // String | Store Id
val params: String = id,model,price,images // String | Set this parameter in order to choose which entity fields you want to retrieve
val exclude: String = false // String | Set this parameter in order to choose which entity fields you want to ignore. Works only if parameter `params` equal force_all
val responseFields: String = {result} // String | Set this parameter in order to choose which entity fields you want to retrieve
val request = apiInstance.basketInfo(id, storeId, params, exclude, responseFields)
val response = apiInvoker.execute(request)
response.onComplete {
case Success(ApiResponse(code, content, headers)) =>
System.out.println(s"Status code: $code}")
System.out.println(s"Response headers: ${headers.mkString(", ")}")
System.out.println(s"Response body: $content")
case Failure(error @ ApiError(code, message, responseContent, cause, headers)) =>
System.err.println("Exception when calling BasketApi#basketInfo")
System.err.println(s"Status code: $code}")
System.err.println(s"Reason: $responseContent")
System.err.println(s"Response headers: ${headers.mkString(", ")}")
error.printStackTrace();
case Failure(exception) =>
System.err.println("Exception when calling BasketApi#basketInfo")
exception.printStackTrace();
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Entity id | |
storeId | String | Store Id | [optional] |
params | String | Set this parameter in order to choose which entity fields you want to retrieve | [optional] |
exclude | String | Set this parameter in order to choose which entity fields you want to ignore. Works only if parameter `params` equal force_all | [optional] |
responseFields | String | Set this parameter in order to choose which entity fields you want to retrieve | [optional] |
ApiRequest[BasketInfo200Response]
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | successful operation | - |
basketItemAdd(basketItemAddRequest): ApiRequest[BasketItemAdd200Response]
basket.item.add
Add item to basket
// Import classes:
import
import
import org.openapitools.client.core._
import org.openapitools.client.core.CollectionFormats._
import org.openapitools.client.core.ApiKeyLocations._
import akka.actor.ActorSystem
import scala.concurrent.Future
import scala.util.{Failure, Success}
object Example extends App {
implicit val system: ActorSystem = ActorSystem()
import system.dispatcher
// Configure API key authorization: StoreKeyAuth
implicit val StoreKeyAuth: ApiKeyValue = ApiKeyValue("YOUR API KEY")
// Configure API key authorization: ApiKeyAuth
implicit val ApiKeyAuth: ApiKeyValue = ApiKeyValue("YOUR API KEY")
val apiInvoker = ApiInvoker()
val apiInstance = BasketApi("https://api.api2cart.com/v1.1")
val customerId: String = 5 // String | Retrieves orders specified by customer id
val productId: String = 10 // String | Defines id of the product which should be added to the basket
val variantId: String = 45 // String | Defines product's variants specified by variant id
val quantity: BigDecimal = 6 // BigDecimal | Defines new items quantity
val storeId: String = 1 // String | Store Id
val request = apiInstance.basketItemAdd(customerId, productId, variantId, quantity, storeId)
val response = apiInvoker.execute(request)
response.onComplete {
case Success(ApiResponse(code, content, headers)) =>
System.out.println(s"Status code: $code}")
System.out.println(s"Response headers: ${headers.mkString(", ")}")
System.out.println(s"Response body: $content")
case Failure(error @ ApiError(code, message, responseContent, cause, headers)) =>
System.err.println("Exception when calling BasketApi#basketItemAdd")
System.err.println(s"Status code: $code}")
System.err.println(s"Reason: $responseContent")
System.err.println(s"Response headers: ${headers.mkString(", ")}")
error.printStackTrace();
case Failure(exception) =>
System.err.println("Exception when calling BasketApi#basketItemAdd")
exception.printStackTrace();
}
}
Name | Type | Description | Notes |
---|---|---|---|
customerId | String | Retrieves orders specified by customer id | |
productId | String | Defines id of the product which should be added to the basket | |
variantId | String | Defines product's variants specified by variant id | [optional] |
quantity | BigDecimal | Defines new items quantity | [optional] |
storeId | String | Store Id | [optional] |
ApiRequest[BasketItemAdd200Response]
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | successful operation | - |
basketLiveShippingServiceCreate(basketLiveShippingServiceCreateRequest): ApiRequest[BasketLiveShippingServiceCreate200Response]
basket.live_shipping_service.create
Create live shipping rate service.
// Import classes:
import
import org.openapitools.client.core._
import org.openapitools.client.core.CollectionFormats._
import org.openapitools.client.core.ApiKeyLocations._
import akka.actor.ActorSystem
import scala.concurrent.Future
import scala.util.{Failure, Success}
object Example extends App {
implicit val system: ActorSystem = ActorSystem()
import system.dispatcher
// Configure API key authorization: StoreKeyAuth
implicit val StoreKeyAuth: ApiKeyValue = ApiKeyValue("YOUR API KEY")
// Configure API key authorization: ApiKeyAuth
implicit val ApiKeyAuth: ApiKeyValue = ApiKeyValue("YOUR API KEY")
val apiInvoker = ApiInvoker()
val apiInstance = BasketApi("https://api.api2cart.com/v1.1")
val name: String = BestDelivery // String | Shipping Service Name
val callback: String = https://example.com/callback // String | Callback url that returns shipping rates. It should be able to accept POST requests with json data.
val storeId: String = 1 // String | Store Id
val request = apiInstance.basketLiveShippingServiceCreate(name, callback, storeId)
val response = apiInvoker.execute(request)
response.onComplete {
case Success(ApiResponse(code, content, headers)) =>
System.out.println(s"Status code: $code}")
System.out.println(s"Response headers: ${headers.mkString(", ")}")
System.out.println(s"Response body: $content")
case Failure(error @ ApiError(code, message, responseContent, cause, headers)) =>
System.err.println("Exception when calling BasketApi#basketLiveShippingServiceCreate")
System.err.println(s"Status code: $code}")
System.err.println(s"Reason: $responseContent")
System.err.println(s"Response headers: ${headers.mkString(", ")}")
error.printStackTrace();
case Failure(exception) =>
System.err.println("Exception when calling BasketApi#basketLiveShippingServiceCreate")
exception.printStackTrace();
}
}
Name | Type | Description | Notes |
---|---|---|---|
name | String | Shipping Service Name | |
callback | String | Callback url that returns shipping rates. It should be able to accept POST requests with json data. | |
storeId | String | Store Id | [optional] |
ApiRequest[BasketLiveShippingServiceCreate200Response]
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | successful operation | - |
basketLiveShippingServiceDelete(basketLiveShippingServiceDeleteRequest): ApiRequest[BasketLiveShippingServiceDelete200Response]
basket.live_shipping_service.delete
Delete live shipping rate service.
// Import classes:
import
import org.openapitools.client.core._
import org.openapitools.client.core.CollectionFormats._
import org.openapitools.client.core.ApiKeyLocations._
import akka.actor.ActorSystem
import scala.concurrent.Future
import scala.util.{Failure, Success}
object Example extends App {
implicit val system: ActorSystem = ActorSystem()
import system.dispatcher
// Configure API key authorization: StoreKeyAuth
implicit val StoreKeyAuth: ApiKeyValue = ApiKeyValue("YOUR API KEY")
// Configure API key authorization: ApiKeyAuth
implicit val ApiKeyAuth: ApiKeyValue = ApiKeyValue("YOUR API KEY")
val apiInvoker = ApiInvoker()
val apiInstance = BasketApi("https://api.api2cart.com/v1.1")
val id: Int = 5 // Int | Entity id
val request = apiInstance.basketLiveShippingServiceDelete(id)
val response = apiInvoker.execute(request)
response.onComplete {
case Success(ApiResponse(code, content, headers)) =>
System.out.println(s"Status code: $code}")
System.out.println(s"Response headers: ${headers.mkString(", ")}")
System.out.println(s"Response body: $content")
case Failure(error @ ApiError(code, message, responseContent, cause, headers)) =>
System.err.println("Exception when calling BasketApi#basketLiveShippingServiceDelete")
System.err.println(s"Status code: $code}")
System.err.println(s"Reason: $responseContent")
System.err.println(s"Response headers: ${headers.mkString(", ")}")
error.printStackTrace();
case Failure(exception) =>
System.err.println("Exception when calling BasketApi#basketLiveShippingServiceDelete")
exception.printStackTrace();
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | Int | Entity id |
ApiRequest[BasketLiveShippingServiceDelete200Response]
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | successful operation | - |
basketLiveShippingServiceList(basketLiveShippingServiceListRequest): ApiRequest[BasketLiveShippingServiceList200Response]
basket.live_shipping_service.list
Retrieve a list of live shipping rate services.
// Import classes:
import
import org.openapitools.client.core._
import org.openapitools.client.core.CollectionFormats._
import org.openapitools.client.core.ApiKeyLocations._
import akka.actor.ActorSystem
import scala.concurrent.Future
import scala.util.{Failure, Success}
object Example extends App {
implicit val system: ActorSystem = ActorSystem()
import system.dispatcher
// Configure API key authorization: StoreKeyAuth
implicit val StoreKeyAuth: ApiKeyValue = ApiKeyValue("YOUR API KEY")
// Configure API key authorization: ApiKeyAuth
implicit val ApiKeyAuth: ApiKeyValue = ApiKeyValue("YOUR API KEY")
val apiInvoker = ApiInvoker()
val apiInstance = BasketApi("https://api.api2cart.com/v1.1")
val storeId: String = 1 // String | Store Id
val start: Int = 0 // Int | This parameter sets the number from which you want to get entities
val count: Int = 20 // Int | This parameter sets the entity amount that has to be retrieved. Max allowed count=250
val request = apiInstance.basketLiveShippingServiceList(storeId, start, count)
val response = apiInvoker.execute(request)
response.onComplete {
case Success(ApiResponse(code, content, headers)) =>
System.out.println(s"Status code: $code}")
System.out.println(s"Response headers: ${headers.mkString(", ")}")
System.out.println(s"Response body: $content")
case Failure(error @ ApiError(code, message, responseContent, cause, headers)) =>
System.err.println("Exception when calling BasketApi#basketLiveShippingServiceList")
System.err.println(s"Status code: $code}")
System.err.println(s"Reason: $responseContent")
System.err.println(s"Response headers: ${headers.mkString(", ")}")
error.printStackTrace();
case Failure(exception) =>
System.err.println("Exception when calling BasketApi#basketLiveShippingServiceList")
exception.printStackTrace();
}
}
Name | Type | Description | Notes |
---|---|---|---|
storeId | String | Store Id | [optional] |
start | Int | This parameter sets the number from which you want to get entities | [optional] |
count | Int | This parameter sets the entity amount that has to be retrieved. Max allowed count=250 | [optional] |
ApiRequest[BasketLiveShippingServiceList200Response]
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | successful operation | - |