E-commerce API
POST /services/webshop/v1/shoppingcart/get Public

Get Shopping Cart

Request Body Required

FieldTypeRequiredDescriptionExample
website_id string Yes 1
shoppingcart_session string Yes abc123def456ghi789

Responses

200
422
429
Full cart with products, pricing, shipping, payment and user details
Headers
HeaderTypeDescriptionExample
X-RateLimit-Limit integer Maximum number of requests allowed per minute 60
X-RateLimit-Remaining integer Number of requests remaining in the current window 57
FieldTypeDescription
payment object
payment.selected string
payment.methods string
shipment object
shipment.shipping_methods string
shipment.selected object
quote object
quote.show_price_tax_included string
quote.session string
quote.tax_amounts string
quote.total_price string
quote.total_price_tax string
quote.total_price_with_tax string
quote.products object[]
shoppingcart object
shoppingcart.show_price_tax_included string
shoppingcart.session string
shoppingcart.tax_amounts string
shoppingcart.total_price string
shoppingcart.total_price_tax string
shoppingcart.total_price_with_tax string
shoppingcart.products object[]
shoppingcart.total_quantity number
coupon object
coupon.code string
coupon.label string
coupon.value string
coupon.value_type string
coupon.discount_amount number Amounts
coupon.discount_amount_incl_tax number Amounts
coupon.applied_to_shipping boolean
agreement object
agreement.url string
countries object
countries.NL string
countries.BE string
countries.DE string
countries.FR string
countries.IT string
countries.ES string
countries.AT string
countries.LU string
countries.IE string
countries.PT string
countries.PL string
countries.CZ string
countries.SK string
countries.SI string
countries.HU string
countries.RO string
countries.BG string
countries.HR string
countries.GR string
countries.CY string
countries.EE string
countries.LV string
countries.LT string
countries.FI string
countries.SE string
countries.DK string
countries.MT string
users string
vies object
vies.status string
valid, unavailable, invalid, unchecked
vies.reverse_charge_applied boolean
Validation error
FieldTypeDescription
message string Errors overview.
errors object A detailed description of each field that failed validation.
Too Many Requests — rate limit exceeded
Headers
HeaderTypeDescriptionExample
X-RateLimit-Limit integer Maximum number of requests allowed per minute 60
X-RateLimit-Remaining integer Number of requests remaining in the current window 57
Retry-After integer Seconds until the rate limit resets 60
FieldTypeDescription
error boolean
message string
Base URL
https://api.wemasy.nl/api
Authentication

Request Sample
cURL
JS
PHP
Python
curl -X POST "https://api.wemasy.nl/api/services/webshop/v1/shoppingcart/get" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "website_id": "1",
    "shoppingcart_session": "abc123def456ghi789"
}'
fetch('https://api.wemasy.nl/api/services/webshop/v1/shoppingcart/get', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "website_id": "1",
    "shoppingcart_session": "abc123def456ghi789"
})})
.then(r => r.json())
.then(data => console.log(data));
$response = Http::withToken('YOUR_API_TOKEN')
    ->accept('application/json')
    ->post('https://api.wemasy.nl/api/services/webshop/v1/shoppingcart/get', {
    "website_id": "1",
    "shoppingcart_session": "abc123def456ghi789"
});
$data = $response->json();
import requests

headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Accept": "application/json"
}
data = {
    "website_id": "1",
    "shoppingcart_session": "abc123def456ghi789"
}
r = requests.post("https://api.wemasy.nl/api/services/webshop/v1/shoppingcart/get", headers=headers, json=data)
print(r.json())
Response Example
{
    "payment": {
        "selected": "ideal",
        "methods": {
            "ideal": {
                "label": "iDEAL",
                "icon": "ideal"
            },
            "bancontact": {
                "label": "Bancontact",
                "icon": "bancontact"
            }
        }
    },
    "shipment": {
        "shipping_methods": [
            {
                "id": "kJ9hqHhCYh",
                "title": "Standard Shipping",
                "price": {
                    "tax_class": 2,
                    "incl_tax": 4.99,
                    "tax": 0.87,
                    "excl_tax": 4.12
                }
            }
        ],
        "selected": {
            "selected": "kJ9hqHhCYh",
            "title": "Standard Shipping",
            "price": {
                "tax_class": 2,
                "incl_tax": 4.99,
                "tax": 0.87,
                "excl_tax": 4.12
            }
        }
    },
    "quote": {
        "show_price_tax_included": true,
        "session": "eeX6TCxiubsfJEE7h49dzS3RaNcHXUTHaHcjnUqd",
        "tax_amounts": {
            "0": 0,
            "9": 0,
            "21": 22.56
        },
        "total_price": 107.44,
        "total_price_tax": 22.56,
        "total_price_with_tax": 130,
        "products": [
            {
                "id": 1,
                "title": "T Shirt",
                "quantity": 1,
                "price": 125,
                "price_excl_tax": 103.31,
                "tax": 21.69,
                "tax_percentage": 21,
                "main_image": "/images/tshirt.jpg",
                "options": []
            }
        ]
    },
    "shoppingcart": {
        "show_price_tax_included": true,
        "session": "eeX6TCxiubsfJEE7h49dzS3RaNcHXUTHaHcjnUqd",
        "tax_amounts": {
            "0": 0,
            "9": 0,
            "21": 23.43
        },
        "total_price": 111.56,
        "total_price_tax": 23.43,
        "total_price_with_tax": 134.99,
        "products": [
            {
                "id": 1,
                "title": "T Shirt",
                "quantity": 1,
                "price": 125,
                "price_excl_tax": 103.31,
                "tax": 21.69,
                "tax_percentage": 21,
                "main_image": "/images/tshirt.jpg",
                "options": [],
                "shipping_price": {
                    "incl_tax": 4.99,
                    "excl_tax": 4.12,
                    "tax": 0.87
                }
            }
        ],
        "total_quantity": 1
    },
    "coupon": null,
    "agreement": {
        "url": "/terms-and-conditions"
    },
    "countries": [
        {
            "code": "NL",
            "name": "Netherlands"
        },
        {
            "code": "BE",
            "name": "Belgium"
        }
    ],
    "users": {
        "invoice_email": "john@example.com",
        "invoice_firstname": "John",
        "invoice_lastname": "Doe",
        "invoice_phonenumber": "+31612345678",
        "invoice_is_company": null,
        "invoice_company": null,
        "invoice_tax_number": null,
        "invoice_street": "Keizersgracht",
        "invoice_number": "123",
        "invoice_postcode": "1015 CJ",
        "invoice_city": "Amsterdam",
        "invoice_country": "NL",
        "invoice_notes": null,
        "custom_shipping_information": null,
        "shipping_firstname": null,
        "shipping_lastname": null,
        "shipping_phonenumber": null,
        "shipping_email": null,
        "shipping_company": null,
        "shipping_street": null,
        "shipping_number": null,
        "shipping_postcode": null,
        "shipping_city": null,
        "shipping_country": "NL"
    },
    "vies": {
        "status": "not_checked",
        "reverse_charge_applied": false
    }
}

Try It
Request Body Required

Export