Add cart line
curl --request POST \
--url https://api.quickshops.app/v1/cart/{cartId}/lines \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"productId": "<string>",
"quantity": 50
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({productId: '<string>', quantity: 50})
};
fetch('https://api.quickshops.app/v1/cart/{cartId}/lines', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.quickshops.app/v1/cart/{cartId}/lines"
payload = {
"productId": "<string>",
"quantity": 50
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({productId: '<string>', quantity: 50})
};
fetch('https://api.quickshops.app/v1/cart/{cartId}/lines', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "<string>",
"storeId": "<string>",
"lines": [
{
"productId": "<string>",
"quantity": 123,
"product": {
"_id": "<string>",
"storeId": "<string>",
"name": "<string>",
"description": "<string>",
"priceInCents": 123,
"currency": "<string>",
"type": "digital",
"billingInterval": "month",
"imageUrl": "<string>",
"isActive": true,
"category": "<string>",
"details": [
"<string>"
]
}
}
],
"totals": {
"subtotal": 123,
"total": 123,
"currency": "<string>"
}
}
}{
"error": "<string>",
"code": "UNAUTHORIZED"
}{
"error": "<string>",
"code": "UNAUTHORIZED"
}{
"error": "<string>",
"code": "UNAUTHORIZED"
}{
"error": "<string>",
"code": "UNAUTHORIZED"
}{
"error": "<string>",
"code": "UNAUTHORIZED"
}{
"error": "<string>",
"code": "UNAUTHORIZED"
}{
"error": "<string>",
"code": "UNAUTHORIZED"
}Add cart line
Add a product line to a cart.
POST
/
v1
/
cart
/
{cartId}
/
lines
Add cart line
curl --request POST \
--url https://api.quickshops.app/v1/cart/{cartId}/lines \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"productId": "<string>",
"quantity": 50
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({productId: '<string>', quantity: 50})
};
fetch('https://api.quickshops.app/v1/cart/{cartId}/lines', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.quickshops.app/v1/cart/{cartId}/lines"
payload = {
"productId": "<string>",
"quantity": 50
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({productId: '<string>', quantity: 50})
};
fetch('https://api.quickshops.app/v1/cart/{cartId}/lines', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "<string>",
"storeId": "<string>",
"lines": [
{
"productId": "<string>",
"quantity": 123,
"product": {
"_id": "<string>",
"storeId": "<string>",
"name": "<string>",
"description": "<string>",
"priceInCents": 123,
"currency": "<string>",
"type": "digital",
"billingInterval": "month",
"imageUrl": "<string>",
"isActive": true,
"category": "<string>",
"details": [
"<string>"
]
}
}
],
"totals": {
"subtotal": 123,
"total": 123,
"currency": "<string>"
}
}
}{
"error": "<string>",
"code": "UNAUTHORIZED"
}{
"error": "<string>",
"code": "UNAUTHORIZED"
}{
"error": "<string>",
"code": "UNAUTHORIZED"
}{
"error": "<string>",
"code": "UNAUTHORIZED"
}{
"error": "<string>",
"code": "UNAUTHORIZED"
}{
"error": "<string>",
"code": "UNAUTHORIZED"
}{
"error": "<string>",
"code": "UNAUTHORIZED"
}Authorizations
Headless API key (qk_...). Pro plan required.
Path Parameters
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Response
Response for status 200
Show child attributes
Show child attributes
Was this page helpful?
⌘I