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
addressMerchantAddressMerchant's address information.
The merchant staff's email address.
The merchant's first name.
The merchant's last name.
merchantNameStringThe merchant staff's last name.
merchantSequenceFloatphoneNumberStringThe merchant's phone number.
storeNameStringThe 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
addressLine1StringThe merchant's mailing address.
addressLine2StringAn additional field for the merchant's mailing address.
The merchant's city.
companyStringcountryMerchantAddressCountryThe merchant's country.
districtMerchantAddressDistrictThe merchant's district in city.
firstNameStringThe merchant staff's first name.
identityNumberStringThe merchant's identity numbers.
lastNameStringThe merchant staff's last name.
postalCodeStringThe merchant's postal code, also known as zip, postcode, etc.
stateMerchantAddressStatetaxNumberStringtaxOfficeStringIf merchant is corporate, merchant can use that field to fill their Tax Office name.
titleStringvknStringMerchantAddressCountry
type MerchantAddressCountry {
id: String
code: String
iso2: String
iso3: String
name: String
}
Fields
idStringcodeStringThe ISO3 country code corresponding to the merchant's country.
iso2StringTwo-letter country code
iso3StringThree-letter country code
nameStringThe merchant's normalized country name.
MerchantAddressCity
type MerchantAddressCity {
id: String
code: String
name: String
}
Fields
idStringcodeStringThe city code corresponding to the merchant's city.
nameStringThe merchant's normalized city name.
MerchantAddressDistrict
type MerchantAddressDistrict {
id: String
code: String
name: String
}
Fields
idStringcodeStringThe district code corresponding to the merchant's district.
nameStringThe merchant's normalized district name.
MerchantAddressState
type MerchantAddressState {
id: String
code: String
name: String
}
Fields
idStringcodeStringnameStringQueries
Get Merchant Detail
type MerchantResponse {
id: String!
address: MerchantAddress
email: String!
firstName: String!
lastName: String!
merchantName: String
merchantSequence: Float
phoneNumber: String
storeName: String
}
Fields
addressMerchantAddressMerchant's address information.
The merchant staff's email address.
The merchant's first name.
The merchant's last name.
merchantNameStringThe merchant staff's last name.
merchantSequenceFloatphoneNumberStringThe merchant's phone number.
storeNameStringThe 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.
salesChannelIdStringThe id of the sales channel owned by the merchant.
The application's id in the store.
supportsMultipleInstallationBooleanIt 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
addressMerchantAddressMerchant's address information.
The merchant staff's email address.
The merchant's first name.
The merchant's last name.
merchantNameStringThe merchant staff's last name.
merchantSequenceFloatphoneNumberStringThe merchant's phone number.
storeNameStringThe 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
}
}
}