LOCO API - GraphQL
Základní informace o API neleznete zde
Terms of Service
API Endpoints
# Production:
https://loco-app.expan.do/api/graphql
Headers
Authorization: Bearer <YOUR_TOKEN_HERE>
Queries
articles
Response
Returns an ArticleConnection!
Arguments
Name | Description |
---|---|
connectionIdExport - Int!
|
Export connection id (required) |
articleId - Int
|
Filter by article ID |
identifier - String
|
Filter by identifier |
articleIds - [Int]
|
Filter by array article ID |
first - Int!
|
Limits number of fetched items. |
after - String
|
A cursor after which elements are returned. |
Example
Query
query Articles(
$connectionIdExport: Int!,
$articleId: Int,
$identifier: String,
$articleIds: [Int],
$first: Int!,
$after: String
) {
articles(
connectionIdExport: $connectionIdExport,
articleId: $articleId,
identifier: $identifier,
articleIds: $articleIds,
first: $first,
after: $after
) {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
total
count
currentPage
lastPage
}
edges {
node {
...ArticleFragment
}
cursor
}
}
}
Variables
{
"connectionIdExport": 987,
"articleId": 987,
"identifier": "abc123",
"articleIds": [987],
"first": 987,
"after": "xyz789"
}
Response
{
"data": {
"articles": {
"pageInfo": PageInfo,
"edges": [ArticleEdge]
}
}
}
brands
Response
Returns a BrandConnection!
Example
Query
query Brands(
$connectionIdExport: Int!,
$brandId: Int,
$identifier: String,
$first: Int!,
$after: String
) {
brands(
connectionIdExport: $connectionIdExport,
brandId: $brandId,
identifier: $identifier,
first: $first,
after: $after
) {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
total
count
currentPage
lastPage
}
edges {
node {
...BrandFragment
}
cursor
}
}
}
Variables
{
"connectionIdExport": 123,
"brandId": 987,
"identifier": "abc123",
"first": 987,
"after": "xyz789"
}
Response
{
"data": {
"brands": {
"pageInfo": PageInfo,
"edges": [BrandEdge]
}
}
}
categories
Response
Returns a CategoryConnection!
Example
Query
query Categories(
$connectionIdExport: Int!,
$categoryId: Int,
$identifier: String,
$first: Int!,
$after: String
) {
categories(
connectionIdExport: $connectionIdExport,
categoryId: $categoryId,
identifier: $identifier,
first: $first,
after: $after
) {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
total
count
currentPage
lastPage
}
edges {
node {
...CategoryFragment
}
cursor
}
}
}
Variables
{
"connectionIdExport": 987,
"categoryId": 987,
"identifier": "abc123",
"first": 123,
"after": "abc123"
}
Response
{
"data": {
"categories": {
"pageInfo": PageInfo,
"edges": [CategoryEdge]
}
}
}
languages
Description
Return all languages
Response
Returns [Language!]!
Example
Query
query Languages {
languages {
languageId
icu
}
}
Response
{
"data": {
"languages": [
{"languageId": 123, "icu": "xyz789"}
]
}
}
options
Response
Returns an OptionConnection!
Example
Query
query Options(
$connectionIdExport: Int!,
$optionId: Int,
$identifier: String,
$first: Int!,
$after: String
) {
options(
connectionIdExport: $connectionIdExport,
optionId: $optionId,
identifier: $identifier,
first: $first,
after: $after
) {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
total
count
currentPage
lastPage
}
edges {
node {
...OptionFragment
}
cursor
}
}
}
Variables
{
"connectionIdExport": 987,
"optionId": 123,
"identifier": "abc123",
"first": 987,
"after": "abc123"
}
Response
{
"data": {
"options": {
"pageInfo": PageInfo,
"edges": [OptionEdge]
}
}
}
products
Description
Returns all products marked for export to the desired export connection.
Response
Returns a ProductConnection!
Arguments
Name | Description |
---|---|
connectionIdExport - Int!
|
Export connection id (required) |
identifier - String
|
Filter by identifier |
productId - Int
|
Filter by product ID |
productIds - [Int]
|
Filter by array product ID |
first - Int!
|
Limits number of fetched items. |
after - String
|
A cursor after which elements are returned. |
Example
Query
query Products(
$connectionIdExport: Int!,
$identifier: String,
$productId: Int,
$productIds: [Int],
$first: Int!,
$after: String
) {
products(
connectionIdExport: $connectionIdExport,
identifier: $identifier,
productId: $productId,
productIds: $productIds,
first: $first,
after: $after
) {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
total
count
currentPage
lastPage
}
edges {
node {
...ProductFragment
}
cursor
}
}
}
Variables
{
"connectionIdExport": 987,
"identifier": "xyz789",
"productId": 987,
"productIds": [123],
"first": 123,
"after": "abc123"
}
Response
{
"data": {
"products": {
"pageInfo": PageInfo,
"edges": [ProductEdge]
}
}
}
reviews
Response
Returns a ReviewConnection!
Example
Query
query Reviews(
$connectionIdExport: Int!,
$reviewId: Int,
$identifier: String,
$first: Int!,
$after: String
) {
reviews(
connectionIdExport: $connectionIdExport,
reviewId: $reviewId,
identifier: $identifier,
first: $first,
after: $after
) {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
total
count
currentPage
lastPage
}
edges {
node {
...ReviewFragment
}
cursor
}
}
}
Variables
{
"connectionIdExport": 123,
"reviewId": 987,
"identifier": "xyz789",
"first": 123,
"after": "xyz789"
}
Response
{
"data": {
"reviews": {
"pageInfo": PageInfo,
"edges": [ReviewEdge]
}
}
}
Mutations
createOrUpdateArticle
Description
Creates or updates a article, depending on whether it exists in the database. The existence of the article is determined by the identifier.
Response
Returns an Articles
Arguments
Name | Description |
---|---|
connectionIdImport - Int!
|
Import connection id (required) |
input - [ArticleInput!]
|
Example
Query
mutation CreateOrUpdateArticle(
$connectionIdImport: Int!,
$input: [ArticleInput!]
) {
createOrUpdateArticle(
connectionIdImport: $connectionIdImport,
input: $input
) {
articles {
articleId
identifier
}
}
}
Variables
{"connectionIdImport": 987, "input": [ArticleInput]}
Response
{
"data": {
"createOrUpdateArticle": {"articles": [ArticleOutput]}
}
}
createOrUpdateProduct
Description
Creates or updates a product, depending on whether it exists in the database. The existence of the product is determined by the identifier.
Response
Returns a Products
Arguments
Name | Description |
---|---|
connectionIdImport - Int!
|
Import connection id (required) |
input - [ProductInput!]
|
Example
Query
mutation CreateOrUpdateProduct(
$connectionIdImport: Int!,
$input: [ProductInput!]
) {
createOrUpdateProduct(
connectionIdImport: $connectionIdImport,
input: $input
) {
products {
productId
identifier
}
}
}
Variables
{"connectionIdImport": 123, "input": [ProductInput]}
Response
{
"data": {
"createOrUpdateProduct": {"products": [ProductOutput]}
}
}
createOrUpdateReview
Description
Creates or updates a review, depending on whether it exists in the database. The existence of the review is determined by the identifier.
Response
Returns a Reviews
Arguments
Name | Description |
---|---|
connectionIdImport - Int!
|
Import connection id (required) |
input - [ReviewInput!]
|
Example
Query
mutation CreateOrUpdateReview(
$connectionIdImport: Int!,
$input: [ReviewInput!]
) {
createOrUpdateReview(
connectionIdImport: $connectionIdImport,
input: $input
) {
reviews {
identifier
}
errors {
message
code
}
}
}
Variables
{"connectionIdImport": 123, "input": [ReviewInput]}
Response
{
"data": {
"createOrUpdateReview": {
"reviews": [ReviewOutput],
"errors": [ErrorOutput]
}
}
}
Types
Article
Fields
Field Name | Description |
---|---|
articleId - Int
|
|
identifier - String!
|
|
status - ProductStatus
|
|
translation - ArticleTranslation
|
|
customData - [CustomData]
|
Example
{
"articleId": 123,
"identifier": "xyz789",
"status": "TRANSLATION_WAITING",
"translation": ArticleTranslation,
"customData": [CustomData]
}
ArticleConnection
Description
A paginated list of Article edges.
Fields
Field Name | Description |
---|---|
pageInfo - PageInfo!
|
Pagination information about the list of edges. |
edges - [ArticleEdge!]!
|
A list of Article edges. |
Example
{
"pageInfo": PageInfo,
"edges": [ArticleEdge]
}
ArticleEdge
ArticleInput
Fields
Input Field | Description |
---|---|
identifier - String!
|
|
sourceUrl - String
|
|
sourceText - ArticleSourceTextInput!
|
|
customData - [CustomDataInput!]
|
Example
{
"identifier": "abc123",
"sourceUrl": "abc123",
"sourceText": ArticleSourceTextInput,
"customData": [CustomDataInput]
}
ArticleOutput
ArticleSourceTextInput
Example
{
"title": "abc123",
"perex": "xyz789",
"text": "xyz789",
"seoTitle": "xyz789",
"seoPerex": "abc123",
"seoUrl": "xyz789",
"seoKeywords": "xyz789"
}
ArticleTranslation
Example
{
"language": "cs_CZ",
"title": "abc123",
"perex": "abc123",
"text": "xyz789",
"seoTitle": "abc123",
"seoPerex": "abc123",
"seoUrl": "xyz789",
"seoKeywords": "abc123"
}
Articles
Fields
Field Name | Description |
---|---|
articles - [ArticleOutput]
|
Example
{"articles": [ArticleOutput]}
Boolean
Description
The Boolean
scalar type represents true
or false
.
Brand
Fields
Field Name | Description |
---|---|
brandId - Int
|
|
identifier - String!
|
|
brand - String!
|
|
translation - BrandTranslation
|
Example
{
"brandId": 987,
"identifier": "abc123",
"brand": "xyz789",
"translation": BrandTranslation
}
BrandConnection
Description
A paginated list of Brand edges.
Fields
Field Name | Description |
---|---|
pageInfo - PageInfo!
|
Pagination information about the list of edges. |
edges - [BrandEdge!]!
|
A list of Brand edges. |
Example
{
"pageInfo": PageInfo,
"edges": [BrandEdge]
}
BrandEdge
BrandProductInput
Fields
Input Field | Description |
---|---|
identifier - String!
|
|
brand - String!
|
|
sourceText - BrandSourceTextInput
|
Example
{
"identifier": "abc123",
"brand": "abc123",
"sourceText": BrandSourceTextInput
}
BrandSourceTextInput
BrandTranslation
Fields
Field Name | Description |
---|---|
language - LanguageEnum
|
|
description - String
|
|
seoTitle - String
|
|
seoDescription - String
|
|
seoKeywords - String
|
Example
{
"language": "cs_CZ",
"description": "abc123",
"seoTitle": "xyz789",
"seoDescription": "abc123",
"seoKeywords": "xyz789"
}
Category
Fields
Field Name | Description |
---|---|
categoryId - Int
|
|
identifier - String!
|
|
translation - CategoryTranslation
|
Example
{
"categoryId": 987,
"identifier": "xyz789",
"translation": CategoryTranslation
}
CategoryConnection
Description
A paginated list of Category edges.
Fields
Field Name | Description |
---|---|
pageInfo - PageInfo!
|
Pagination information about the list of edges. |
edges - [CategoryEdge!]!
|
A list of Category edges. |
Example
{
"pageInfo": PageInfo,
"edges": [CategoryEdge]
}
CategoryEdge
CategoryProductInput
Fields
Input Field | Description |
---|---|
identifier - String!
|
|
parentIdentifier - String
|
|
sourceText - CategorySourceTextInput!
|
Example
{
"identifier": "xyz789",
"parentIdentifier": "abc123",
"sourceText": CategorySourceTextInput
}
CategorySourceTextInput
Example
{
"title": "xyz789",
"description": "abc123",
"description2": "xyz789",
"seoTitle": "abc123",
"seoDescription": "abc123",
"seoKeywords": "abc123",
"menuTitle": "abc123"
}
CategoryTranslation
Example
{
"language": "cs_CZ",
"title": "abc123",
"description": "abc123",
"description2": "abc123",
"seoTitle": "abc123",
"seoDescription": "abc123",
"seoKeywords": "abc123",
"menuTitle": "xyz789"
}
CurrencyEnum
Values
Enum Value | Description |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
"CZK"
CustomData
CustomDataInput
ErrorOutput
Float
Description
The Float
scalar type represents signed double-precision fractional values as specified by IEEE 754.
Example
123.45
Image
Fields
Field Name | Description |
---|---|
imageId - Int
|
|
url - String!
|
|
translation - ImageTranslation
|
Example
{
"imageId": 123,
"url": "xyz789",
"translation": ImageTranslation
}
ImageProductInput
Fields
Input Field | Description |
---|---|
identifier - String!
|
|
src - String!
|
|
position - Int
|
|
sourceText - ImageSourceTextInput
|
Example
{
"identifier": "xyz789",
"src": "abc123",
"position": 123,
"sourceText": ImageSourceTextInput
}
ImageSourceTextInput
Fields
Input Field | Description |
---|---|
alt - String!
|
Example
{"alt": "xyz789"}
ImageTranslation
Fields
Field Name | Description |
---|---|
language - LanguageEnum
|
|
alt - String!
|
Example
{"language": "cs_CZ", "alt": "abc123"}
Int
Description
The Int
scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
Example
987
Language
LanguageEnum
Values
Enum Value | Description |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
"cs_CZ"
Option
Fields
Field Name | Description |
---|---|
optionId - Int
|
|
variant - Int
|
|
type - String
|
|
identifier - String!
|
|
translation - OptionTranslation
|
|
values - [OptionValue!]
|
Example
{
"optionId": 987,
"variant": 123,
"type": "xyz789",
"identifier": "xyz789",
"translation": OptionTranslation,
"values": [OptionValue]
}
OptionConnection
Description
A paginated list of Option edges.
Fields
Field Name | Description |
---|---|
pageInfo - PageInfo!
|
Pagination information about the list of edges. |
edges - [OptionEdge!]!
|
A list of Option edges. |
Example
{
"pageInfo": PageInfo,
"edges": [OptionEdge]
}
OptionEdge
OptionProductInput
Fields
Input Field | Description |
---|---|
identifier - String!
|
|
sourceText - OptionSourceTextInput!
|
|
values - [OptionValueInput!]!
|
Example
{
"identifier": "xyz789",
"sourceText": OptionSourceTextInput,
"values": [OptionValueInput]
}
OptionSourceTextInput
OptionTranslation
Fields
Field Name | Description |
---|---|
language - LanguageEnum
|
|
name - String!
|
|
description - String
|
|
displayName - String
|
Example
{
"language": "cs_CZ",
"name": "abc123",
"description": "abc123",
"displayName": "abc123"
}
OptionValue
Fields
Field Name | Description |
---|---|
valueId - Int
|
|
identifier - String
|
|
translation - OptionValueTranslation
|
Example
{
"valueId": 987,
"identifier": "abc123",
"translation": OptionValueTranslation
}
OptionValueInput
Fields
Input Field | Description |
---|---|
identifier - String!
|
|
sourceText - OptionValueSourceTextInput!
|
Example
{
"identifier": "xyz789",
"sourceText": OptionValueSourceTextInput
}
OptionValueSourceTextInput
OptionValueTranslation
Fields
Field Name | Description |
---|---|
language - LanguageEnum
|
|
name - String
|
|
description - String
|
Example
{
"language": "cs_CZ",
"name": "xyz789",
"description": "abc123"
}
PageInfo
Description
Information about pagination using a Relay style cursor connection.
Fields
Field Name | Description |
---|---|
hasNextPage - Boolean!
|
When paginating forwards, are there more items? |
hasPreviousPage - Boolean!
|
When paginating backwards, are there more items? |
startCursor - String
|
The cursor to continue paginating backwards. |
endCursor - String
|
The cursor to continue paginating forwards. |
total - Int!
|
Total number of nodes in the paginated connection. |
count - Int!
|
Number of nodes in the current page. |
currentPage - Int!
|
Index of the current page. |
lastPage - Int!
|
Index of the last available page. |
Example
{
"hasNextPage": true,
"hasPreviousPage": true,
"startCursor": "abc123",
"endCursor": "abc123",
"total": 987,
"count": 987,
"currentPage": 987,
"lastPage": 123
}
Product
Fields
Field Name | Description |
---|---|
productId - Int
|
Unique LOCO product ID |
status - ProductStatus
|
Product status |
identifier - String
|
Unique client product ID |
code - String
|
Client product CODE |
url - String
|
Product source URL |
imageId - Int
|
Product default image ID |
translation - ProductTranslation
|
Product texts for translation |
variants - [Variant!]!
|
|
categories - [Category!]!
|
|
reviews - [Review!]!
|
|
options - [Option!]!
|
|
tags - [Tag!]!
|
|
brands - [Brand!]!
|
|
images - [Image!]!
|
Example
{
"productId": 123,
"status": "TRANSLATION_WAITING",
"identifier": "xyz789",
"code": "abc123",
"url": "abc123",
"imageId": 123,
"translation": ProductTranslation,
"variants": [Variant],
"categories": [Category],
"reviews": [Review],
"options": [Option],
"tags": [Tag],
"brands": [Brand],
"images": [Image]
}
ProductConnection
Description
A paginated list of Product edges.
Fields
Field Name | Description |
---|---|
pageInfo - PageInfo!
|
Pagination information about the list of edges. |
edges - [ProductEdge!]!
|
A list of Product edges. |
Example
{
"pageInfo": PageInfo,
"edges": [ProductEdge]
}
ProductEdge
ProductInput
Fields
Input Field | Description |
---|---|
identifier - String!
|
|
code - String
|
|
sourceUrl - String
|
|
imageIdentifier - String
|
|
sourceText - ProductSourceTextInput!
|
|
variants - [ProductVariantInput!]!
|
|
categories - [CategoryProductInput!]
|
|
reviews - [ReviewProductInput!]
|
|
options - [OptionProductInput!]
|
|
tags - [TagProductInput!]
|
|
brands - [BrandProductInput!]
|
|
images - [ImageProductInput!]
|
Example
{
"identifier": "abc123",
"code": "xyz789",
"sourceUrl": "xyz789",
"imageIdentifier": "abc123",
"sourceText": ProductSourceTextInput,
"variants": [ProductVariantInput],
"categories": [CategoryProductInput],
"reviews": [ReviewProductInput],
"options": [OptionProductInput],
"tags": [TagProductInput],
"brands": [BrandProductInput],
"images": [ImageProductInput]
}
ProductOutput
ProductSourceTextInput
Example
{
"title": "xyz789",
"description": "xyz789",
"description2": "abc123",
"descriptionShort": "abc123",
"seoTitle": "abc123",
"seoDescription": "xyz789",
"seoUrl": "xyz789"
}
ProductStatus
Values
Enum Value | Description |
---|---|
|
Product is waiting for translation |
|
The translation ended with an error |
|
The product is translated |
|
The product is awaiting export |
|
Product export error |
|
The product is exported |
Example
"TRANSLATION_WAITING"
ProductTranslation
Example
{
"language": "cs_CZ",
"title": "abc123",
"description": "abc123",
"description2": "abc123",
"descriptionShort": "abc123",
"seoTitle": "abc123",
"seoDescription": "xyz789",
"seoUrl": "abc123"
}
ProductVariantInput
Fields
Input Field | Description |
---|---|
identifier - String!
|
|
sku - String
|
|
ean - String
|
|
stock - Float
|
|
imageIdentifier - String
|
|
price - Float
|
|
currency - CurrencyEnum
|
|
sourceText - ProductVariantSourceTextInput
|
|
options - [OptionProductInput!]
|
Example
{
"identifier": "xyz789",
"sku": "abc123",
"ean": "abc123",
"stock": 987.65,
"imageIdentifier": "xyz789",
"price": 123.45,
"currency": "CZK",
"sourceText": ProductVariantSourceTextInput,
"options": [OptionProductInput]
}
ProductVariantSourceTextInput
Products
Fields
Field Name | Description |
---|---|
products - [ProductOutput]
|
Example
{"products": [ProductOutput]}
Review
Fields
Field Name | Description |
---|---|
reviewId - Int
|
|
identifier - String!
|
|
translation - ReviewTranslation
|
Example
{
"reviewId": 123,
"identifier": "abc123",
"translation": ReviewTranslation
}
ReviewConnection
Description
A paginated list of Review edges.
Fields
Field Name | Description |
---|---|
pageInfo - PageInfo!
|
Pagination information about the list of edges. |
edges - [ReviewEdge!]!
|
A list of Review edges. |
Example
{
"pageInfo": PageInfo,
"edges": [ReviewEdge]
}
ReviewEdge
ReviewInput
Fields
Input Field | Description |
---|---|
identifier - String!
|
|
productIdentifier - String!
|
|
rating - Int
|
|
sourceText - ReviewSourceTextInput!
|
|
customData - [CustomDataInput!]
|
Example
{
"identifier": "xyz789",
"productIdentifier": "xyz789",
"rating": 123,
"sourceText": ReviewSourceTextInput,
"customData": [CustomDataInput]
}
ReviewOutput
Fields
Field Name | Description |
---|---|
identifier - String
|
Example
{"identifier": "xyz789"}
ReviewProductInput
Fields
Input Field | Description |
---|---|
identifier - String!
|
|
rating - Int
|
|
sourceText - ReviewSourceTextInput!
|
|
customData - [CustomDataInput!]
|
Example
{
"identifier": "xyz789",
"rating": 123,
"sourceText": ReviewSourceTextInput,
"customData": [CustomDataInput]
}
ReviewSourceTextInput
ReviewTranslation
Reviews
Fields
Field Name | Description |
---|---|
reviews - [ReviewOutput]
|
|
errors - [ErrorOutput]
|
Example
{
"reviews": [ReviewOutput],
"errors": [ErrorOutput]
}
String
Description
The String
scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
Example
"abc123"
Tag
Fields
Field Name | Description |
---|---|
tagId - Int
|
|
identifier - String!
|
|
translation - TagTranslation
|
Example
{
"tagId": 123,
"identifier": "xyz789",
"translation": TagTranslation
}
TagConnection
Description
A paginated list of Tag edges.
Fields
Field Name | Description |
---|---|
pageInfo - PageInfo!
|
Pagination information about the list of edges. |
edges - [TagEdge!]!
|
A list of Tag edges. |
Example
{
"pageInfo": PageInfo,
"edges": [TagEdge]
}
TagEdge
TagProductInput
Fields
Input Field | Description |
---|---|
identifier - String!
|
|
sourceText - TagTranslationInput!
|
Example
{
"identifier": "xyz789",
"sourceText": TagTranslationInput
}
TagTranslation
Example
{
"language": "cs_CZ",
"name": "abc123",
"description": "xyz789",
"seoTitle": "abc123",
"seoDescription": "xyz789",
"seoKeywords": "abc123"
}
TagTranslationInput
Variant
Fields
Field Name | Description |
---|---|
variantId - Int
|
|
identifier - String!
|
|
price - Float
|
|
currency - CurrencyEnum
|
|
sku - String
|
|
ean - String
|
|
stock - Float
|
|
imageId - Int
|
|
options - [Option!]!
|
|
translation - VariantTranslation
|
Example
{
"variantId": 987,
"identifier": "xyz789",
"price": 987.65,
"currency": "CZK",
"sku": "xyz789",
"ean": "xyz789",
"stock": 123.45,
"imageId": 123,
"options": [Option],
"translation": VariantTranslation
}
VariantTranslation
Fields
Field Name | Description |
---|---|
language - LanguageEnum
|
|
title - String!
|
|
description - String
|
|
description2 - String
|
|
descriptionShort - String
|
Example
{
"language": "cs_CZ",
"title": "xyz789",
"description": "xyz789",
"description2": "xyz789",
"descriptionShort": "abc123"
}