Merchant API
The Merchant API is a GraphQL API that allows you to build any type of commerce application.
Merchant API
With this API, you can build your next commerce application that retrieve product information, process orders, manage customer data, handle shopping cart operations, process payments, and create state of the art shopping experiences.
Getting started
Once you have created a Geins account, you can start using the Merchant API by obtaining your API key. You can find your API key for the Merchant GraphQL API in Geins Merchant Center.
Authentication
API Key
A X-ApiKey header needs to be included in every request. This header should contain the value of your Merchant API key.
GraphQL Playground
Head over to the GraphQL Playground to start exploring the API. The playground is a great way to test out queries and mutations without having to write any code.
Request Example
query categories {
categories {
categoryId
parentCategoryId
order
alias
canonicalUrl
alternativeCanonicalUrls
name
description
isHidden
googleTaxonomy {
id
parentId
name
path
}
}
}
{
"Accept": "application/json",
"X-ApiKey": "{MERCHANT_API_KEY}"
}
curl -X POST 'https://merchantapi.geins.io/graphql' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'X-ApiKey: {MERCHANT_API_KEY}' \
-d '{"query":"query categories { categories { categoryId name description } }"}'
const response = await fetch('https://merchantapi.geins.io/graphql', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
'X-ApiKey': '{MERCHANT_API_KEY}',
},
body: JSON.stringify({
query: `query categories {
categories {
categoryId
name
description
}
}`
})
});
const data = await response.json();
console.log(data);
The GraphQL Schema
The documentation has been automatically generated from the GraphQL schema, available for download from the GraphQL Playground
Use the docs in the sidebar to find out more about available operations and types:
- Allowed operations:
queriesmutations
- Schema-defined types:
scalarsobjectsenumsinterfacesunionsinput objects