Skip to main content

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

idString!required

Merchant's address information.

emailString!required

The merchant staff's email address.

firstNameString!required

The merchant's first name.

lastNameString!required

The merchant's last name.

merchantNameString

The merchant staff's last name.

merchantSequenceFloat
phoneNumberString

The merchant's phone number.

storeNameString

The 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

addressLine1String

The merchant's mailing address.

addressLine2String

An additional field for the merchant's mailing address.

The merchant's city.

companyString

The merchant's country.

The merchant's district in city.

firstNameString

The merchant staff's first name.

identityNumberString

The merchant's identity numbers.

lastNameString

The merchant staff's last name.

postalCodeString

The merchant's postal code, also known as zip, postcode, etc.

taxNumberString
taxOfficeString

If merchant is corporate, merchant can use that field to fill their Tax Office name.

titleString

MerchantAddressCountry

type MerchantAddressCountry {
id: String
code: String
iso2: String
iso3: String
name: String
}

Fields

codeString

The ISO3 country code corresponding to the merchant's country.

iso2String

Two-letter country code

iso3String

Three-letter country code

nameString

The merchant's normalized country name.

MerchantAddressCity

type MerchantAddressCity {
id: String
code: String
name: String
}

Fields

codeString

The city code corresponding to the merchant's city.

nameString

The merchant's normalized city name.

MerchantAddressDistrict

type MerchantAddressDistrict {
id: String
code: String
name: String
}

Fields

codeString

The district code corresponding to the merchant's district.

nameString

The merchant's normalized district name.

MerchantAddressState

type MerchantAddressState {
id: String
code: String
name: String
}

Fields

codeString
nameString

Queries

Get Merchant Detail

type MerchantResponse {
id: String!
address: MerchantAddress
email: String!
firstName: String!
lastName: String!
merchantName: String
merchantSequence: Float
phoneNumber: String
storeName: String
}

Fields

idString!required

Merchant's address information.

emailString!required

The merchant staff's email address.

firstNameString!required

The merchant's first name.

lastNameString!required

The merchant's last name.

merchantNameString

The merchant staff's last name.

merchantSequenceFloat
phoneNumberString

The merchant's phone number.

storeNameString

The merchant's store name.

Get Authorized App

type AuthorizedApp {
id: ID!
addedDate: Timestamp!
partnerId: String!
salesChannelId: String
scope: String!
storeAppId: String!
supportsMultipleInstallation: Boolean
}

Fields

idID!required
addedDateTimestamp!required

The date the app was added.

partnerIdString!required
salesChannelIdString

The id of the sales channel owned by the merchant.

scopeString!required
storeAppIdString!required

The application's id in the store.

supportsMultipleInstallationBoolean

It 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

idString!required

Merchant's address information.

emailString!required

The merchant staff's email address.

firstNameString!required

The merchant's first name.

lastNameString!required

The merchant's last name.

merchantNameString

The merchant staff's last name.

merchantSequenceFloat
phoneNumberString

The merchant's phone number.

storeNameString

The merchant's store name.

Examples

Get Merchant Detail

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 }}"}'

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

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 }}"}'

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

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 }}"}'

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
}
}
}