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>
Webhook
Webhooks vám umožňují automaticky stahovat přeložené produkty a další texty z LOCO aplikace.
Nastavení Webhooku
- V administraci LOCO aplikace na stránce https://loco-app.expan.do/admin/setting/api si vytvořte nový webhook, kde zadejte URL adresu, na kterou se budou odesílat data.
- V exportním připojení nastavte, které webhooks se budou spouštět.
Funkce Webhooku
V pravidelných intervalech, dle nastavení časovače v exportním připojení, se budou přeložená data odesílat na vaši URL adresu pomocí POST požadavku. Odeslané záznamy se v LOCO označí jako vyexportované.
Zabezpečení komunikace
- Webhooky jsou podepsány pomocí tajného klíče, který zjistíme v aplikaci na stránce https://loco-app.expan.do/admin/setting/api
- Ověření na straně klienta lze provést např. takto:
$secret = 'XXX'; // Tajný klíč $body = file_get_contents('php://input'); // Získání těla zprávy $signature = $_SERVER['HTTP_SIGNATURE']; // Získání signature z hlavičky // Vytvoření HMAC hash $hash = hash_hmac('sha256', $body, $secret); // Ověření signature if (hash_equals($hash, $signature)) { // Signature je platná } else { // Signature není platná }
Přeložené produkty [product:translated]
Example
Response
{
"data": {
"connectionIdExport": 7,
"products": [
{
"node": {
"productId": 8125,
"status": "EXPORT_WAITING",
"identifier": "API_PRODUCT_2",
"url": null,
"translation": {
"language": "cs_CZ",
"title": "R\u016f\u017eov\u00e1 bota",
"description": null,
"description2": null,
"descriptionShort": null,
"seoTitle": null,
"seoDescription": null,
"seoUrl": null
},
"variants": [
{
"variantId": 8125,
"identifier": "API_VARINAT_2",
"price": null,
"currency": null,
"sku": null,
"ean": null,
"stock": null,
"imageId": null,
"translation": null,
"options": [
{
"optionId": 3,
"variant": 1,
"type": null,
"identifier": "API_OPTION_1",
"translation": {
"language": "cs_CZ",
"name": "Option 1",
"description": null,
"displayName": null
},
"values": [
{
"valueId": 3,
"identifier": "API_OPTION_VALUE_1",
"translation": {
"language": "cs_CZ",
"name": "Option value 1",
"description": null
}
}
]
},
{
"optionId": 4,
"variant": 1,
"type": null,
"identifier": "API_OPTION_2",
"translation": {
"language": "cs_CZ",
"name": "Option 2",
"description": null,
"displayName": null
},
"values": [
{
"valueId": 4,
"identifier": "API_OPTION_VALUE_2",
"translation": {
"language": "cs_CZ",
"name": "Option value 2",
"description": null
}
}
]
}
]
}
],
"options": [
{
"optionId": 1,
"variant": 0,
"type": null,
"identifier": "API_OPTION_3",
"translation": {
"language": "cs_CZ",
"name": "Option 3",
"description": null,
"displayName": null
},
"values": [
{
"valueId": 1,
"identifier": "API_OPTION_VALUE_3",
"translation": {
"language": "cs_CZ",
"name": "Option value 3",
"description": null
}
}
]
},
{
"optionId": 2,
"variant": 0,
"type": null,
"identifier": "API_OPTION_4",
"translation": {
"language": "cs_CZ",
"name": "Option 4",
"description": null,
"displayName": null
},
"values": [
{
"valueId": 2,
"identifier": "API_OPTION_VALUE_4",
"translation": {
"language": "cs_CZ",
"name": "Option value 4",
"description": null
}
}
]
}
],
"reviews": [
{
"reviewId": 2,
"identifier": "API_REVIEW_1",
"translation": {
"language": "cs_CZ",
"title": "Divn\u00e1 barba",
"description": null,
"reply": null,
"pros": null,
"cons": null
}
}
],
"categories": [
{
"categoryId": 1,
"identifier": "API_CATEGORY_1",
"translation": {
"language": "cs_CZ",
"title": "Knihy",
"description": null,
"description2": null,
"seoTitle": null,
"seoDescription": null,
"seoKeywords": null,
"menuTitle": null
}
}
],
"tags": [
{
"tagId": 1,
"identifier": "API_TAG_1",
"translation": {
"language": "cs_CZ",
"name": "Sleva",
"description": null,
"seoTitle": null,
"seoDescription": null,
"seoKeywords": null
}
}
],
"brands": [
{
"brandId": 1,
"identifier": "API_BRAND_1",
"brand": "Nike",
"translation": {
"language": "cs_CZ",
"description": "Nike je super",
"seoTitle": null,
"seoDescription": null,
"seoKeywords": null
}
}
],
"images": [
{
"imageId": 8124,
"url": "https:\/\/www.metalshop.cz\/images\/produkty\/thumb\/l062.JPG",
"translation": null
}
]
}
}
]
}
}
Přeložené články [article:translated]
Example
Response
{
"data": {
"connectionIdExport": 7,
"articles": [
{
"node": {
"articleId": 1,
"status": '',
"identifier": '',
"translation": {
"language": 'text',
"title": null,
"perex": null,
"text": null,
"seoTitle": null,
"seoPerex": null,
"seoKeywords": null,
"seoUrl": null,
}
}
}
]
}
}
Přeložený vlastní obsah [custom_content:translated]
Example
Response
{
"data": {
"connectionIdExport": 7,
"contents": [
{
"node": {
"contentId": 1,
"status": '',
"identifier": '',
"customData": [
{
"key": '',
"value": ''
}
],
"translation": {
"text1": 'text',
"text2": null,
"text3": null,
"text4": null,
"text5": null,
}
}
}
]
}
}
Notifikace typu chyba [notification:error]
Example
Response
{
"data": {
"connectionIdExport": 7,
"notifications": [
{
"node": {
"type": 'translate-error',
"modelType": 'product',
"modelId": 123,
"message": 'An error'
}
}
]
}
}
Přeložené kategorie [category:translated]
Example
Response
{
"data": {
"connectionIdExport": 7,
"categories": [
{
"node": {
"categoryId": 1,
"identifier": "API_CATEGORY_1",
"translation": {
"description": null,
"description2": null,
"language": "cs_CZ",
"menuTitle": null,
"seoDescription": null,
"seoKeywords": null,
"seoTitle": null,
"title": "Knihy"
}
}
}
]
}
}
Přeložené recenze [review:translated]
Example
Response
{
"data": {
"connectionIdExport": 7,
"reviews": [
{
"node": {
"reviewId": 1,
"identifier": "API_REVIEW_1",
"translation": {
"language": "cs_CZ",
"title": "Super produkt, koup\u00edm znovu",
"description": "Tralalala",
"reply": null,
"pros": "Jo jako jde to",
"cons": "Nic nem\u00e1m"
}
}
},
{
"node": {
"reviewId": 2,
"identifier": "API_REVIEW_1",
"translation": {
"language": "cs_CZ",
"title": "Divn\u00e1 barba",
"description": null,
"reply": null,
"pros": null,
"cons": null
}
}
}
]
}
}
Přeložené značky [brand:translated]
Example
Response
{
"data": {
"connectionIdExport": 7,
"brands": [
{
"node": {
"brandId": 1,
"identifier": "API_BRAND_1",
"brand": "Značka",
"translation": {
"description": null,
"language": "cs_CZ",
"seoDescription": null,
"seoKeywords": null,
"seoTitle": null
}
}
}
]
}
}
Přeložené štítky [tag:translated]
Example
Response
{
"data": {
"connectionIdExport": 7,
"tags": [
{
"node": {
"tagId": 1,
"identifier": "API_TAG_1",
"translation": {
"name": null,
"description": null,
"language": "cs_CZ",
"seoDescription": null,
"seoKeywords": null,
"seoTitle": null,
}
}
}
]
}
}
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": 123,
"articleId": 123,
"identifier": "abc123",
"articleIds": [123],
"first": 123,
"after": "xyz789"
}
Response
{
"data": {
"articles": {
"pageInfo": PageInfo,
"edges": [ArticleEdge]
}
}
}
brands
Response
Returns a BrandConnection!
Arguments
| Name | Description |
|---|---|
connectionIdExport - Int!
|
Export connection id (required) |
brandId - Int
|
Filter by brand ID |
identifier - String
|
Filter by identifier |
brandIds - [Int]
|
Filter by array brand ID |
first - Int!
|
Limits number of fetched items. |
after - String
|
A cursor after which elements are returned. |
Example
Query
query Brands(
$connectionIdExport: Int!,
$brandId: Int,
$identifier: String,
$brandIds: [Int],
$first: Int!,
$after: String
) {
brands(
connectionIdExport: $connectionIdExport,
brandId: $brandId,
identifier: $identifier,
brandIds: $brandIds,
first: $first,
after: $after
) {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
total
count
currentPage
lastPage
}
edges {
node {
...BrandFragment
}
cursor
}
}
}
Variables
{
"connectionIdExport": 987,
"brandId": 123,
"identifier": "abc123",
"brandIds": [987],
"first": 123,
"after": "xyz789"
}
Response
{
"data": {
"brands": {
"pageInfo": PageInfo,
"edges": [BrandEdge]
}
}
}
categories
Response
Returns a CategoryConnection!
Arguments
| Name | Description |
|---|---|
connectionIdExport - Int!
|
Export connection id (required) |
categoryId - Int
|
Filter by category ID |
identifier - String
|
Filter by identifier |
categoryIds - [Int]
|
Filter by array category ID |
first - Int!
|
Limits number of fetched items. |
after - String
|
A cursor after which elements are returned. |
Example
Query
query Categories(
$connectionIdExport: Int!,
$categoryId: Int,
$identifier: String,
$categoryIds: [Int],
$first: Int!,
$after: String
) {
categories(
connectionIdExport: $connectionIdExport,
categoryId: $categoryId,
identifier: $identifier,
categoryIds: $categoryIds,
first: $first,
after: $after
) {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
total
count
currentPage
lastPage
}
edges {
node {
...CategoryFragment
}
cursor
}
}
}
Variables
{
"connectionIdExport": 987,
"categoryId": 123,
"identifier": "xyz789",
"categoryIds": [987],
"first": 987,
"after": "xyz789"
}
Response
{
"data": {
"categories": {
"pageInfo": PageInfo,
"edges": [CategoryEdge]
}
}
}
customContents
Response
Returns a CustomContentConnection!
Arguments
| Name | Description |
|---|---|
connectionIdExport - Int!
|
Export connection id (required) |
contentId - Int
|
Filter by content ID |
identifier - String
|
Filter by identifier |
contentIds - [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 CustomContents(
$connectionIdExport: Int!,
$contentId: Int,
$identifier: String,
$contentIds: [Int],
$first: Int!,
$after: String
) {
customContents(
connectionIdExport: $connectionIdExport,
contentId: $contentId,
identifier: $identifier,
contentIds: $contentIds,
first: $first,
after: $after
) {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
total
count
currentPage
lastPage
}
edges {
node {
...CustomContentFragment
}
cursor
}
}
}
Variables
{
"connectionIdExport": 123,
"contentId": 987,
"identifier": "abc123",
"contentIds": [987],
"first": 987,
"after": "abc123"
}
Response
{
"data": {
"customContents": {
"pageInfo": PageInfo,
"edges": [CustomContentEdge]
}
}
}
glossaries
Response
Returns a GlossaryPagination!
Example
Query
query Glossaries(
$page: Int,
$onPage: Int,
$fulltext: String
) {
glossaries(
page: $page,
onPage: $onPage,
fulltext: $fulltext
) {
data {
id
languageFrom
languageTo
textSource
textTarget
limitation
}
currentPage
perPage
totalCount
totalPage
}
}
Variables
{
"page": 1,
"onPage": 100,
"fulltext": "abc123"
}
Response
{
"data": {
"glossaries": {
"data": [Glossary],
"currentPage": 987,
"perPage": 987,
"totalCount": 987,
"totalPage": 987
}
}
}
languages
Description
Return all languages
Response
Returns [Language!]!
Example
Query
query Languages {
languages {
languageId
icu
}
}
Response
{
"data": {
"languages": [
{"languageId": 123, "icu": "abc123"}
]
}
}
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": "xyz789"
}
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 |
identifier - String
|
Filter by identifier |
productId - Int
|
Filter by product ID |
productIds - [Int]
|
Filter by array product ID |
filterHash - String
|
Filter hash contains filter information, you can get it using productFilterLanguageCreate |
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],
$filterHash: String,
$first: Int!,
$after: String
) {
products(
connectionIdExport: $connectionIdExport,
identifier: $identifier,
productId: $productId,
productIds: $productIds,
filterHash: $filterHash,
first: $first,
after: $after
) {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
total
count
currentPage
lastPage
}
edges {
node {
...ProductFragment
}
cursor
}
}
}
Variables
{
"connectionIdExport": 123,
"identifier": "abc123",
"productId": 123,
"productIds": [123],
"filterHash": "abc123",
"first": 987,
"after": "xyz789"
}
Response
{
"data": {
"products": {
"pageInfo": PageInfo,
"edges": [ProductEdge]
}
}
}
reviews
Response
Returns a ReviewConnection!
Arguments
| Name | Description |
|---|---|
connectionIdExport - Int!
|
Export connection id (required) |
reviewId - Int
|
Filter by review ID |
identifier - String
|
Filter by identifier |
reviewIds - [Int]
|
Filter by array review ID |
first - Int!
|
Limits number of fetched items. |
after - String
|
A cursor after which elements are returned. |
Example
Query
query Reviews(
$connectionIdExport: Int!,
$reviewId: Int,
$identifier: String,
$reviewIds: [Int],
$first: Int!,
$after: String
) {
reviews(
connectionIdExport: $connectionIdExport,
reviewId: $reviewId,
identifier: $identifier,
reviewIds: $reviewIds,
first: $first,
after: $after
) {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
total
count
currentPage
lastPage
}
edges {
node {
...ReviewFragment
}
cursor
}
}
}
Variables
{
"connectionIdExport": 987,
"reviewId": 987,
"identifier": "xyz789",
"reviewIds": [123],
"first": 123,
"after": "xyz789"
}
Response
{
"data": {
"reviews": {
"pageInfo": PageInfo,
"edges": [ReviewEdge]
}
}
}
Mutations
articleCreateOrUpdate
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 ArticleCreateOrUpdate(
$connectionIdImport: Int!,
$input: [ArticleInput!]
) {
articleCreateOrUpdate(
connectionIdImport: $connectionIdImport,
input: $input
) {
articles {
articleId
identifier
}
}
}
Variables
{"connectionIdImport": 123, "input": [ArticleInput]}
Response
{
"data": {
"articleCreateOrUpdate": {"articles": [ArticleOutput]}
}
}
categoryCreateOrUpdate
Description
Creates or updates a category, depending on whether it exists in the database. The existence of the category is determined by the identifier.
Response
Returns a Categories
Arguments
| Name | Description |
|---|---|
connectionIdImport - Int!
|
Import connection id (required) |
input - [CategoryInput!]
|
Example
Query
mutation CategoryCreateOrUpdate(
$connectionIdImport: Int!,
$input: [CategoryInput!]
) {
categoryCreateOrUpdate(
connectionIdImport: $connectionIdImport,
input: $input
) {
categories {
categoryId
identifier
}
errors {
message
code
}
}
}
Variables
{"connectionIdImport": 123, "input": [CategoryInput]}
Response
{
"data": {
"categoryCreateOrUpdate": {
"categories": [CategoryOutput],
"errors": [ErrorOutput]
}
}
}
createOrUpdateArticle
Response
Returns an Articles
Arguments
| Name | Description |
|---|---|
connectionIdImport - Int!
|
|
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]}
}
}
createOrUpdateCustomContent
Response
Returns a CustomContents
Arguments
| Name | Description |
|---|---|
connectionIdImport - Int!
|
|
input - [CustomContentInput!]
|
Example
Query
mutation CreateOrUpdateCustomContent(
$connectionIdImport: Int!,
$input: [CustomContentInput!]
) {
createOrUpdateCustomContent(
connectionIdImport: $connectionIdImport,
input: $input
) {
contents {
contentId
identifier
}
}
}
Variables
{"connectionIdImport": 987, "input": [CustomContentInput]}
Response
{
"data": {
"createOrUpdateCustomContent": {
"contents": [CustomContentOutput]
}
}
}
createOrUpdateProduct
Response
Returns a Products
Arguments
| Name | Description |
|---|---|
connectionIdImport - Int!
|
|
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
Response
Returns a Reviews
Arguments
| Name | Description |
|---|---|
connectionIdImport - Int!
|
|
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]
}
}
}
customContentCreateOrUpdate
Description
Creates or updates a custom content, depending on whether it exists in the database. The existence of the custom content is determined by the identifier.
Response
Returns a CustomContents
Arguments
| Name | Description |
|---|---|
connectionIdImport - Int!
|
Import connection id (required) |
input - [CustomContentInput!]
|
Example
Query
mutation CustomContentCreateOrUpdate(
$connectionIdImport: Int!,
$input: [CustomContentInput!]
) {
customContentCreateOrUpdate(
connectionIdImport: $connectionIdImport,
input: $input
) {
contents {
contentId
identifier
}
}
}
Variables
{"connectionIdImport": 987, "input": [CustomContentInput]}
Response
{
"data": {
"customContentCreateOrUpdate": {
"contents": [CustomContentOutput]
}
}
}
glossaryItemCreateOrUpdate
Description
Creates or updates a glossary item, depending on whether it exists in the database. The existence of the glossary item is determined by the textSource, languageFrom and languageTo. If you want to update limitation to none value, you need to send 'limitation' with null value.
Response
Returns a Glossaries
Arguments
| Name | Description |
|---|---|
input - [CreateGlossaryInput!]
|
Example
Query
mutation GlossaryItemCreateOrUpdate($input: [CreateGlossaryInput!]) {
glossaryItemCreateOrUpdate(input: $input) {
glossaries {
glossaryId
}
errors {
message
code
}
}
}
Variables
{"input": [CreateGlossaryInput]}
Response
{
"data": {
"glossaryItemCreateOrUpdate": {
"glossaries": [GlossaryOutput],
"errors": [ErrorOutput]
}
}
}
glossaryItemDelete
Description
Deletes a glossary item by his ID.
Response
Returns an ActionDefaultResponse!
Arguments
| Name | Description |
|---|---|
id - [ID!]
|
Example
Query
mutation GlossaryItemDelete($id: [ID!]) {
glossaryItemDelete(id: $id) {
status
errors {
message
code
}
}
}
Variables
{"id": [4]}
Response
{
"data": {
"glossaryItemDelete": {
"status": "SUCCESS",
"errors": [ErrorOutput]
}
}
}
productCreateOrUpdate
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 ProductCreateOrUpdate(
$connectionIdImport: Int!,
$input: [ProductInput!]
) {
productCreateOrUpdate(
connectionIdImport: $connectionIdImport,
input: $input
) {
products {
productId
identifier
}
}
}
Variables
{"connectionIdImport": 987, "input": [ProductInput]}
Response
{
"data": {
"productCreateOrUpdate": {"products": [ProductOutput]}
}
}
productExportCommit
Response
Returns an ActionDefaultResponse!
Example
Query
mutation ProductExportCommit(
$connectionIdExport: Int!,
$productIdentifier: String,
$productIds: [Int]
) {
productExportCommit(
connectionIdExport: $connectionIdExport,
productIdentifier: $productIdentifier,
productIds: $productIds
) {
status
errors {
message
code
}
}
}
Variables
{
"connectionIdExport": 123,
"productIdentifier": "abc123",
"productIds": [987]
}
Response
{
"data": {
"productExportCommit": {
"status": "SUCCESS",
"errors": [ErrorOutput]
}
}
}
productTranslationDelete
Description
Deletes product translation by his ID.
Response
Returns an ActionDefaultResponse!
Arguments
| Name | Description |
|---|---|
language - LanguageEnum
|
The language to remove the translation. If it is not specified, all product translations are removed. |
productIdentifier - String
|
Filter by identifier |
productIds - [Int]
|
Filter by array product ID |
Example
Query
mutation ProductTranslationDelete(
$language: LanguageEnum,
$productIdentifier: String,
$productIds: [Int]
) {
productTranslationDelete(
language: $language,
productIdentifier: $productIdentifier,
productIds: $productIds
) {
status
errors {
message
code
}
}
}
Variables
{
"language": "cs_CZ",
"productIdentifier": "xyz789",
"productIds": [987]
}
Response
{
"data": {
"productTranslationDelete": {
"status": "SUCCESS",
"errors": [ErrorOutput]
}
}
}
reviewCreateOrUpdate
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 ReviewCreateOrUpdate(
$connectionIdImport: Int!,
$input: [ReviewInput!]
) {
reviewCreateOrUpdate(
connectionIdImport: $connectionIdImport,
input: $input
) {
reviews {
identifier
}
errors {
message
code
}
}
}
Variables
{"connectionIdImport": 123, "input": [ReviewInput]}
Response
{
"data": {
"reviewCreateOrUpdate": {
"reviews": [ReviewOutput],
"errors": [ErrorOutput]
}
}
}
Types
ActionDefaultResponse
Fields
| Field Name | Description |
|---|---|
status - ActionStatusResponse!
|
|
errors - [ErrorOutput]
|
Example
{"status": "SUCCESS", "errors": [ErrorOutput]}
ActionStatusResponse
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
Example
"SUCCESS"
Article
Fields
| Field Name | Description |
|---|---|
articleId - Int
|
|
identifier - String!
|
|
status - ProductStatus
|
|
translation - ArticleTranslation
|
|
customData - [CustomData]
|
Example
{
"articleId": 123,
"identifier": "abc123",
"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": "xyz789",
"sourceUrl": "xyz789",
"sourceText": ArticleSourceTextInput,
"customData": [CustomDataInput]
}
ArticleOutput
ArticleSourceTextInput
Example
{
"title": "abc123",
"perex": "abc123",
"text": "xyz789",
"seoTitle": "abc123",
"seoPerex": "xyz789",
"seoUrl": "abc123",
"seoKeywords": "abc123"
}
ArticleTranslation
Example
{
"language": "cs_CZ",
"title": "abc123",
"perex": "abc123",
"text": "xyz789",
"seoTitle": "xyz789",
"seoPerex": "abc123",
"seoUrl": "abc123",
"seoKeywords": "xyz789"
}
Articles
Fields
| Field Name | Description |
|---|---|
articles - [ArticleOutput]
|
Example
{"articles": [ArticleOutput]}
Boolean
Description
The Boolean scalar type represents true or false.
Example
true
Brand
Fields
| Field Name | Description |
|---|---|
brandId - Int
|
|
identifier - String!
|
|
brand - String!
|
|
translation - BrandTranslation
|
Example
{
"brandId": 987,
"identifier": "xyz789",
"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": "xyz789",
"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": "xyz789",
"seoTitle": "abc123",
"seoDescription": "xyz789",
"seoKeywords": "xyz789"
}
Categories
Fields
| Field Name | Description |
|---|---|
categories - [CategoryOutput]
|
|
errors - [ErrorOutput]
|
Example
{
"categories": [CategoryOutput],
"errors": [ErrorOutput]
}
Category
Fields
| Field Name | Description |
|---|---|
categoryId - Int
|
|
identifier - String!
|
|
translation - CategoryTranslation
|
Example
{
"categoryId": 123,
"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
CategoryInput
Fields
| Input Field | Description |
|---|---|
identifier - String!
|
|
sourceText - CategorySourceTextInput!
|
Example
{
"identifier": "xyz789",
"sourceText": CategorySourceTextInput
}
CategoryOutput
CategoryProductInput
Fields
| Input Field | Description |
|---|---|
identifier - String!
|
|
parentIdentifier - String
|
|
sourceText - CategorySourceTextInput!
|
Example
{
"identifier": "abc123",
"parentIdentifier": "xyz789",
"sourceText": CategorySourceTextInput
}
CategorySourceTextInput
Example
{
"title": "abc123",
"description": "abc123",
"description2": "xyz789",
"seoTitle": "xyz789",
"seoDescription": "abc123",
"seoKeywords": "abc123",
"menuTitle": "abc123"
}
CategoryTranslation
Example
{
"language": "cs_CZ",
"title": "abc123",
"description": "xyz789",
"description2": "abc123",
"seoTitle": "xyz789",
"seoDescription": "abc123",
"seoKeywords": "xyz789",
"menuTitle": "abc123"
}
CreateGlossaryInput
Fields
| Input Field | Description |
|---|---|
languageFrom - LanguageEnum!
|
|
languageTo - LanguageEnum!
|
|
textSource - String!
|
|
textTarget - String!
|
|
limitation - [GlossaryLimitationEnum!]
|
Example
{
"languageFrom": "cs_CZ",
"languageTo": "cs_CZ",
"textSource": "xyz789",
"textTarget": "abc123",
"limitation": ["product_title"]
}
CurrencyEnum
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
"CZK"
CustomContent
Fields
| Field Name | Description |
|---|---|
contentId - Int
|
|
identifier - String!
|
|
status - ProductStatus
|
|
translation - CustomContentTranslation!
|
|
customData - [CustomData]
|
Example
{
"contentId": 123,
"identifier": "xyz789",
"status": "TRANSLATION_WAITING",
"translation": CustomContentTranslation,
"customData": [CustomData]
}
CustomContentConnection
Description
A paginated list of CustomContent edges.
Fields
| Field Name | Description |
|---|---|
pageInfo - PageInfo!
|
Pagination information about the list of edges. |
edges - [CustomContentEdge!]!
|
A list of CustomContent edges. |
Example
{
"pageInfo": PageInfo,
"edges": [CustomContentEdge]
}
CustomContentEdge
Description
An edge that contains a node of type CustomContent and a cursor.
Fields
| Field Name | Description |
|---|---|
node - CustomContent!
|
The CustomContent node. |
cursor - String!
|
A unique cursor that can be used for pagination. |
Example
{
"node": CustomContent,
"cursor": "abc123"
}
CustomContentInput
Fields
| Input Field | Description |
|---|---|
identifier - String!
|
|
sourceText - CustomContentSourceTextInput!
|
|
customData - [CustomDataInput]
|
Example
{
"identifier": "abc123",
"sourceText": CustomContentSourceTextInput,
"customData": [CustomDataInput]
}
CustomContentOutput
CustomContentSourceTextInput
CustomContentTranslation
CustomContents
Fields
| Field Name | Description |
|---|---|
contents - [CustomContentOutput]
|
Example
{"contents": [CustomContentOutput]}
CustomData
CustomDataInput
ErrorOutput
Float
Description
The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.
Example
987.65
Glossaries
Fields
| Field Name | Description |
|---|---|
glossaries - [GlossaryOutput]
|
|
errors - [ErrorOutput]
|
Example
{
"glossaries": [GlossaryOutput],
"errors": [ErrorOutput]
}
Glossary
Example
{
"id": "4",
"languageFrom": "abc123",
"languageTo": "xyz789",
"textSource": "xyz789",
"textTarget": "xyz789",
"limitation": ["product_title"]
}
GlossaryLimitationEnum
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
"product_title"
GlossaryOutput
Fields
| Field Name | Description |
|---|---|
glossaryId - Int
|
Example
{"glossaryId": 987}
GlossaryPagination
Fields
| Field Name | Description |
|---|---|
data - [Glossary!]!
|
|
currentPage - Int!
|
|
perPage - Int!
|
|
totalCount - Int!
|
|
totalPage - Int!
|
Example
{
"data": [Glossary],
"currentPage": 123,
"perPage": 123,
"totalCount": 987,
"totalPage": 987
}
ID
Description
The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.
Example
"4"
Image
Fields
| Field Name | Description |
|---|---|
imageId - Int
|
|
url - String!
|
|
translation - ImageTranslation
|
Example
{
"imageId": 987,
"url": "abc123",
"translation": ImageTranslation
}
ImageProductInput
Fields
| Input Field | Description |
|---|---|
identifier - String!
|
|
src - String!
|
|
position - Int
|
|
sourceText - ImageSourceTextInput
|
Example
{
"identifier": "abc123",
"src": "xyz789",
"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": "xyz789"}
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
123
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!
|
"Povinný jedinečný identifikátor Option v systému klienta |
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": "xyz789"
}
OptionValue
Fields
| Field Name | Description |
|---|---|
valueId - Int
|
|
identifier - String
|
|
translation - OptionValueTranslation
|
Example
{
"valueId": 123,
"identifier": "abc123",
"translation": OptionValueTranslation
}
OptionValueInput
Fields
| Input Field | Description |
|---|---|
identifier - String!
|
Povinný jedinečný identifikátor Option Value v systému klienta |
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": "xyz789"
}
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": false,
"startCursor": "xyz789",
"endCursor": "abc123",
"total": 987,
"count": 987,
"currentPage": 987,
"lastPage": 987
}
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": "xyz789",
"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
|
|
visibility - ProductVisibility
|
|
sourceUrl - String
|
|
imageIdentifier - String
|
|
sourceText - ProductSourceTextInput!
|
|
variants - [ProductVariantInput!]!
|
|
categories - [CategoryProductInput!]
|
|
reviews - [ReviewProductInput!]
|
|
options - [OptionProductInput!]
|
|
tags - [TagProductInput!]
|
|
brands - [BrandProductInput!]
|
|
images - [ImageProductInput!]
|
Example
{
"identifier": "xyz789",
"code": "xyz789",
"visibility": "ACTIVE",
"sourceUrl": "xyz789",
"imageIdentifier": "xyz789",
"sourceText": ProductSourceTextInput,
"variants": [ProductVariantInput],
"categories": [CategoryProductInput],
"reviews": [ReviewProductInput],
"options": [OptionProductInput],
"tags": [TagProductInput],
"brands": [BrandProductInput],
"images": [ImageProductInput]
}
ProductOutput
ProductSourceTextInput
Example
{
"title": "xyz789",
"description": "xyz789",
"description2": "xyz789",
"descriptionShort": "abc123",
"seoTitle": "abc123",
"seoDescription": "xyz789",
"seoUrl": "abc123",
"seoKeywords": "abc123"
}
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": "xyz789",
"description": "abc123",
"description2": "xyz789",
"descriptionShort": "xyz789",
"seoTitle": "abc123",
"seoDescription": "xyz789",
"seoUrl": "abc123",
"seoKeywords": "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": "abc123",
"sku": "xyz789",
"ean": "abc123",
"stock": 987.65,
"imageIdentifier": "abc123",
"price": 123.45,
"currency": "CZK",
"sourceText": ProductVariantSourceTextInput,
"options": [OptionProductInput]
}
ProductVariantSourceTextInput
ProductVisibility
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
Example
"ACTIVE"
Products
Fields
| Field Name | Description |
|---|---|
products - [ProductOutput]
|
Example
{"products": [ProductOutput]}
Review
Fields
| Field Name | Description |
|---|---|
reviewId - Int
|
|
identifier - String!
|
|
productIdentifiers - String!
|
|
translation - ReviewTranslation
|
Example
{
"reviewId": 123,
"identifier": "abc123",
"productIdentifiers": "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": "abc123",
"productIdentifier": "abc123",
"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": 987,
"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": "abc123",
"sourceText": TagTranslationInput
}
TagTranslation
Example
{
"language": "cs_CZ",
"name": "xyz789",
"description": "abc123",
"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": "abc123",
"price": 123.45,
"currency": "CZK",
"sku": "abc123",
"ean": "abc123",
"stock": 987.65,
"imageId": 987,
"options": [Option],
"translation": VariantTranslation
}
VariantTranslation
Fields
| Field Name | Description |
|---|---|
language - LanguageEnum
|
|
title - String!
|
|
description - String
|
|
description2 - String
|
|
descriptionShort - String
|
Example
{
"language": "cs_CZ",
"title": "abc123",
"description": "xyz789",
"description2": "xyz789",
"descriptionShort": "xyz789"
}