Run in Apidog
This endpoint creates a new cart containing a single product for a given terminal. It is the first step in the checkout process after product selection in a location-based flow. 🔍 Description# Initialize a cart with one product
Submit all required purchase and delivery details
Receive cart metadata including pricing and expiration
📌 Currently, this method supports only one product per cart . Multi-product carts are not yet supported. 📥 Request Details# terminalId (integer): ID of the requesting terminal
productId (integer): ID of the selected product
Field Type Description productIdinteger ID of the product being added to the cart countryIdinteger ID of the selected country stateIdinteger ID of the selected state or province locationIdinteger ID of the delivery location municipalityIdinteger ID of the selected municipality buyerNamestring Name of the buyer buyerSurnamestring Surname of the buyer buyerPhonestring Phone number of the buyer buyerEmailstring Email address of the buyer buyerDocumentNumberstring Document number of the buyer beneficiaryNamestring Name of the beneficiary beneficiarySurnamestring Surname of the beneficiary beneficiaryPhonestring Phone number of the beneficiary beneficiaryEmailstring Email address of the beneficiary beneficiaryDocumentNumberstring Document number of the beneficiary beneficiaryDocumentTypestring Type of document (e.g., PASSPORT, ID_CARD) citystring City of delivery addressstring Full delivery address
Example Request# {
"productId" : 501 ,
"countryId" : 34 ,
"stateId" : 201 ,
"locationId" : 401 ,
"municipalityId" : 301 ,
"buyerName" : "Carlota" ,
"buyerSurname" : "Gómez" ,
"buyerPhone" : "+34000000000" ,
"buyerEmail" : "cg@example.com" ,
"buyerDocumentNumber" : "X1234567" ,
"beneficiaryName" : "Luis" ,
"beneficiarySurname" : "Gómez" ,
"beneficiaryPhone" : "+34000000001" ,
"beneficiaryEmail" : "luis@example.com" ,
"beneficiaryDocumentNumber" : "Y7654321" ,
"city" : "Madrid" ,
"address" : "Calle Mayor 1, 1ºB" ,
"beneficiaryDocumentType" : "PASSPORT"
} 📤 Response# Returns cart creation confirmation and pricing details: Field Type Description resultMessagestring Human-readable message describing the result of the operation resultCodeinteger Internal result code (e.g., 0 for success) cartIdinteger Unique identifier of the newly created cart productPriceX100integer Base price of the product, expressed in cents amountToSendX100integer Amount intended to be sent, expressed in cents deliveryPriceX100integer Cost of delivery, expressed in cents
Example Response# {
"resultMessage" : "Cart created successfully" ,
"resultCode" : 0 ,
"cartId" : 874231 ,
"productPriceX100" : 1300 ,
"amountToSendX100" : 1500 ,
"deliveryPriceX100" : 200
} 🧠 Usage Notes# This method must be called before initiating payment.
The cart expires after a short time window (validUntil), so payment should follow promptly.
The cartId returned is required for the next step: executing payment.
Request Body Params application/json
{
"productId" : 0 ,
"countryId" : 0 ,
"stateId" : 0 ,
"locationId" : 0 ,
"municipalityId" : 0 ,
"buyerName" : "string" ,
"buyerSurname" : "string" ,
"buyerPhone" : "string" ,
"buyerEmail" : "string" ,
"buyerDocumentNumber" : "string" ,
"beneficiaryName" : "string" ,
"beneficiarySurname" : "string" ,
"beneficiaryPhone" : "string" ,
"beneficiaryEmail" : "string" ,
"beneficiaryDocumentNumber" : "string" ,
"city" : "string" ,
"address" : "string" ,
"beneficiaryDocumentType" : "PASSPORT"
} Request Code Samples
curl --location --request POST 'https://evsb.csqworld.com/physical-products/cart/create//' \
--header 'U: {{U}}' \
--header 'SH: {{SH}}' \
--header 'ST: {{ST}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"productId": 0,
"countryId": 0,
"stateId": 0,
"locationId": 0,
"municipalityId": 0,
"buyerName": "string",
"buyerSurname": "string",
"buyerPhone": "string",
"buyerEmail": "string",
"buyerDocumentNumber": "string",
"beneficiaryName": "string",
"beneficiarySurname": "string",
"beneficiaryPhone": "string",
"beneficiaryEmail": "string",
"beneficiaryDocumentNumber": "string",
"city": "string",
"address": "string",
"beneficiaryDocumentType": "PASSPORT"
}' Responses
{
"resultMessage" : "string" ,
"resultCode" : 0 ,
"cartId" : 0 ,
"productPriceX100" : 0 ,
"amountToSendX100" : 0 ,
"deliveryPriceX100" : 0
} Modified at 2025-07-07 11:26:18