Stores
These endpoints allow you to retrieve, create, update, and delete Store(s).
List all stores
This query allows you to retrieve all stores on your account.
Fields
- Label
Store!
- Description
The Store! query type.
Request
POST
https://services.lightfunnels.com/api/v2query AccountQuery{
account{
stores{
# Store type fields
id
...
}
}
}
Response
{
"data": {
"account": {
"stores": [
{
"id": "VzVE4OTA5LDFR4OTA5XQ==",
}
]
},
}
}
Create a store
This query allows you to add a new store.
Arguments
- Label
StoreInput!
- Description
The StoreInput type.
Fields
- Name
CreateStoreMutation!
- Type
- CreateStoreMutation!
- Description
The CreateStoreMutation! query type.
type CreateStoreMutation { account: Account! store: Store! }
Request
POST
https://services.lightfunnels.com/api/v2mutation mutationName($node: StoreInput!) {
createStore(node: $node){
# CreateStoreMutation type fields
account {
id
}
store {
id
}
...
}
}
Response
{
"data": {
"createStore": {
"account": {
"id": "RnVubmVsOjIwMTIz"
},
"store": {
"id": "RnVubmVsOjIwMTIs"
}
}
}
}
Retrieve a store
This query allows you to retrieve a store by providing its id.
Arguments
- Name
id
- Type
- ID!
- Description
The store id.
Fields
- Label
Store!
- Description
The Store! query type.
Request
POST
https://services.lightfunnels.com/api/v2 query StoreQuery($id: ID!){
node(id: $id){
... on Store{
# Store type fields
}
}
}
Response
{
"data": {
"node": {
"id": "UHJvZHVjdDoxNTUxMQ==",
...
}
}
}
Update a Store
This query allows you to perform an update on a Store.
Arguments
- Name
uid
- Type
- ID!
- Description
The store id.
- Name
node
- Label
StoreUpdateInput!
- Description
The store node.
Fields
- Label
Store!
- Description
The Store! query type.
Request
Post
https://services.lightfunnels.com/api/v2mutation updateStoreMutation($node: StoreUpdateInput!, $id: ID!){
updateStore(node: $node, id: $id){
# Store type fields
}
}
Response
{
"data": {
"updateStore": {
"id": "UHJvZHVjdDoxNTUxMQ==",
"name": "My Awesome Store",
...
}
}
}
Delete a Store
This query allows you to delete stores.
Arguments
- Name
items
- Type
- [ID!]!
- Description
The store uids.
Fields
- Label
Account
- Description
The account type.
Request
POST
https://services.lightfunnels.com/api/v2 mutation deleteStoresMutation($items: [ID!]!){
deleteStore(items: $items){
# Account type fields
}
}
Response
{
"data": {
"deleteStore": {
# Account type fields
}
}
}
Add Products to Store
This mutation allows you to add existing products to store.
Arguments
- Name
id
- Type
- [ID!]!
- Description
The store uid.
- Name
node
- Type
- AddProductsToStoreInput!
- Description
object named node that contains an array of the products uids (see the type structure below).
Fields
- Name
AddProductsToStoreInput!
- Type
- AddProductsToStoreInput!
- Description
The AddProductsToStoreInput! type.
type AddProductsToStoreInput { products_uids: [String!]! }
Request
POST
https://services.lightfunnels.com/api/v2mutation addProductsToStore($node: AddProductsToStoreInput!$id: ID!){
addProductsToStore(id: $id, node: $node) {
id
products(cursor: null){
title
price
link
cursor
}
}
}
Response
{
"data": {
"addProductsToStore": {
# Store type fields
}
}
}