Create a QR code for a shoppable link
curl --request POST \
--url https://incarts-api-qob6vapoca-uc.a.run.app/v1/links/{linkId}/qr-codes \
--header 'Content-Type: application/json' \
--header 'X-Incarts-API-Key: <api-key>' \
--data '
{
"identifier": "in-store-display",
"name": "In-store display"
}
'const options = {
method: 'POST',
headers: {'X-Incarts-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({identifier: 'in-store-display', name: 'In-store display'})
};
fetch('https://incarts-api-qob6vapoca-uc.a.run.app/v1/links/{linkId}/qr-codes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://incarts-api-qob6vapoca-uc.a.run.app/v1/links/{linkId}/qr-codes"
payload = {
"identifier": "in-store-display",
"name": "In-store display"
}
headers = {
"X-Incarts-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"id": "qr_lnk_01JZ4TDK6A0NV2HG6R3Q7E28Y9_default",
"linkId": "lnk_01JZ4TDK6A0NV2HG6R3Q7E28Y9",
"identifier": "default",
"name": "Default QR code",
"imageUrl": "https://firebasestorage.googleapis.com/v0/b/incarts.appspot.com/o/qrcodes%2Fexample.png?alt=media",
"encodedUrl": "https://in2carts.com/qr/qr_lnk_01JZ4TDK6A0NV2HG6R3Q7E28Y9_default",
"isDefault": true,
"createdAt": "2023-11-07T05:31:56Z",
"metadata": {
"campaignId": "cmp_123"
}
}
}{
"error": {
"code": "validation_failed",
"message": "products is required for walmart add_to_cart links.",
"correlationId": "req_01JZ4TCZ7AG9P9W38V4VNQ7W4B",
"details": [
{
"field": "products",
"message": "At least one product is required."
}
]
}
}{
"error": {
"code": "validation_failed",
"message": "products is required for walmart add_to_cart links.",
"correlationId": "req_01JZ4TCZ7AG9P9W38V4VNQ7W4B",
"details": [
{
"field": "products",
"message": "At least one product is required."
}
]
}
}{
"error": {
"code": "validation_failed",
"message": "products is required for walmart add_to_cart links.",
"correlationId": "req_01JZ4TCZ7AG9P9W38V4VNQ7W4B",
"details": [
{
"field": "products",
"message": "At least one product is required."
}
]
}
}{
"error": {
"code": "validation_failed",
"message": "products is required for walmart add_to_cart links.",
"correlationId": "req_01JZ4TCZ7AG9P9W38V4VNQ7W4B",
"details": [
{
"field": "products",
"message": "At least one product is required."
}
]
}
}{
"error": {
"code": "validation_failed",
"message": "products is required for walmart add_to_cart links.",
"correlationId": "req_01JZ4TCZ7AG9P9W38V4VNQ7W4B",
"details": [
{
"field": "products",
"message": "At least one product is required."
}
]
}
}{
"error": {
"code": "unsupported_retailer_intent",
"message": "Kroger add-to-cart links are not supported.",
"correlationId": "req_01JZ4TCZ7AG9P9W38V4VNQ7W4B"
}
}{
"error": {
"code": "validation_failed",
"message": "products is required for walmart add_to_cart links.",
"correlationId": "req_01JZ4TCZ7AG9P9W38V4VNQ7W4B",
"details": [
{
"field": "products",
"message": "At least one product is required."
}
]
}
}{
"error": {
"code": "validation_failed",
"message": "products is required for walmart add_to_cart links.",
"correlationId": "req_01JZ4TCZ7AG9P9W38V4VNQ7W4B",
"details": [
{
"field": "products",
"message": "At least one product is required."
}
]
}
}Endpoints
Create a QR code
Create a QR code for an existing shoppable link
POST
https://incarts-api-qob6vapoca-uc.a.run.app
/
v1
/
links
/
{linkId}
/
qr-codes
Create a QR code for a shoppable link
curl --request POST \
--url https://incarts-api-qob6vapoca-uc.a.run.app/v1/links/{linkId}/qr-codes \
--header 'Content-Type: application/json' \
--header 'X-Incarts-API-Key: <api-key>' \
--data '
{
"identifier": "in-store-display",
"name": "In-store display"
}
'const options = {
method: 'POST',
headers: {'X-Incarts-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({identifier: 'in-store-display', name: 'In-store display'})
};
fetch('https://incarts-api-qob6vapoca-uc.a.run.app/v1/links/{linkId}/qr-codes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://incarts-api-qob6vapoca-uc.a.run.app/v1/links/{linkId}/qr-codes"
payload = {
"identifier": "in-store-display",
"name": "In-store display"
}
headers = {
"X-Incarts-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"id": "qr_lnk_01JZ4TDK6A0NV2HG6R3Q7E28Y9_default",
"linkId": "lnk_01JZ4TDK6A0NV2HG6R3Q7E28Y9",
"identifier": "default",
"name": "Default QR code",
"imageUrl": "https://firebasestorage.googleapis.com/v0/b/incarts.appspot.com/o/qrcodes%2Fexample.png?alt=media",
"encodedUrl": "https://in2carts.com/qr/qr_lnk_01JZ4TDK6A0NV2HG6R3Q7E28Y9_default",
"isDefault": true,
"createdAt": "2023-11-07T05:31:56Z",
"metadata": {
"campaignId": "cmp_123"
}
}
}{
"error": {
"code": "validation_failed",
"message": "products is required for walmart add_to_cart links.",
"correlationId": "req_01JZ4TCZ7AG9P9W38V4VNQ7W4B",
"details": [
{
"field": "products",
"message": "At least one product is required."
}
]
}
}{
"error": {
"code": "validation_failed",
"message": "products is required for walmart add_to_cart links.",
"correlationId": "req_01JZ4TCZ7AG9P9W38V4VNQ7W4B",
"details": [
{
"field": "products",
"message": "At least one product is required."
}
]
}
}{
"error": {
"code": "validation_failed",
"message": "products is required for walmart add_to_cart links.",
"correlationId": "req_01JZ4TCZ7AG9P9W38V4VNQ7W4B",
"details": [
{
"field": "products",
"message": "At least one product is required."
}
]
}
}{
"error": {
"code": "validation_failed",
"message": "products is required for walmart add_to_cart links.",
"correlationId": "req_01JZ4TCZ7AG9P9W38V4VNQ7W4B",
"details": [
{
"field": "products",
"message": "At least one product is required."
}
]
}
}{
"error": {
"code": "validation_failed",
"message": "products is required for walmart add_to_cart links.",
"correlationId": "req_01JZ4TCZ7AG9P9W38V4VNQ7W4B",
"details": [
{
"field": "products",
"message": "At least one product is required."
}
]
}
}{
"error": {
"code": "unsupported_retailer_intent",
"message": "Kroger add-to-cart links are not supported.",
"correlationId": "req_01JZ4TCZ7AG9P9W38V4VNQ7W4B"
}
}{
"error": {
"code": "validation_failed",
"message": "products is required for walmart add_to_cart links.",
"correlationId": "req_01JZ4TCZ7AG9P9W38V4VNQ7W4B",
"details": [
{
"field": "products",
"message": "At least one product is required."
}
]
}
}{
"error": {
"code": "validation_failed",
"message": "products is required for walmart add_to_cart links.",
"correlationId": "req_01JZ4TCZ7AG9P9W38V4VNQ7W4B",
"details": [
{
"field": "products",
"message": "At least one product is required."
}
]
}
}Authorizations
Headers
Stable client-generated key used to safely retry write requests.
Required string length:
8 - 128Client-supplied request correlation ID. The API echoes this value when provided.
Required string length:
8 - 128Path Parameters
Public Incarts link identifier.
Required string length:
3 - 128Body
application/json
Client-chosen QR code identifier unique within the link.
Pattern:
^[A-Za-z0-9-]{3,64}$Example:
"in-store-display"
Required string length:
1 - 120Example:
"In-store display"
Caller-supplied metadata stored with the resource. Do not put secrets here.
Example:
{ "campaignId": "cmp_123" }
Response
QR code created.
Show child attributes
Show child attributes
⌘I
