Merchant
Merchant API stores contact information, address information, personal information, information about a merchant.
Merchant api also provides information about apps owned by a merchant. Thus, merchant can access the features of the apps it owns.
Models
Merchant
type MerchantResponse {
id: String!
address: MerchantAddress
email: String!
firstName: String!
lastName: String!
merchantName: String
merchantSequence: Float
phoneNumber: String
storeName: String
}
Fields
address
MerchantAddressMerchant's address information.
The merchant staff's email address.
The merchant's first name.
The merchant's last name.
merchantName
StringThe merchant staff's last name.
merchantSequence
FloatphoneNumber
StringThe merchant's phone number.
storeName
StringThe merchant's store name.
MerchantAddress
type MerchantAddress {
addressLine1: String
addressLine2: String
city: MerchantAddressCity
company: String
country: MerchantAddressCountry
district: MerchantAddressDistrict
firstName: String
identityNumber: String
lastName: String
postalCode: String
state: MerchantAddressState
taxNumber: String
taxOffice: String
title: String
type: MerchantSettingsAddressTypeEnum
vkn: String
}
Fields
addressLine1
StringThe merchant's mailing address.
addressLine2
StringAn additional field for the merchant's mailing address.
The merchant's city.
company
Stringcountry
MerchantAddressCountryThe merchant's country.
district
MerchantAddressDistrictThe merchant's district in city.
firstName
StringThe merchant staff's first name.
identityNumber
StringThe merchant's identity numbers.
lastName
StringThe merchant staff's last name.
postalCode
StringThe merchant's postal code, also known as zip, postcode, etc.
state
MerchantAddressStatetaxNumber
StringtaxOffice
StringIf merchant is corporate, merchant can use that field to fill their Tax Office name.
title
Stringvkn
StringMerchantAddressCountry
type MerchantAddressCountry {
id: String
code: String
iso2: String
iso3: String
name: String
}
Fields
id
Stringcode
StringThe ISO3 country code corresponding to the merchant's country.
iso2
StringTwo-letter country code
iso3
StringThree-letter country code
name
StringThe merchant's normalized country name.
MerchantAddressCity
type MerchantAddressCity {
id: String
code: String
name: String
}
Fields
id
Stringcode
StringThe city code corresponding to the merchant's city.
name
StringThe merchant's normalized city name.
MerchantAddressDistrict
type MerchantAddressDistrict {
id: String
code: String
name: String
}
Fields
id
Stringcode
StringThe district code corresponding to the merchant's district.
name
StringThe merchant's normalized district name.
MerchantAddressState
type MerchantAddressState {
id: String
code: String
name: String
}
Fields
id
Stringcode
Stringname
StringQueries
Get Merchant Detail
type MerchantResponse {
id: String!
address: MerchantAddress
email: String!
firstName: String!
lastName: String!
merchantName: String
merchantSequence: Float
phoneNumber: String
storeName: String
}
Fields
address
MerchantAddressMerchant's address information.
The merchant staff's email address.
The merchant's first name.
The merchant's last name.
merchantName
StringThe merchant staff's last name.
merchantSequence
FloatphoneNumber
StringThe merchant's phone number.
storeName
StringThe merchant's store name.
Get Authorized App
type AuthorizedApp {
id: ID!
addedDate: Timestamp!
partnerId: String!
salesChannelId: String
scope: String!
storeAppId: String!
supportsMultipleInstallation: Boolean
}
Fields
The date the app was added.
salesChannelId
StringThe id of the sales channel owned by the merchant.
The application's id in the store.
supportsMultipleInstallation
BooleanIt keeps the information that a merchant cn install more than one application. If true
, merchant can add more than one application.
Me
type MerchantResponse {
id: String!
address: MerchantAddress
email: String!
firstName: String!
lastName: String!
merchantName: String
merchantSequence: Float
phoneNumber: String
storeName: String
}
Fields
address
MerchantAddressMerchant's address information.
The merchant staff's email address.
The merchant's first name.
The merchant's last name.
merchantName
StringThe merchant staff's last name.
merchantSequence
FloatphoneNumber
StringThe merchant's phone number.
storeName
StringThe merchant's store name.
Examples
Get Merchant Detail
- BASH
- NODE.JS
curl --location --request POST 'https://api.myikas.com/api/v1/admin/graphql' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <your_access_token>' \
--data-raw '{"query":"{ getMerchant { email firstName id lastName merchantName merchantSequence phoneNumber storeName }}"}'
const axios = require('axios');
const data = {"query":`{
getMerchant {
email
firstName
id
lastName
merchantName
merchantSequence
phoneNumber
storeName
}
}
`};
const config = {
method: 'POST',
url: 'https://api.myikas.com/api/v1/admin/graphql',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer your_token'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
if (error.response) {
console.log(JSON.stringify(error.response.data));
}
});
Response
{
"data": {
"getMerchant": {
"email": "taylan-app@gmail.com",
"firstName": "taylan",
"id": "f2813818-6d01-4f48-b205-a94041ee703d",
"lastName": "ilkyaz",
"merchantName": "Taylan İlkyaz",
"merchantSequence": 310,
"phoneNumber": null,
"storeName": "taylan-app"
}
}
}
Get Authorized App
- BASH
- NODE.JS
curl --location --request POST 'https://api.myikas.com/api/v1/admin/graphql' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <your_access_token>' \
--data-raw '{"query":"{ getAuthorizedApp { addedDate createdAt deleted id partnerId salesChannelId scope storeAppId supportsMultipleInstallation updatedAt }}"}'
const axios = require('axios');
const data = {"query":`{
getAuthorizedApp {
addedDate
createdAt
deleted
id
partnerId
salesChannelId
scope
storeAppId
supportsMultipleInstallation
updatedAt
}
}
`};
const config = {
method: 'POST',
url: 'https://api.myikas.com/api/v1/admin/graphql',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer your_token'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
if (error.response) {
console.log(JSON.stringify(error.response.data));
}
});
Response
{
"data": {
"getAuthorizedApp": {
"addedDate": 1637050545408,
"createdAt": 1637050545409,
"deleted": false,
"id": "92be8a2f-47e4-471b-8c17-bc17d3de90fe",
"partnerId": "02032105-e67f-42e9-aaff-32b608c500f9",
"salesChannelId": null,
"scope": "read_customers,write_customers",
"storeAppId": "68e29a17-ae29-484b-9e94-839a108dcf57",
"supportsMultipleInstallation": null,
"updatedAt": 1637050545409
}
}
}
Me
- BASH
- NODE.JS
curl --location --request POST 'https://api.myikas.com/api/v1/admin/graphql' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <your_access_token>' \
--data-raw '{"query":"{ me { addedDate email id name partnerId salesChannelId scope scopes storeAppId supportsMultipleInstallation }}"}'
const axios = require('axios');
const data = {"query":`{
me {
addedDate
email
id
name
partnerId
salesChannelId
scope
scopes
storeAppId
supportsMultipleInstallation
}
}
`};
const config = {
method: 'POST',
url: 'https://api.myikas.com/api/v1/admin/graphql',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer your_token'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
if (error.response) {
console.log(JSON.stringify(error.response.data));
}
});
Response
{
"data": {
"me": {
"addedDate": 1637050545408,
"email": null,
"id": "92be8a2f-47e4-471b-8c17-bc17d3de90fe",
"name": null,
"partnerId": "02032105-e67f-42e9-aaff-32b608c500f9",
"salesChannelId": null,
"scope": "read_customers,write_customers",
"scopes": null,
"storeAppId": "68e29a17-ae29-484b-9e94-839a108dcf57",
"supportsMultipleInstallation": null
}
}
}