Page365 API API Reference

Welcome to Page365 API. Page365 allow access to merchant information on Page365 ecosystem by external software (API) for the greater service and merchant convenience.

This API use GraphQL as standard protocol. Implement by follow document below.

API Endpoints
Development:
https://api.staging365.net/v1.0/graphql
Production:
https://api.page365.net/v1.0/graphql

Registation

Before using API, you need to register your app profile and get approve by Page365 and we will send you SECRET_KEY for using in authentication process as flowchart below.

Create profile

Create profile for using in authentication process and grant permission to fetch merchant information. These argument some will be display to merchant for notify them that your integration is available such as name, some will be use for report and notify an update (deprecate API) such as phone and email, some will be use for sending an event when have occurred on merchant accounts such as webhookUrl

name:
string

Product/Company name

email:
string

For API report

phone:
string

Contact

webhookUrl:
string

Webhook URL for sending an event when have occurred on merchant accounts

Example

Request Content-Types: application/json
Query
mutation createPublicApp($name: String!, $email: String!, $phone: String, $webhookUrl: String){
  createPublicApp(name: $name, email: $email, phone: $phone, webhookUrl: $webhookUrl){
    email
    id
    name
    phone
    status
    webhookUrl
  }
}
Variables
{
  "name": "string",
  "email": "string",
  "phone": "string",
  "webhookUrl": "string"
}
Try it now
Response Content-Types: application/json
Response Example (200 OK)
{
  "data": {
    "createPublicApp": {
      "email": "string",
      "id": "string",
      "name": "string",
      "phone": "string",
      "status": "string",
      "webhookUrl": "string"
    }
  }
}

Authentication

After profile approved, Page365 will send you SECRET_KEY which will be use as part of access token creating process. Access token is needed for every request as an identifier and each merchant will use difference unique access token even from the same profile.

In access token creation process you will need 2 parameters (SECRET_KEY, MERCHANT_TOKEN) you can find MERCHANT_TOKEN from each merchant directly and

PROVIDER NEEDS TO KEEP MERCHANT_TOKEN IN PRIVATE AND NOT ALLOW TO PUBLIC TOKEN TO OTHER

Generate access token

Generate access token for using in identification when calling API

secretKey:
string

Secret key which you receive after your profile approved

merchantToken:
string

Unique token for each merchant generate by Page365

Example

Request Content-Types: application/json
Query
query generateToken($secretKey: String!, $merchantToken: String!){
  generateToken(secretKey: $secretKey, merchantToken: $merchantToken)
}
Variables
{
  "secretKey": "string",
  "merchantToken": "string"
}
Try it now
200 OK

Successful operation

type
string
Response Content-Types: application/json
Response Example (200 OK)
{
  "data": {
    "generateToken": "string"
  }
}

Webhooks

After the profile is approved and allowed by the merchant account, Page365 will send an event that has occurred on the merchant account.

Validating Payloads: - Every webhook will have SHA1 signature included in the request's X-Hub-Signature header, preceded with sha1=. You don't have to validate the payload, but you should.

To validate the payload: - Generate a SHA1 signature using the payload and your secret_key - Compare your signature to the signature in the X-Hub-Signature header (everything after sha1=). If the signatures match, the payload is genuine.

HTTP method: - Use POST http method for send to webhook url.

#Order event
Page365 will send to webhook url an order object when the order has updated or created.
key:
String

event type should be "order.create" for create event and "order.update" for update event

merchantToken:
String

a token reference with the merchant account.

body:
Order object

an order object.

Order object
id:
ID

Unique object reference number.

stage:
String

Can be (draft, unpaid, transferred, paid, shipped).

createdAt:
ISO8601DateTime

Timestamp when order create.

note:
String

Note.

shippingCost:
Float

Delivery cost in baht.

discount:
Float

Discount.

subtotal:
Float

Sum of items price.

total:
Float

Final price which send to customer.

no:
Int

No.

expiresOn:
ISO8601DateTime

Expire date.

paidAmount:
Float

Total amount paid by customer.

paidAt:
ISO8601DateTime

Timestamp when customer paid.

slug:
String

Slug.

trackingCode:
String

Delivery tracking code.

itemsCount:
Int

Number of item in this order.

shippingOption:
String

Shipping title.

sent:
Boolean

True if customer already receive order inform.

sold:
Boolean

Customer already paid (stage paid, shipped).

promotionCode:
String

Promotion code which be use in this order.

vat:
Float

Vat amount.

vatIncluded:
Boolean

Vat include.

taxInvoiceNo:
String

Tax no.

customerName:
String

customer name.

customerAddress:
String

customer address.

customerEmail:
String

customer email.

customerPhone:
String

customer phone.

auto:
Boolean

Create by CF feature.

url:
String

Detail link.

items:
Array<OrderItem>

Items in order.

bankAccount:
BankAccount Object

Bank account for this order payment.

paymentSlip:
PaymentSlip Object

Payment slip.

OrderItem object
id:
ID

Unique object reference number.

name:
String

Name.

note:
String

Note.

quantity:
Int

Quantity.

price:
Float

Price.

subtotal:
Float

Sum of items price.

productId:
ID

Unique object reference number of product.

BankAccount object
id:
ID

Unique object reference number.

no:
String

Bank account number.

name:
String

Name.

bankSlug:
String

Provider code.

PaymentSlip object
statusCode:
Int

Verify code.

createdAt:
ISO8601DateTime

Create at.

updatedAt:
ISO8601DateTime

Update at.

Body example
#Order item event
Page365 will send to webhook url a order item object when the customer has updated or created.
key:
String

event type should be "orderitem.create" for create event and "orderitem.update" for update event

merchantToken:
String

a token reference with the merchant account.

body:
Order item object

an order item object.

OrderItem object
id:
ID

Unique object reference number.

name:
String

Name.

note:
String

Note.

quantity:
Int

Quantity.

price:
Float

Price.

subtotal:
Float

Sum of items price.

productId:
ID

Unique object reference number of product.

orderId:
ID

Unique object reference number of order.

Body example
#Bank account event
Page365 will send to webhook url a bank account object when the bank account has updated or created.
key:
String

event type should be "bankaccount.create" for create event and "bankaccount.update" for update event

merchantToken:
String

a token reference with the merchant account.

body:
Bank account object

an bank account object.

BankAccount object
id:
ID

Unique object reference number.

no:
String

Bank account number.

name:
String

Name.

bankSlug:
String

Provider code.

Body example
#Customer event
Page365 will send to webhook url a customer object when the customer has updated or created.
key:
String

event type should be "customer.create" for create event and "customer.update" for update event

merchantToken:
String

a token reference with the merchant account.

body:
customer object

a customer object.

Customer object
id:
ID

Unique object reference number.

name:
String

Name.

phone:
String

Phone.

email:
String

Email.

address:
String

Address.

note:
String

Note.

type:
String

Plateform which customer come from.

tags:
Array<tag>

Customer tags.

Tag object
id:
ID

Unique object reference number.

name:
String

Name.

Body example

Product

Fetch merchant product information

Fetch products

Fetch all product information owned by merchant

first:
integer

Returns the first n elements from the list.

after:
string

Returns the elements in the list that come after the specified cursor.

last:
integer

Returns the last n elements from the list.

before:
string

Returns the elements in the list that come before the specified cursor.

token:
string

Access token from authentication operation

search:
string

Filter by matching argument with name, detail, variant name or variant code

status:
string

Filter by status

scope:
string

Filter by stock type (stockable, unstockable, all)

categoryId:
string

Filter by category

orderBy:
string

Sort by field (sold, actual, reserved, bestsellers) and type (desc, asc) eg. "sold_desc"

enabled:
boolean

Filter by field enabled

Example

Request Content-Types: application/json
Query
query products($first: Int, $after: String, $last: Int, $before: String, $token: String!, $search: String, $status: String, $scope: String, $categoryId: String, $orderBy: String, $enabled: Boolean){
  products(first: $first, after: $after, last: $last, before: $before, token: $token, search: $search, status: $status, scope: $scope, categoryId: $categoryId, orderBy: $orderBy, enabled: $enabled){
  }
}
Variables
{
  "first": "integer",
  "after": "string",
  "last": "integer",
  "before": "string",
  "token": "string",
  "search": "string",
  "status": "string",
  "scope": "string",
  "categoryId": "string",
  "orderBy": "string",
  "enabled": "boolean"
}
Try it now
Response Content-Types: application/json
Response Example (200 OK)
{
  "data": {
    "products": {}
  }
}

Fetch product

Fetch product information by id

id:
integer

Unique object reference number

token:
string

Access token from authentication operation

Example

Request Content-Types: application/json
Query
query product($id: Int!, $token: String!){
  product(id: $id, token: $token){
    actual
    available
    cost
    detail
    enabled
    id
    name
    ordersCount
    price
    priceBeforeDiscount
    refUrl
    reserved
    sold
    statuses
    stockable
    thumbnail
    updatedAt
    url
    variable
    weight
    whenOutOfStock
  }
}
Variables
{
  "id": "integer",
  "token": "string"
}
Try it now
Response Content-Types: application/json
Response Example (200 OK)
{
  "data": {
    "product": {
      "actual": "integer",
      "available": "integer",
      "cost": "number",
      "detail": "string",
      "enabled": "boolean",
      "id": "string",
      "name": "string",
      "ordersCount": "integer",
      "price": "number",
      "priceBeforeDiscount": "number",
      "refUrl": "string",
      "reserved": "integer",
      "sold": "integer",
      "statuses": [
        "string"
      ],
      "stockable": "boolean",
      "thumbnail": "string",
      "url": "string",
      "variable": "boolean",
      "weight": "number",
      "whenOutOfStock": "string"
    }
  }
}

Product Category

Fetch merchant product category information

Fetch product categories

Fetch all product category information owned by merchant

first:
integer

Returns the first n elements from the list.

after:
string

Returns the elements in the list that come after the specified cursor.

last:
integer

Returns the last n elements from the list.

before:
string

Returns the elements in the list that come before the specified cursor.

token:
string

Access token from authentication operation

sort:
string

Sort result ascending by specific field

Example

Request Content-Types: application/json
Query
query productCategories($first: Int, $after: String, $last: Int, $before: String, $token: String!, $sort: String){
  productCategories(first: $first, after: $after, last: $last, before: $before, token: $token, sort: $sort){
  }
}
Variables
{
  "first": "integer",
  "after": "string",
  "last": "integer",
  "before": "string",
  "token": "string",
  "sort": "string"
}
Try it now
Response Content-Types: application/json
Response Example (200 OK)
{
  "data": {
    "productCategories": {}
  }
}

Fetch product category

Fetch product category information by id

id:
integer

Unique object reference number

token:
string

Access token from authentication operation

Example

Request Content-Types: application/json
Query
query productCategory($id: Int!, $token: String!){
  productCategory(id: $id, token: $token){
    albumName
    autoImport
    description
    editable
    enabled
    id
    name
    size
    thumbnail
  }
}
Variables
{
  "id": "integer",
  "token": "string"
}
Try it now
Response Content-Types: application/json
Response Example (200 OK)
{
  "data": {
    "productCategory": {
      "albumName": "string",
      "autoImport": "boolean",
      "description": "string",
      "editable": "boolean",
      "enabled": "boolean",
      "id": "string",
      "name": "string",
      "size": "integer",
      "thumbnail": "string"
    }
  }
}

Order

Fetch merchant order information

Fetch orders

Fetch all order information owned by merchant

first:
integer

Returns the first n elements from the list.

after:
string

Returns the elements in the list that come after the specified cursor.

last:
integer

Returns the last n elements from the list.

before:
string

Returns the elements in the list that come before the specified cursor.

token:
string

Access token from authentication operation

sort:
string

Sort result ascending by specific field

stage:
string

Filter by stage (draft, unpaid, transferred, paid, shipped)

bankAccountId:
integer

Filter by bank

userId:
integer

Filter by user

sinceCreatedAt:
string

Filter by create date format YYYY-MM-DD (since)

untilCreatedAt:
string

Filter by create date format YYYY-MM-DD (until)

Example

Request Content-Types: application/json
Query
query orders($first: Int, $after: String, $last: Int, $before: String, $token: String!, $sort: String, $stage: String, $bankAccountId: Int, $userId: Int, $sinceCreatedAt: String, $untilCreatedAt: String){
  orders(first: $first, after: $after, last: $last, before: $before, token: $token, sort: $sort, stage: $stage, bankAccountId: $bankAccountId, userId: $userId, sinceCreatedAt: $sinceCreatedAt, untilCreatedAt: $untilCreatedAt){
  }
}
Variables
{
  "first": "integer",
  "after": "string",
  "last": "integer",
  "before": "string",
  "token": "string",
  "sort": "string",
  "stage": "string",
  "bankAccountId": "integer",
  "userId": "integer",
  "sinceCreatedAt": "string",
  "untilCreatedAt": "string"
}
Try it now
Response Content-Types: application/json
Response Example (200 OK)
{
  "data": {
    "orders": {}
  }
}

Fetch order

Fetch order information by id

id:
integer

Unique object reference number

token:
string

Access token from authentication operation

Example

Request Content-Types: application/json
Query
query order($id: Int!, $token: String!){
  order(id: $id, token: $token){
    auto
    createdAt
    discount
    expiresOn
    id
    itemsCount
    no
    note
    paidAmount
    paidAt
    promotionCode
    sent
    shippingCost
    shippingOption
    slug
    sold
    stage
    subtotal
    taxInvoiceNo
    total
    trackingCode
    url
    vat
    vatIncluded
  }
}
Variables
{
  "id": "integer",
  "token": "string"
}
Try it now
Response Content-Types: application/json
Response Example (200 OK)
{
  "data": {
    "order": {
      "auto": "boolean",
      "discount": "number",
      "id": "string",
      "itemsCount": "integer",
      "no": "integer",
      "note": "string",
      "paidAmount": "number",
      "promotionCode": "string",
      "sent": "boolean",
      "shippingCost": "number",
      "shippingOption": "string",
      "slug": "string",
      "sold": "boolean",
      "stage": "string",
      "subtotal": "number",
      "taxInvoiceNo": "string",
      "total": "number",
      "trackingCode": "string",
      "url": "string",
      "vat": "number",
      "vatIncluded": "boolean"
    }
  }
}

Stock

Update stock

Update stock

Update product stock owned by merchant

token:
string

Access token from authentication operation

sku:
string

SKU

price:
number

Price

quantity:
integer

Quantity

note:
string

Note

Example

Request Content-Types: application/json
Query
mutation createStockMove($token: String!, $sku: String!, $price: Float!, $quantity: Int!, $note: String){
  createStockMove(token: $token, sku: $sku, price: $price, quantity: $quantity, note: $note){
    createdAt
    id
    note
    price
    quantity
    quantityAbs
    type
  }
}
Variables
{
  "token": "string",
  "sku": "string",
  "price": "number",
  "quantity": "integer",
  "note": "string"
}
Try it now
Response Content-Types: application/json
Response Example (200 OK)
{
  "data": {
    "createStockMove": {
      "id": "string",
      "note": "string",
      "price": "number",
      "quantity": "integer",
      "quantityAbs": "integer",
      "type": "string"
    }
  }
}

Customer

Fetch merchant customer information

Fetch customers

Fetch all customer information owned by merchant

first:
integer

Returns the first n elements from the list.

after:
string

Returns the elements in the list that come after the specified cursor.

last:
integer

Returns the last n elements from the list.

before:
string

Returns the elements in the list that come before the specified cursor.

token:
string

Access token from authentication operation

type:
string

Filter by plateform which use to contact

tagId:
string

Filter by tag

Example

Request Content-Types: application/json
Query
query customers($first: Int, $after: String, $last: Int, $before: String, $token: String!, $type: String, $tagId: String){
  customers(first: $first, after: $after, last: $last, before: $before, token: $token, type: $type, tagId: $tagId){
  }
}
Variables
{
  "first": "integer",
  "after": "string",
  "last": "integer",
  "before": "string",
  "token": "string",
  "type": "string",
  "tagId": "string"
}
Try it now
Response Content-Types: application/json
Response Example (200 OK)
{
  "data": {
    "customers": {}
  }
}

Fetch customer

Fetch customer information by id

id:
integer

Unique object reference number

token:
string

Access token from authentication operation

Example

Request Content-Types: application/json
Query
query customer($id: Int!, $token: String!){
  customer(id: $id, token: $token){
    address
    email
    id
    name
    note
    phone
    type
  }
}
Variables
{
  "id": "integer",
  "token": "string"
}
Try it now
Response Content-Types: application/json
Response Example (200 OK)
{
  "data": {
    "customer": {
      "address": "string",
      "email": "string",
      "id": "string",
      "name": "string",
      "note": "string",
      "phone": "string",
      "type": "string"
    }
  }
}

Bank

Fetch bank account information

Fetch banks

Fetch all bank account information owned by merchant

first:
integer

Returns the first n elements from the list.

after:
string

Returns the elements in the list that come after the specified cursor.

last:
integer

Returns the last n elements from the list.

before:
string

Returns the elements in the list that come before the specified cursor.

token:
string

Access token from authentication operation

Example

Request Content-Types: application/json
Query
query bankAccounts($first: Int, $after: String, $last: Int, $before: String, $token: String!){
  bankAccounts(first: $first, after: $after, last: $last, before: $before, token: $token){
  }
}
Variables
{
  "first": "integer",
  "after": "string",
  "last": "integer",
  "before": "string",
  "token": "string"
}
Try it now
Response Content-Types: application/json
Response Example (200 OK)
{
  "data": {
    "bankAccounts": {}
  }
}

Schema Definitions

Album: object

id:
ID

Unique object reference number

source:

Source

Example
{
  "id": "object",
  "source": "string"
}

BankAccount: object

bankSlug:

Provider code

id:
ID

Unique object reference number

name:

Title

no:

Number

Example
{
  "bankSlug": "string",
  "id": "object",
  "name": "string",
  "no": "string"
}

BankAccountConnection: object

The connection type for BankAccount.

edges:

A list of edges.

nodes:

A list of nodes.

pageInfo:

Information to aid in pagination.

Example
{
  "edges": [
    {
      "cursor": "string",
      "node": {
        "bankSlug": "string",
        "id": "object",
        "name": "string",
        "no": "string"
      }
    }
  ],
  "nodes": [
    {
      "bankSlug": "string",
      "id": "object",
      "name": "string",
      "no": "string"
    }
  ]
}

BankAccountEdge: object

An edge in a connection.

cursor:

A cursor for use in pagination.

node:

The item at the end of the edge.

Example
{
  "cursor": "string",
  "node": {
    "bankSlug": "string",
    "id": "object",
    "name": "string",
    "no": "string"
  }
}

Boolean: boolean

Represents true or false values.

Example
boolean

Customer: object

possible type

FbCustomer      = Facebook user
IgCustomer      = Instagram user
KronosCustomer  = Sale page user
LineAtCustomer  = Line user
LineCustomer    = Line user
OfflineCustomer = Crete by merchant not connect to any platform
address:

Address

email:

Email

id:
ID

Unique object reference number

name:

Name

note:

Note

orders:
array

All order

phone:

Phone

tags:
Tag

All tag

type:

Plateform which customer come from

Example
{
  "address": "string",
  "email": "string",
  "id": "object",
  "name": "string",
  "note": "string",
  "orders": "array",
  "phone": "string",
  "tags": [
    {
      "id": "object",
      "name": "string"
    }
  ],
  "type": "string"
}

CustomerConnection: object

The connection type for Customer.

edges:

A list of edges.

nodes:

A list of nodes.

pageInfo:

Information to aid in pagination.

Example
{
  "edges": [
    {
      "cursor": "string",
      "node": {
        "address": "string",
        "email": "string",
        "id": "object",
        "name": "string",
        "note": "string",
        "orders": "array",
        "phone": "string",
        "tags": [
          {
            "id": "object",
            "name": "string"
          }
        ],
        "type": "string"
      }
    }
  ],
  "nodes": [
    {
      "address": "string",
      "email": "string",
      "id": "object",
      "name": "string",
      "note": "string",
      "orders": "array",
      "phone": "string",
      "tags": [
        {
          "id": "object",
          "name": "string"
        }
      ],
      "type": "string"
    }
  ]
}

CustomerEdge: object

An edge in a connection.

cursor:

A cursor for use in pagination.

node:

The item at the end of the edge.

Example
{
  "cursor": "string",
  "node": {
    "address": "string",
    "email": "string",
    "id": "object",
    "name": "string",
    "note": "string",
    "orders": "array",
    "phone": "string",
    "tags": [
      {
        "id": "object",
        "name": "string"
      }
    ],
    "type": "string"
  }
}

Float: number

Represents signed double-precision fractional values as specified by IEEE 754.

Example
number

ID: object

Represents a unique identifier that is Base64 obfuscated. It is 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 "VXNlci0xMA==") or integer (such as 4) input value will be accepted as an ID.

Example
object

ISO8601DateTime: object

An ISO 8601-encoded datetime

Example
object

Int: number

Represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

Example
number

Order: object

auto:

Create by CF feature

bankAccount:

Bank account for this order payment

createdAt:

Timestamp when order create

customer:

Order owner

discount:

Discount

expiresOn:

Expire date

id:
ID

Unique object reference number

items:

Items in order

itemsCount:
Int

Number of item in this order

no:
Int

No

note:

Note

paidAmount:

Total amount paid by customer

paidAt:

Timestamp when customer paid

paymentSlip:

Payment slip

promotionCode:

Promotion code which be use in this order

sent:

True if customer already receive order inform

shippingCost:

Delivery cost in baht

shippingOption:

Shipping title

slug:

Slug

sold:

Customer already paid (stage paid, shipped)

stage:

Can be (draft, unpaid, transferred, paid, shipped)

subtotal:

Sum of items price

taxInvoiceNo:

Tax no.

total:

Final price which send to customer

trackingCode:

Delivery tracking code

url:

Detail link

user:

Admin who take care of this order

vat:

Vat amount

vatIncluded:

Vat include

Example
{
  "auto": "boolean",
  "bankAccount": {
    "bankSlug": "string",
    "id": "object",
    "name": "string",
    "no": "string"
  },
  "createdAt": "object",
  "customer": {
    "address": "string",
    "email": "string",
    "id": "object",
    "name": "string",
    "note": "string",
    "orders": "array",
    "phone": "string",
    "tags": [
      {
        "id": "object",
        "name": "string"
      }
    ],
    "type": "string"
  },
  "discount": "number",
  "expiresOn": "object",
  "id": "object",
  "items": [
    {
      "id": "object",
      "name": "string",
      "note": "string",
      "order": {
        "auto": "boolean",
        "bankAccount": {
          "bankSlug": "string",
          "id": "object",
          "name": "string",
          "no": "string"
        },
        "createdAt": "object",
        "customer": {
          "address": "string",
          "email": "string",
          "id": "object",
          "name": "string",
          "note": "string",
          "orders": "array",
          "phone": "string",
          "tags": [
            {
              "id": "object",
              "name": "string"
            }
          ],
          "type": "string"
        },
        "discount": "number",
        "expiresOn": "object",
        "id": "object"
      }
    }
  ]
}

OrderConnection: object

The connection type for Order.

edges:

A list of edges.

nodes:

A list of nodes.

pageInfo:

Information to aid in pagination.

Example
{
  "edges": [
    {
      "cursor": "string",
      "node": {
        "auto": "boolean",
        "bankAccount": {
          "bankSlug": "string",
          "id": "object",
          "name": "string",
          "no": "string"
        },
        "createdAt": "object",
        "customer": {
          "address": "string",
          "email": "string",
          "id": "object",
          "name": "string",
          "note": "string",
          "orders": "array",
          "phone": "string",
          "tags": [
            {
              "id": "object",
              "name": "string"
            }
          ],
          "type": "string"
        },
        "discount": "number",
        "expiresOn": "object",
        "id": "object",
        "items": [
          {
            "id": "object",
            "name": "string",
            "note": "string",
            "order": {
              "auto": "boolean",
              "bankAccount": {
                "bankSlug": "string",
                "id": "object",
                "name": "string",
                "no": "string"
              },
              "createdAt": "object",
              "customer": {
                "address": "string",
                "email": "string",
                "id": "object",
                "name": "string",
                "note": "string",
                "orders": "array",
                "phone": "string",
                "tags": [
                  {
                    "id": "object",
                    "name": "string"
                  }
                ]
              }
            }
          }
        ]
      }
    }
  ]
}

OrderEdge: object

An edge in a connection.

cursor:

A cursor for use in pagination.

node:

The item at the end of the edge.

Example
{
  "cursor": "string",
  "node": {
    "auto": "boolean",
    "bankAccount": {
      "bankSlug": "string",
      "id": "object",
      "name": "string",
      "no": "string"
    },
    "createdAt": "object",
    "customer": {
      "address": "string",
      "email": "string",
      "id": "object",
      "name": "string",
      "note": "string",
      "orders": "array",
      "phone": "string",
      "tags": [
        {
          "id": "object",
          "name": "string"
        }
      ],
      "type": "string"
    },
    "discount": "number",
    "expiresOn": "object",
    "id": "object",
    "items": [
      {
        "id": "object",
        "name": "string",
        "note": "string",
        "order": {
          "auto": "boolean",
          "bankAccount": {
            "bankSlug": "string",
            "id": "object",
            "name": "string",
            "no": "string"
          },
          "createdAt": "object",
          "customer": {
            "address": "string",
            "email": "string",
            "id": "object",
            "name": "string",
            "note": "string",
            "orders": "array",
            "phone": "string",
            "tags": [
              {
                "id": "object",
                "name": "string"
              }
            ],
            "type": "string"
          },
          "discount": "number"
        }
      }
    ]
  }
}

OrderItem: object

id:
ID

Unique object reference number

name:

Name

note:

Note

order:

Order detail

price:

Price

quantity:
Int

Quantity

subtotal:

Sum of items price

variant:

Product variant detail

Example
{
  "id": "object",
  "name": "string",
  "note": "string",
  "order": {
    "auto": "boolean",
    "bankAccount": {
      "bankSlug": "string",
      "id": "object",
      "name": "string",
      "no": "string"
    },
    "createdAt": "object",
    "customer": {
      "address": "string",
      "email": "string",
      "id": "object",
      "name": "string",
      "note": "string",
      "orders": "array",
      "phone": "string",
      "tags": [
        {
          "id": "object",
          "name": "string"
        }
      ],
      "type": "string"
    },
    "discount": "number",
    "expiresOn": "object",
    "id": "object",
    "items": [
      {
        "id": "object",
        "name": "string",
        "note": "string",
        "order": {
          "auto": "boolean",
          "bankAccount": {
            "bankSlug": "string",
            "id": "object",
            "name": "string",
            "no": "string"
          },
          "createdAt": "object",
          "customer": {
            "address": "string",
            "email": "string",
            "id": "object",
            "name": "string",
            "note": "string",
            "orders": "array",
            "phone": "string",
            "tags": [
              {
                "id": "object",
                "name": "string"
              }
            ]
          }
        }
      }
    ]
  }
}

PaymentSlip: object

possible status code

VERIFY_STATUS_VALID                = 100
VERIFY_STATUS_INVALID_PAID_AMOUNT  = 101
VERIFY_STATUS_INVALID_RECEIVER     = 102
VERIFY_STATUS_DUPLICATED_TRANS_REF = 201
VERIFY_STATUS_INVALID_TRANS_TYPE   = 202
VERIFY_STATUS_INVALID_TRANS_REF    = 203
VERIFY_STATUS_EXPIRE               = 204
VERIFY_STATUS_API_ERR              = 700
VERIFY_STATUS_INVALID_NO_QR        = 800
VERIFY_STATUS_INVALID              = 900
createdAt:

Create at

statusCode:
Int

Verify code

updatedAt:

Update at

Example
{
  "createdAt": "object",
  "statusCode": "number",
  "updatedAt": "object"
}

Photo: object

album:
id:
ID

Unique object reference number

thumbnail:

Small image hotlink

url:

Image hotlink

Example
{
  "album": {
    "id": "object",
    "source": "string"
  },
  "id": "object",
  "thumbnail": "string",
  "url": "string"
}

PhotosProduct: object

name:

Photo name

photoAlbum:

Album

photoId:
Int

Photo id

position:
Int

Use for image sorting

thumbnail:

Photo thumbnail

Example
{
  "name": "string",
  "photoAlbum": {
    "id": "object",
    "source": "string"
  },
  "photoId": "number",
  "position": "number",
  "thumbnail": "string"
}

Product: object

actual:
Int

Number of item in stock

available:
Int

Number of available for sale

cost:

Cost

defaultVariant:

Default variant

detail:

Detail

enabled:

Show on sale page

id:
ID

Unique object reference number

name:

Title

ordersCount:
Int

Number of order which has this product

photo:

Thumbnail detail

photosProducts:

Product images

price:

Price

priceBeforeDiscount:

Price before discount

refUrl:

Link to product detail page on Facebook

reserved:
Int

Number of reserved

sold:
Int

Number of sold

statuses:

All variant status

stockMoves:

Stock transactions

stockable:

Product use stock feature

thumbnail:

Preview image url

updatedAt:

Latest update time

url:

Link to product detail page on Page365

variable:

Product has variant

variants:

All variant

weight:

Weight

whenOutOfStock:

Action when product out of stock (inform, contact_only, can_order)

Example
{
  "actual": "number",
  "available": "number",
  "cost": "number",
  "defaultVariant": {
    "actual": "number",
    "available": "number",
    "code": "string",
    "cost": "number",
    "id": "object",
    "latestStockMoves": [
      {
        "createdAt": "object",
        "id": "object",
        "note": "string",
        "order": {
          "auto": "boolean",
          "bankAccount": {
            "bankSlug": "string",
            "id": "object",
            "name": "string",
            "no": "string"
          },
          "createdAt": "object",
          "customer": {
            "address": "string",
            "email": "string",
            "id": "object",
            "name": "string",
            "note": "string",
            "orders": "array",
            "phone": "string",
            "tags": [
              {
                "id": "object",
                "name": "string"
              }
            ],
            "type": "string"
          },
          "discount": "number",
          "expiresOn": "object",
          "id": "object",
          "items": [
            {
              "id": "object",
              "name": "string",
              "note": "string",
              "order": {
                "auto": "boolean",
                "bankAccount": {
                  "bankSlug": "string",
                  "id": "object",
                  "name": "string",
                  "no": "string"
                },
                "createdAt": "object"
              }
            }
          ]
        }
      }
    ]
  }
}

ProductCategory: object

album:

Album

albumName:

Album title

autoImport:

Auto import from 3rd party

description:

Description

editable:

DEPRECATED for Public API

enabled:

Show on sale page

id:
ID

Unique object reference number

name:

Title

products:

Products

size:
Int

Number of product in category

thumbnail:

Preview image url

Example
{
  "album": {
    "id": "object",
    "source": "string"
  },
  "albumName": "string",
  "autoImport": "boolean",
  "description": "string",
  "editable": "boolean",
  "enabled": "boolean",
  "id": "object",
  "name": "string",
  "products": {
    "edges": [
      {
        "cursor": "string",
        "node": {
          "actual": "number",
          "available": "number",
          "cost": "number",
          "defaultVariant": {
            "actual": "number",
            "available": "number",
            "code": "string",
            "cost": "number",
            "id": "object",
            "latestStockMoves": [
              {
                "createdAt": "object",
                "id": "object",
                "note": "string",
                "order": {
                  "auto": "boolean",
                  "bankAccount": {
                    "bankSlug": "string",
                    "id": "object",
                    "name": "string",
                    "no": "string"
                  },
                  "createdAt": "object",
                  "customer": {
                    "address": "string",
                    "email": "string",
                    "id": "object",
                    "name": "string",
                    "note": "string",
                    "orders": "array",
                    "phone": "string",
                    "tags": [
                      {
                        "id": "object",
                        "name": "string"
                      }
                    ],
                    "type": "string"
                  },
                  "discount": "number"
                }
              }
            ]
          }
        }
      }
    ]
  }
}

ProductCategoryConnection: object

The connection type for ProductCategory.

edges:

A list of edges.

nodes:

A list of nodes.

pageInfo:

Information to aid in pagination.

Example
{
  "edges": [
    {
      "cursor": "string",
      "node": {
        "album": {
          "id": "object",
          "source": "string"
        },
        "albumName": "string",
        "autoImport": "boolean",
        "description": "string",
        "editable": "boolean",
        "enabled": "boolean",
        "id": "object",
        "name": "string",
        "products": {
          "edges": [
            {
              "cursor": "string",
              "node": {
                "actual": "number",
                "available": "number",
                "cost": "number",
                "defaultVariant": {
                  "actual": "number",
                  "available": "number",
                  "code": "string",
                  "cost": "number",
                  "id": "object",
                  "latestStockMoves": [
                    {
                      "createdAt": "object",
                      "id": "object",
                      "note": "string",
                      "order": {
                        "auto": "boolean",
                        "bankAccount": {
                          "bankSlug": "string",
                          "id": "object",
                          "name": "string",
                          "no": "string"
                        },
                        "createdAt": "object",
                        "customer": {
                          "address": "string",
                          "email": "string",
                          "id": "object",
                          "name": "string",
                          "note": "string",
                          "orders": "array",
                          "phone": "string",
                          "tags": [
                            {
                              "id": "object"
                            }
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          ]
        }
      }
    }
  ]
}

ProductCategoryEdge: object

An edge in a connection.

cursor:

A cursor for use in pagination.

node:

The item at the end of the edge.

Example
{
  "cursor": "string",
  "node": {
    "album": {
      "id": "object",
      "source": "string"
    },
    "albumName": "string",
    "autoImport": "boolean",
    "description": "string",
    "editable": "boolean",
    "enabled": "boolean",
    "id": "object",
    "name": "string",
    "products": {
      "edges": [
        {
          "cursor": "string",
          "node": {
            "actual": "number",
            "available": "number",
            "cost": "number",
            "defaultVariant": {
              "actual": "number",
              "available": "number",
              "code": "string",
              "cost": "number",
              "id": "object",
              "latestStockMoves": [
                {
                  "createdAt": "object",
                  "id": "object",
                  "note": "string",
                  "order": {
                    "auto": "boolean",
                    "bankAccount": {
                      "bankSlug": "string",
                      "id": "object",
                      "name": "string",
                      "no": "string"
                    },
                    "createdAt": "object",
                    "customer": {
                      "address": "string",
                      "email": "string",
                      "id": "object",
                      "name": "string",
                      "note": "string",
                      "orders": "array",
                      "phone": "string",
                      "tags": [
                        {
                          "id": "object",
                          "name": "string"
                        }
                      ]
                    }
                  }
                }
              ]
            }
          }
        }
      ]
    }
  }
}

ProductConnection: object

The connection type for Product.

edges:

A list of edges.

nodes:

A list of nodes.

pageInfo:

Information to aid in pagination.

Example
{
  "edges": [
    {
      "cursor": "string",
      "node": {
        "actual": "number",
        "available": "number",
        "cost": "number",
        "defaultVariant": {
          "actual": "number",
          "available": "number",
          "code": "string",
          "cost": "number",
          "id": "object",
          "latestStockMoves": [
            {
              "createdAt": "object",
              "id": "object",
              "note": "string",
              "order": {
                "auto": "boolean",
                "bankAccount": {
                  "bankSlug": "string",
                  "id": "object",
                  "name": "string",
                  "no": "string"
                },
                "createdAt": "object",
                "customer": {
                  "address": "string",
                  "email": "string",
                  "id": "object",
                  "name": "string",
                  "note": "string",
                  "orders": "array",
                  "phone": "string",
                  "tags": [
                    {
                      "id": "object",
                      "name": "string"
                    }
                  ],
                  "type": "string"
                },
                "discount": "number",
                "expiresOn": "object",
                "id": "object",
                "items": [
                  {
                    "id": "object",
                    "name": "string",
                    "note": "string",
                    "order": {
                      "auto": "boolean",
                      "bankAccount": {
                        "bankSlug": "string",
                        "id": "object"
                      }
                    }
                  }
                ]
              }
            }
          ]
        }
      }
    }
  ]
}

ProductEdge: object

An edge in a connection.

cursor:

A cursor for use in pagination.

node:

The item at the end of the edge.

Example
{
  "cursor": "string",
  "node": {
    "actual": "number",
    "available": "number",
    "cost": "number",
    "defaultVariant": {
      "actual": "number",
      "available": "number",
      "code": "string",
      "cost": "number",
      "id": "object",
      "latestStockMoves": [
        {
          "createdAt": "object",
          "id": "object",
          "note": "string",
          "order": {
            "auto": "boolean",
            "bankAccount": {
              "bankSlug": "string",
              "id": "object",
              "name": "string",
              "no": "string"
            },
            "createdAt": "object",
            "customer": {
              "address": "string",
              "email": "string",
              "id": "object",
              "name": "string",
              "note": "string",
              "orders": "array",
              "phone": "string",
              "tags": [
                {
                  "id": "object",
                  "name": "string"
                }
              ],
              "type": "string"
            },
            "discount": "number",
            "expiresOn": "object",
            "id": "object",
            "items": [
              {
                "id": "object",
                "name": "string",
                "note": "string",
                "order": {
                  "auto": "boolean",
                  "bankAccount": {
                    "bankSlug": "string",
                    "id": "object",
                    "name": "string"
                  }
                }
              }
            ]
          }
        }
      ]
    }
  }
}

ProductVariant: object

actual:
Int

Number of item in stock

available:
Int

Number of available for sale

code:

Cf code

cost:

Cost

id:
ID

Unique object reference number

latestStockMoves:

latest 100 Stock transactions

name:

Title

ordersCount:
Int

Number of order which has this variant

price:

Price

priceBeforeDiscount:

Price before discount

profit:

Profit from this item

reserved:
Int

Number of reserved

reservedOrderItems:

Order item in reserved_orders

reservedOrders:

Order which has this variant and order status in unpaid, transferred, paid

sku:

SKU code

sold:
Int

Number of sold

status:

Stock status

stockMoves:

Stock transactions

weight:

Weight

Example
{
  "actual": "number",
  "available": "number",
  "code": "string",
  "cost": "number",
  "id": "object",
  "latestStockMoves": [
    {
      "createdAt": "object",
      "id": "object",
      "note": "string",
      "order": {
        "auto": "boolean",
        "bankAccount": {
          "bankSlug": "string",
          "id": "object",
          "name": "string",
          "no": "string"
        },
        "createdAt": "object",
        "customer": {
          "address": "string",
          "email": "string",
          "id": "object",
          "name": "string",
          "note": "string",
          "orders": "array",
          "phone": "string",
          "tags": [
            {
              "id": "object",
              "name": "string"
            }
          ],
          "type": "string"
        },
        "discount": "number",
        "expiresOn": "object",
        "id": "object",
        "items": [
          {
            "id": "object",
            "name": "string",
            "note": "string",
            "order": {
              "auto": "boolean",
              "bankAccount": {
                "bankSlug": "string",
                "id": "object",
                "name": "string",
                "no": "string"
              },
              "createdAt": "object",
              "customer": {
                "address": "string",
                "email": "string",
                "id": "object"
              }
            }
          }
        ]
      }
    }
  ]
}

ProductVariantConnection: object

The connection type for ProductVariant.

edges:

A list of edges.

nodes:

A list of nodes.

pageInfo:

Information to aid in pagination.

Example
{
  "edges": [
    {
      "cursor": "string",
      "node": {
        "actual": "number",
        "available": "number",
        "code": "string",
        "cost": "number",
        "id": "object",
        "latestStockMoves": [
          {
            "createdAt": "object",
            "id": "object",
            "note": "string",
            "order": {
              "auto": "boolean",
              "bankAccount": {
                "bankSlug": "string",
                "id": "object",
                "name": "string",
                "no": "string"
              },
              "createdAt": "object",
              "customer": {
                "address": "string",
                "email": "string",
                "id": "object",
                "name": "string",
                "note": "string",
                "orders": "array",
                "phone": "string",
                "tags": [
                  {
                    "id": "object",
                    "name": "string"
                  }
                ],
                "type": "string"
              },
              "discount": "number",
              "expiresOn": "object",
              "id": "object",
              "items": [
                {
                  "id": "object",
                  "name": "string",
                  "note": "string",
                  "order": {
                    "auto": "boolean",
                    "bankAccount": {
                      "bankSlug": "string",
                      "id": "object",
                      "name": "string",
                      "no": "string"
                    },
                    "createdAt": "object",
                    "customer": {}
                  }
                }
              ]
            }
          }
        ]
      }
    }
  ]
}

ProductVariantEdge: object

An edge in a connection.

cursor:

A cursor for use in pagination.

node:

The item at the end of the edge.

Example
{
  "cursor": "string",
  "node": {
    "actual": "number",
    "available": "number",
    "code": "string",
    "cost": "number",
    "id": "object",
    "latestStockMoves": [
      {
        "createdAt": "object",
        "id": "object",
        "note": "string",
        "order": {
          "auto": "boolean",
          "bankAccount": {
            "bankSlug": "string",
            "id": "object",
            "name": "string",
            "no": "string"
          },
          "createdAt": "object",
          "customer": {
            "address": "string",
            "email": "string",
            "id": "object",
            "name": "string",
            "note": "string",
            "orders": "array",
            "phone": "string",
            "tags": [
              {
                "id": "object",
                "name": "string"
              }
            ],
            "type": "string"
          },
          "discount": "number",
          "expiresOn": "object",
          "id": "object",
          "items": [
            {
              "id": "object",
              "name": "string",
              "note": "string",
              "order": {
                "auto": "boolean",
                "bankAccount": {
                  "bankSlug": "string",
                  "id": "object",
                  "name": "string",
                  "no": "string"
                },
                "createdAt": "object",
                "customer": {
                  "address": "string"
                }
              }
            }
          ]
        }
      }
    ]
  }
}

PublicApp: object

email:

Email

id:
ID

Unique object reference number

name:

Title

phone:

Contact

status:

Profile status (pending, reject, approved)

webhookUrl:

Webhook URL for sending an event when have occurred on merchant accounts

Example
{
  "email": "string",
  "id": "object",
  "name": "string",
  "phone": "string",
  "status": "string",
  "webhookUrl": "string"
}

StockMove: object

createdAt:

Transaction create time

id:
ID

Unique object reference number

note:

Note

order:

Associate order for outbound

price:

Price

quantity:
Int

Quantity positive value for inbound and negetive for outbound

quantityAbs:
Int

Quantity in positive term

type:

Inbound for inceasing and outbound for decreasing (inbound, outbound)

variant:

Associate variant

Example
{
  "createdAt": "object",
  "id": "object",
  "note": "string",
  "order": {
    "auto": "boolean",
    "bankAccount": {
      "bankSlug": "string",
      "id": "object",
      "name": "string",
      "no": "string"
    },
    "createdAt": "object",
    "customer": {
      "address": "string",
      "email": "string",
      "id": "object",
      "name": "string",
      "note": "string",
      "orders": "array",
      "phone": "string",
      "tags": [
        {
          "id": "object",
          "name": "string"
        }
      ],
      "type": "string"
    },
    "discount": "number",
    "expiresOn": "object",
    "id": "object",
    "items": [
      {
        "id": "object",
        "name": "string",
        "note": "string",
        "order": {
          "auto": "boolean",
          "bankAccount": {
            "bankSlug": "string",
            "id": "object",
            "name": "string",
            "no": "string"
          },
          "createdAt": "object",
          "customer": {
            "address": "string",
            "email": "string",
            "id": "object",
            "name": "string",
            "note": "string",
            "orders": "array",
            "phone": "string",
            "tags": [
              {
                "id": "object",
                "name": "string"
              }
            ]
          }
        }
      }
    ]
  }
}

String: string

Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.

Tag: object

id:
ID

Unique object reference number

name:

Name

Example
{
  "id": "object",
  "name": "string"
}

User: object

accounts:
email:
id:
ID
lang:
name:
profilePicture:
Example
{
  "accounts": [
    null
  ],
  "email": "string",
  "id": "object",
  "lang": "string",
  "name": "string",
  "profilePicture": "string"
}