Please note that this is a BETA version of the GetResponse ecommerce API. It is still undergoing final testing before its official release.

Sending GET request to this url, returns collection of CART resources that belong to given shop.

You can narrow down list of resources by passing proper query parameters (list of which you can find below in request params section). You can basically search by:

  • externalId
  • createdOn

You can specify which page of results you want and how many results per page should be there. You can also specify sort-order using one or more of allowed fields (listed below in request params section).

Last but not least you can even specify which fields from resource you want to get. If you pass param `fields` with list of fields (separated by comma [,]) we will return list of resources with only those fields (we will always add resource id to ensure that you can use that data later on)

Returns status code

200

Request url

/shops/p/carts?query[createdOn][from]=2010-10-13&query[createdOn][to]=2020-03-15

Request params

Field nameField typeField description
queryhashUsed to search only resources that meets criteria. You can specify multiple parameters, then it uses AND logic.
KeyPossible values if fixed
externalId*
createdOncreatedOn[from]={Y-m-d}&createdOn[to]={Y-m-d} - It can be also UTC format
fieldsstringList of fields that should be returned. Id is always returned. Fields should be separated with comma
sorthashEnable sorting using specified field (set as a key) and order (set as a value). You can specify multiple fields to sort by.
KeyPossible values if fixed
createdOnasc,desc
perPageintNumber results on page
pageintPage number

Example Response

[
    {
        "cartId": "V",
        "contactId": "Vp",
        "currency": "USD",
        "totalPrice": 1234.56,
        "selectedVariants": [
            {
                "variantId": "V",
                "quantity": 3,
                "price": 57,
                "priceTax": 98,
                "href": "https://api.getresponse.com/v3/shops/V/variants/V"
            }
        ],
        "externalId": "ext-id",
        "totalTaxPrice": 12345.67,
        "cartUrl": "http://example.com/cart?ref=nQx",
        "href": "https://api.getresponse.com/v3/shops/V/carts/V",
        "createdOn": "2017-04-04T08:13:05+0000",
        "updatedOn": "2017-04-04T08:15:17+0000"
    }
]

Possible Errors


Please note that this is a BETA version of the GetResponse ecommerce API. It is still undergoing final testing before its official release.

Method returns CART with given cartId in context of given shopId

Returns status code

200

Request url

/shops/p/carts/V

Request params

Field nameField typeField description
fieldsstringList of fields that should be returned. Id is always returned. Fields should be separated with comma

Example Response

{
    "cartId": "V",
    "contactId": "Vp",
    "currency": "USD",
    "totalPrice": 1234.56,
    "selectedVariants": [
        {
            "variantId": "V",
            "quantity": 3,
            "price": 57,
            "priceTax": 98,
            "href": "https://api.getresponse.com/v3/shops/V/variants/V"
        }
    ],
    "externalId": "ext-id",
    "totalTaxPrice": 12345.67,
    "cartUrl": "http://example.com/cart?ref=nQx",
    "href": "https://api.getresponse.com/v3/shops/V/carts/V",
    "createdOn": "2017-04-04T08:13:05+0000",
    "updatedOn": "2017-04-04T08:15:17+0000"
}

Possible Errors


Please note that this is a BETA version of the GetResponse ecommerce API. It is still undergoing final testing before its official release.

Sending a POST request to this url, will create a new CART resource.

In order to create a new CART, you need to send CART resource in BODY of the request (remember that you need to serialize body into JSON string)

Returns status code

201

Example Request Body

{
    "contactId": "Vp",
    "currency": "USD",
    "totalPrice": 1234.56,
    "selectedVariants": [
        {
            "variantId": "V",
            "quantity": 3,
            "price": 57,
            "priceTax": 98
        }
    ],
    "externalId": "ext-id",
    "totalTaxPrice": 12345.67,
    "cartUrl": "http://example.com/cart/nQ"
}

Body params

Field nameField typeField description
contactId (required)stringID of contact that the cart belongs to, you must first create contact using POST /v3/contacts or if it already exists, using GET /v3/contacts
totalPrice (required)floatTotal price of order excl. taxes
totalTaxPricefloatTotal price of order incl. taxes
currency (required)stringCart currency - ISO 4217
selectedVariants (required)collectionCollection of selected product variants
Field nameField typeField description
variantId (required)stringID of selected variant, You must first create variant using POST /v3/shops/{shopId}/products or POST /v3/shops/{shopId}/products/{productId}/variants
price (required)floatProduct variant price excl. taxes
priceTax (required)floatProduct variant price tax incl. taxes
quantity (required)integerProduct variant quantity
externalIdstringExternal cart ID, free text
cartUrlstringExternal cart URL

Example Response

{
    "cartId": "V",
    "contactId": "Vp",
    "currency": "USD",
    "totalPrice": 1234.56,
    "selectedVariants": [
        {
            "variantId": "V",
            "quantity": 3,
            "price": 57,
            "priceTax": 98,
            "href": "https://api.getresponse.com/v3/shops/V/variants/V"
        }
    ],
    "externalId": "ext-id",
    "totalTaxPrice": 12345.67,
    "cartUrl": "http://example.com/cart/nQ",
    "href": "https://api.getresponse.com/v3/shops/V/carts/V",
    "createdOn": "2017-04-04T08:13:05+0000",
    "updatedOn": "2017-04-04T08:15:17+0000"
}

Possible Errors


Please note that this is a BETA version of the GetResponse ecommerce API. It is still undergoing final testing before its official release.

Update properties of shops CART. You should send only those fields that need to be changed. The rest of properties will stay the same.

In case of selectedVariants when collection is updated then old one is completely removed.

Returns status code

200

Example Request Body

{
    "contactId": "Vp",
    "currency": "USD",
    "totalPrice": 1234.56,
    "selectedVariants": [
        {
            "variantId": "V",
            "quantity": 3,
            "price": 57,
            "priceTax": 98
        }
    ],
    "externalId": "ext-id",
    "totalTaxPrice": 12345.67,
    "cartUrl": "http://example.com/cart/nQ"
}

Body params

Field nameField typeField description
contactIdstringID of contact that the cart belongs to, you must first create contact using POST /v3/contacts or if it already exists, using GET /v3/contacts
totalPricefloatTotal price of order excl. taxes
totalTaxPricefloatTotal price of order incl. taxes
currencystringCart currency - ISO 4217
selectedVariantscollectionCollection of selected product variants
Field nameField typeField description
variantId (required)stringID of selected variant, You must first create variant using POST /v3/shops/{shopId}/products or POST /v3/shops/{shopId}/products/{productId}/variants
price (required)floatProduct variant price excl. taxes
priceTax (required)floatProduct variant price tax incl. taxes
quantity (required)integerProduct variant quantity
externalIdstringExternal cart ID, free text
cartUrlstringExternal cart URL

Example Response

{
    "cartId": "V",
    "contactId": "Vp",
    "currency": "USD",
    "totalPrice": 1234.56,
    "selectedVariants": [
        {
            "variantId": "V",
            "quantity": 3,
            "price": 57,
            "priceTax": 98,
            "href": "https://api.getresponse.com/v3/shops/V/variants/V"
        }
    ],
    "externalId": "ext-id",
    "totalTaxPrice": 12345.67,
    "cartUrl": "http://example.com/cart/nQ",
    "href": "https://api.getresponse.com/v3/shops/V/carts/V",
    "createdOn": "2017-04-04T08:13:05+0000",
    "updatedOn": "2017-04-04T08:15:17+0000"
}

Possible Errors


Please note that this is a BETA version of the GetResponse ecommerce API. It is still undergoing final testing before its official release.

Returns status code

204

Possible Errors