NAV Navbar
GraphQL

Introduction

Welcome to the SHOPPO GraphQL API!

SHOPPO chose GraphQL for our API because it offers significantly more flexibility for our integrators. The ability to define precisely the data you want—and only the data you want—is a powerful advantage over the REST API endpoints. GraphQL lets you replace multiple REST requests with a single call to fetch the data you specify.

Endpoint

To use API, you need to POST a GraphQL compatible request body to our API endpoint. And you will get a JSON response.

Playground

You can explore our API with GraphiQL here:

Graphiql playground

How to use Playground as a API reference

With GraphiQL, you can see a docs menu in the top right(as shown below)

Graphiql docs

In the menu, you can see our GraphQL Schema. Basically, RootQuery for supported query objects, and RootMutation for supported mutations. And of course, you can search a specific schema in the search box. For example, you search Product and see what is a Product.

product

As shown in the screenshot, all supported field are listed with name and type and you can know if the field is required. If you click on the field name, you can get a simple description of the field.

Using Java

These links may help:

Authentication

You need to pass the accesstoken and viewerid fields in request header to pass the authentication.In addition, you need to set the Content-type to application/json.

How to use

query product($id: ID!) {
  node(id: $id) {
    ... on Product {
      id
      name
    }
  }
}

You can use query object like shown on the right in either GraphiQL playground or with cURL.

Sku is what our customers really see in our app. It contains specifications of the stuff(ex. length, color). Basic info of the stuff are in Product objects. A product can have many skus.

To use cURL, you need a valid GraphQL request body. The format is: {"query":"", "variables":{}, "operationName":""}.

An example using Product Feed Query Object is shown below:

curl -X POST -H "Content-Type: application/json" -H "accesstoken: your_accesstoken" -H "viewerid: your_viewerid" --data '{"query":"query product($id: ID!) {\n node(id: $id) {\n ... on Product {\n id\n name\n }\n }\n}\n","variables":{"id": "21421713751366966949588"},"operationName":"Product"}' https://graphql-dev.shoppo.com/api/graphql/partner

Product

You can query the product list and product category through API.

Query Single Product

Query a single Product with relay_id

query product($id: ID!) {
  node(id: $id) {
    ... on Product {
      id
      name
      brand
      consumerCategories {
        categoryId
        path
      }
      coverImage {
        id
      }
      skus {
        id
        price
        color
        size
        shippingPrice
        shippingTime
      }
    }
  }
}

Product Fields

Name Type Required Description
id ID True product relay_id
brand String True brand name
coverImage Image True cover image object
coverVideo Video False video object
consumerCategories [ConsumerCategory] True product categories
description String True product description
enabled Boolean True whether this product could be sell
extraImages [Image] False product images list object
features [String] False product features, there are at most 5 features
name String True product name
inventory Int True total count could to sell
skus [Sku] True Sku list
targetUserType TargetUserType True product is fit for
whiteBackgroundImage Image True white background image object

Query Single Sku

Query a singe Sku with relay_id

query sku($id: ID!) {
  node(id: $id) {
    ... on Sku {
      id
      color
      size
      price
      product {
        id
        name
      }
    }
  }
}

Sku Fields

Name Type Required Description
id ID True Sku relay_id
color String True e.g., red / blue
coverImage Image True cover image for this Sku
enabled Boolean True this Sku whether could be sell
height String False default unit is inch
inventory Int True total count could be sell
length String False default unit is inch
msrp Float False MSRP
price Float True currency unit is USD
product Product True retrieve Sku's product
shippingConfig CustomerShippingConfig True specialized shipping price and shipping time for multiple countries
shippingPrice Float True Shipping price for this Sku, product all skus' shipping price are same, currency unit is USD
shippingTime String True Shipping days range, e.g., 3-10 days, product all skus' shipping time are same
size String False default unit is inch
weight String False default unit is Pound
width String False default unit is inch
specs List False sku spec item list with name and value like Size, Weight or Material

Product List

Query products with pagination(using Relay Connection, check End-of-list, counts, and Connections for details)

query productList(
  $first: Int,
  $after: String,
  $before: String,
  $last: Int,
  $filters: ProductFilterInput,
) {
  productList(
    first: $first,
    after: $after,
    before: $before,
    last: $last,
    filters: $filters,
  ) {
    length
    edges {
      node {
        id
        name
      }
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}

Variables

Name Type Required Description
first Int False limit size
last Int False limit size
after String False offset cursor
before String False offset cursor
filters ProductFilterInput False filters

ProductFilterInput Fields

Name Type Required Description
timeCreateRange [Int, Int] False filter by created time range, time format is unix timestamp
timeUpdatedRange [Int, Int] False filter by updated time range, time format is unix timestamp
productEnabled Boolean False is product enabled
categoryId String False category id

Response Product List Fields

Name Type Required Description
length Int True total matches count
edges List True node list
edges.node Product product node, please see Product Fields definition below

Product Category List

Query for product category list

query productCategories(
  $first: Int,
  $after: String,
  ){
  productCategories(
    first: $first,
    after: $after,
  ) {
    length
    edges {
      node {
        id
        categoryId
        path
      }
    }
  }
}

Response node type is ConsumerProductCategory

Consumer Category

Product maybe belongs to multiple categories, category fields:

Name Type Required Description
id ID True relay id
categoryId String True Shoppo own category ID string, e.g., 5010101
path String True category path, e.g., Beauty > Makeup & Beauty > Fragrance > Aromatherapy

TargetUserType Enum

Value Description
ALL for all
MEN male only
WOMEN female only
UNKNOWN not sure

Customer Shipping Config

Name Type Required Description
CountryCourierCode CountryCourierCode True country courier code enum
shippingPrice Float True special shipping price for this country, currency unit is USD
shippingTime String True special shipping time for this country

Country Code Enum

Value Country
US United States
CN China
IN India
MY Malaysia
SG Singapore
KE Kenya

Order

Shoppo Order Workflow

Order flow

Order List

query orderList(
    $first: Int,
    $last: Int,
    $after: String,
    $before: String,
    $filters: OrderFilterInput,
) {
  orderList(
    first: $first,
    last: $last,
    after: $after,
    before: $before,
    filters: $filters,
  ) {
    length
    edges {
      node {
        id
        status
      }
    }
  }
}

Variables

Name Type Required Description
first Int False limit size
last Int False limit size
after String False offset cursor
before String False offset cursor
filters OrderFilterInput False filter parameters

OrderFilterInput Fields

Name Type Required Description
order_id String False The shoppo order id
partner_order_code String False The partner order code
sku_id String False The sku_id in order
order_csv_upload_record_id String False The order csv upload record id
time_payment_processed_range [Int, Int] False Time payment range
status_in [OrderStatus] Fasle order status list

Response Order List Fields

field name type required description
length Int True total matches count
edges List True order node list
edges.node Order False order node, please see Order Node definition below

Sync Order Status Workflow

Order list

Create Order

Create order with Sku items and shipping address.

mutation createOrder(
  $shippingAddress: ShippingAddressInput!,
  $orderItems: [OrderItemInput!]!,
  $partnerOrderCode: String!,
  $trackingNumber: String,
  $partnerSellerName: String
) {
  createOrder(
    shippingAddress: $shippingAddress,
    orderItems: $orderItems,
    partnerOrderCode: $partnerOrderCode,
    trackingNumber: $trackingNumber,
    partnerSellerName: $partnerSellerName
    ){
      order {
        id
        status
        orderItems {
          id
          sku {
            originalId
            price
          }
          product {
            originalId
            name
          }
          quantity
        }
      }
  }
}

Variables

Name Type Required Description
shippingAddress ShippingAddressInput True address object
orderItems [OrderItemInput!]! True order items contains Sku ID and quantity
partnerOrderCode String True partner code code
trackingNumber String False partner tracking number
partnerSellerName String False the virtual seller name of shoppo, shoppo may have different seller name for different product.

OrderItemInput Fields

Name Type Required Description
skuId ID True Sku relay id
quantity Int True buy Sku quantity

The response of order structure details, please see Order Node

Query Order

Query order with relay_id

query order($id: ID!) {
  node(id: $id) {
    ... on order {
      id
      orderItems {
        id
        sku {
          originalId
        }
        status
      }
      status
    }
  }
}

Order Fields

Name Type Required Description
discount_amount Float True discount amount
id ID True order relay id
order_items [OrderItem] True order item list
order_subtotal Float True sum of products amount and shipping fee
order_total Float True customer paid amount
shipping_address ShippingAddress True address object
shipping_cost Float True total shipping fee amount
status OrderStatus True order enums status
refund_status OrderRefundStatus False order enums refund status
time_created Int True unix timestamp for order created at
time_payment_processed Int False unix timestamp for order paid at
tracking_number String False order tracking number

Query OrderItem

query orderItem($id: ID!) {
  node(id: $id) {
    ... on orderItem {
      id
      sku {
        id
        originalId
        price
        shippingPrice
      }
      product {
        id
        originalId
        name
      }
      status
    }
  }
}

Order Item Fields

Name Type Required Description
id ID True order item relay id
is_refunded Boolean False the order item whether is refunded or not
order Order True order item's order object
product Product True product snapshot
product.id ID True product snapshot relay id
product.originalId ID True product relay id, if you want retrieve product, use originalId other than id
quantity Int True number for buy this Sku
refundedAmount Float False if order item is refunded, the amount will be return
shippingRefunded Boolean False if refunded, the refunded amount whether contains shipping fee or not
sku Sku True sku snapshot
sku.id ID True Sku snapshot relay id
sku.originalId ID True Sku relay id, if you want retrieve Sku, use originalId other than id
shippingPackage ShippingPackage False order item's shipping package
shippingProvider String False Courier name for shipping package
status OrderItemStatus True order item status enum
trackingNumber String False tracking number for the package
timeRefunded Int False unix timestamp for refund created at if refunded

Set Order as Paid

Before set order as paid, please check the order status and it should be OPEN. When set order as paid successfully, the status will be PAID.

mutation setOrderAsPaid($orderId: ID!, $chargeId: String!) {
  setOrderAsPaid(orderId: $orderId, chargeId: $chargeId) {
    order {
      id
      status
      timePaymentProcessed
      orderTotal
      orderSubtotal
      shippingCost
      orderItems {
        id
        status
        sku {
          price
          shippingPrice
        }
      }
    }
  }
}

Variables

Name Type Required Description
orderId ID True order relay id to set paid
chargeId String True Partner charge id for the order and should be unique

Cancel OrderItem

If order is not paid, you don't need cancel order. Only when order item status is PAID, you could cancel order item directly, otherwise you need create customer service ticket.

mutation cancelOrderItem($orderItemId: ID!) {
  cancelOrderItem(orderItemId: $orderItemId) {
    orderItem {
      id
      status
    }
  }
}

Variables

Name Type Required Description
orderItemId ID True order item relay id to cancel

Cancel Order

If your order has many order items and you need to cancel all items, you can use the cancel order interface as below. Same as cancel order item, only when all order items status of this order are PAID, you could cancel order directly, otherwise you need create customer service ticket.

mutation cancelOrder($orderId: ID!) {
  cancelOrder(orderId: $orderId) {
    order {
      id
      status
    }
  }
}

Variables

Name Type Required Description
orderId ID True order relay id to cancel

Shipping Address Fields

The address for packages shipped to customer

Name Type Required Description
recipientFirstName String True recipient first name
recipientLastName String True recipient last name
streetAddress1 String True Address 1
streetAddress2 String True Address 2
city String True city name
state String True state name
countryCode CountryCode True country code, e.g. US for United States
zipcode String True zip code
phoneNumber String True recipient phone number
logisticAttribute String False logistics attribute

Order Status Enums

Value Description
OPEN order created
PAID order has been paid
IN_PROGRESS packages are being prepared in warehouse
DELIVERED packages are sent to couriers
CLOSED customer cancelled the order
EXPIRED order expired and could not pay for this order

Order Refund Status Enums

Value Description
FULL_REFUNDED all order items are refunded
PARTIAL_REFUNDED part of order items are refunded
NOT_REFUNDED none of order items are refunded

OrderItem Status Enums

Value Description
OPEN order has not been paid
PAID order has been paid
IN_FULFILLMENT order item package is being prepared in warehouse
SHIPPED the package is on the way to deliver to customer
DELIVERED customer confirmed he received the package
CANCELLED order item is cancelled

Shipping Package Fields

Name Type Required Description
id ID True relay id
checkpoints [Checkpoint] False tracking info
courier String True shipping provider name
isDelivered Boolean True whether package is delivered
status String True packpage current status
timeDelivered Int False delivered at, unix timestamp
timeLanded Int False landed at, unix timestamp
timeShipped Int False shipped at, unix timestamp
timeTracked Int False tracked at, unix timestamp
trackingNumber String True tracking number

Checkpoint Fields:

Name Type Required Description
courier String False courier name
time Int False checkpoint happened at, unix timestamp
message String False event description
location String False location

Refund Reason Type Enums

Value Description
CUSTOMER_CANCELED customer canceled order
OUT_OF_STOCK sku is out of stock
BAD_SHIPPING_ADDRESS the shipping address is wrong
AGREEMENT_WITH_USER negotiate with the user
FRAUDULENT_PURCHASE fraudulent purchase
NOT_SHIPPED_TOO_LONG not transported for too long

Image and Video

Upload Image

You can get the image_id by using the UploadImage method on the right.

mutation uploadImage($image: File!) {
  uploadImage(file: $image) {
    image {
      id
      originalWidth
      originalHeight
      originalUrl
      mainColor
      checksum
      versions {
        filename
        height
        width
      }
    }
  }
}    

Image Fields

Name Type Required Description
id ID True image relay_id
checksum String True image hash
originalHeight Int True original image height
originalWidth Int True original image width
originalUrl String True original image CDN url
mainColor String True Main color in this image in hex format
type String True image format, png/jpeg
versions List True All available versions of this image

The expected result is shown on the right.

{
  "data": {
    "uploadImage": {
      "image": {
        "checksum": "a6005826c6e1b99cf46001d50ff3622f", 
        "id": "mDDlGkl4YXDuQ", 
        "mainColor": "#CDCDCD", 
        "originalHeight": 1644, 
        "originalUrl": "https://cdn.shoppo.com/images/a6005826c6e1b99cf46001d50ff3622f.JPEG", 
        "originalWidth": 2000, 
        "versions": [
          {
            "filename": "a6005826c6e1b99cf46001d50ff3622f.JPEG", 
            "height": 1644, 
            "width": 2000
          }, 
          {
            "filename": "a6005826c6e1b99cf46001d50ff3622f-100x100.JPEG", 
            "height": 100, 
            "width": 121
          }, 
          {
            "filename": "a6005826c6e1b99cf46001d50ff3622f-400x400.JPEG", 
            "height": 400, 
            "width": 486
          }, 
          {
            "filename": "a6005826c6e1b99cf46001d50ff3622f-1000x1000.JPEG", 
            "height": 1000, 
            "width": 1216
          }
        ]
      }
    }
  }
}

Video Fields

Name Type Required Description
id ID True video relay_id
checksum String True video hash
rowUrl String True original video Url

Ticket

Shoppo Ticket Workflow

Ticket flow

Ticket List

query exchangeItemTicketList(
    $first: Int,
    $last: Int,
    $after: String,
    $before: String,
    $filters: TicketFilterInput,
) {
  exchangeItemTicketList(
    first: $first,
    last: $last,
    after: $after,
    before: $before,
    filters: $filters,
  ) {
    edges {
      node {
        id
      }
    }
    length
  }
}

Variables

Name Type Required Description
first Int False limit size
last Int False limit size
after String False offset cursor
before String False offset cursor
filters TicketFilterInput False filter parameters

TicketFilterInput Fields

Name Type Required Description
timeCreatedRange [Int, Int] filter by created time range, time format is unix timestamp

Response Ticket List Fields

Name Type Required Description
length Int True total matches count
edges List True ticket node list
edges.node Ticket ticket node, please see Ticket definition below

The same is true for refundTicketList and orderQuestionTicketList.

Create Ticket

Creating an exchange item ticket with firstName, lastName, email, reason, orderItems, imageIds and remark.

Create Ticket Mutation:

mutation CreateExchangeItemTicket(
  $firstName: String!,
  $lastName: String!,
  $email: String!,
  $reason: ExchangeItemReason!,
  $orderItemIds: [ID]!,
  $imageIds: [ID]!,
  $remark: String,
) {
  createExchangeItemTicket(
    firstName: $firstName,
    lastName: $lastName,
    email: $email,
    reason: $reason,
    orderItemIds: $orderItemIds,
    imageIds: $imageIds,
    remark: $remark,
  ){
    ticket{
      reason
      id
      firstName
      lastName
      email
   }
  }
}

You can get the orderItemId through the Create Order method and get the imageId through the Upload Image method. Response ticket structure details, please see Query Ticket.

Variables

Name Type Required Description
reason String True reason for ticket
id ID String True
firstName String True ticket author's firstname
lastName String True ticket author's lastname
email String True ticket author's email

Similar to creating an exchange item ticket, creating a refund ticket requires firstName, lastName, email, reason, problemType, itemDeliveryStatus and imageIds.Creating a order question ticket requires firstName, lastName, email, itemDeliveryStatus and imageIds.

Variables

Name Type Required Description
problemType Enum True REFUND, EXCHANGE, NOT_ARRIVED, OTHER
itemDeliveryStatus Enum True RECEIVED, NOT_RECEIVED

Query Ticket

Query ticket with reply_id.

query exchangeItemTicket($ticketId: ID!) {
  exchangeItemTicket(ticketId: $ticketId) {
    id
    reason
    ticketId
    firstName
    lastName
    email
    status
    zendeskStatus
    remark
    comments{
      length
      edges {
        node {
          content
        }
      }
    }
  }
}

Ticket Fields

Name Type Required Description
id ID True id
ticketId ID True return id when create ticket
status Enum True OPEN, CLOSED
zendeskStatus TicketStatus True ticket enums status
firstName String True ticket author's firstname
lastName String True ticket author's lastname
email String True ticket author's email
remark String True remark
comments.edges List False ticket comment node list
comments.edges.node Comment False ticket comment node, please see Comment definition below
comments.length Int True total comments matches count

Comment Variables

Name Type Required Description
content String True ticket reply content

Webhook(Reply Ticket Callback)

We need you to provide a url to accept the POST method for the shoppo call to reply ticket.

Post Variables

Name Type Required Description
ticketId ID True return id when create ticket
content String True ticket reply content

Example delivery

POST /reply HTTP/1.1
Host: localhost
Content-Type: application/json
Content-Length: 1000
{
  "ticketId": "KJh51ba6sd23",
  "content": "This is a reply to ticket."
}

If the reply is successful, we would like to reply 200, and the reply is as follows. Otherwise we want to show specific error message in reply.

{
  "error": ""
}

Reply Ticket

The user can reply to the return ticket with the reply_id.

mutation ReplyCustomerServiceTicket(
    $ticketId: ID!,
    $replyContent: String!
) {
  replyCustomerServiceTicket(
    ticketId: $ticketId,
    replyContent: $replyContent
  ) {
    success
  }
}

Response Variables

Name Type Required Description
success Boolean True

Ticket Status

There are six values for status: New, Open, Pending, On-hold, Solved, Closed. A ticket's status can be set and updated either manually by an agent or automatically via your business rules. A ticket's status cannot be changed to Closed manually however; that is handled automatically via your business rules.

Value Description
NEW New means that the request was received but that it has not been opened and has not been assigned to an agent. The New status can indicate that the support team is evaluating it to determine who should be assigned to resolve it.
OPEN Open means that the request has been assigned to an agent who is working to resolve it. Once a ticket status changes to Open, it can never return to New. If your tickets are being created in the Open status instead of New, see Why is my New ticket being created in Open status? in our Support Tech Notes.
PENDING Pending means that the assigned agent has a follow-up question for the requester. The agent may need more information about the support issue. Requests that are set to Pending typically remain that way until the requester responds and provides the information the agent needs to continue resolving the request.
HOLD On-hold means that the support request is awaiting a resolution from a third party—someone who is not a member of your support staff and does not have an agent account. This status is optional and must be added (see Adding the On-hold ticket status to your Zendesk in the Administrator Guide)
SOLVED Solved means that the agent has resolved the support issue. Solved tickets are closed, typically, a number of days after they have been set to Solved (the exact number of days depends on how an Administrator set this up). Until a ticket is closed, the requester can reopen the ticket. For example, the requester may not agree with the agent that the support issue is resolved and reply back to the ticket solved email notification.
CLOSED Closed means that the ticket is complete and can't be reopened. Requesters however can create follow-up requests for closed requests.

Proactive Notification

In order to notify you of our product and sku changes in a timely manner, we need you to provide the following interface for us to call.

For each interface, you need to provide a url to accept the corresponding parameters and return the correct result. For the correct result, you need to return a response code of 200. For other incorrect results, return a non-200 response code.

Shoppo wil set accesstoken fields in request header. In addition, Content-type to application/json.

Authentication

Create Product

post params

{
    "identifier": "",
    "brand": "",
    "tags": "",
    "name": "",
    "inventory": "",
    "target_user_type": "",
    "enabled": "",
    "category_id": "",
    "consumer_category": [
        {
            "id": "",
            "original_id": "",
            "category_id": "",
            "path": ""
        }
    ],
    "cover_image": {
        "id": "",
        "original_id": "",
        "checksum": "",
        "original_width": "",
        "original_height": "",
        "original_url": "",
        "main_color": "",
        "type": "",
        "versions": "",
        "schema": ""
    },
    "white_background_image": {
        "id": "",
        "original_id": "",
        "checksum": "",
        "original_width": "",
        "original_height": "",
        "original_url": "",
        "main_color": "",
        "type": "",
        "versions": "",
        "schema": ""
    },
    "cover_video": {
        "id": "",
        "original_id": "",
        "checksum": "",
        "raw_path": "",
        "hls_path": "",
        "cover_image": {
            "id": "",
            "original_id": "",
            "checksum": "",
            "original_width": "",
            "original_height": "",
            "original_url": "",
            "main_color": "",
            "type": "",
            "versions": "",
            "schema": ""
        }
    },
    "extra_images": [
        {
            "id": "",
            "original_id": "",
            "checksum": "",
            "original_width": "",
            "original_height": "",
            "original_url": "",
            "main_color": "",
            "type": "",
            "versions": "",
            "schema": ""
        }
    ],
    "merchant": {
        "id": "",
        "name": ""
    },
    "time_updated"
}
Name Type Required Description
brand String True brand name
coverImage Image True cover image object
coverVideo Video False video object
consumerCategories [ConsumerCategory] True product categories
description String True product description
enabled Boolean True whether this product could be sell
extraImages [Image] False product images list object
features [String] False product features, there are at most 5 features
name String True product name
inventory Int True total count could to sell
skus [Sku] True Sku list
targetUserType TargetUserType True product is fit for
whiteBackgroundImage Image True white background image object
time_updated Int True timestamp

Update Product

post params

{
    "product_id": "",
    "identifier": "",
    "brand": "",
    "tags": "",
    "name": "",
    "inventory": "",
    "target_user_type": "",
    "enabled": "",
    "category_id": "",
    "consumer_category": [
        {
            "id": "",
            "original_id": "",
            "category_id": "",
            "path": ""
        }
    ],
    "cover_image": {
        "id": "",
        "original_id": "",
        "checksum": "",
        "original_width": "",
        "original_height": "",
        "original_url": "",
        "main_color": "",
        "type": "",
        "versions": "",
        "schema": ""
    },
    "white_background_image": {
        "id": "",
        "original_id": "",
        "checksum": "",
        "original_width": "",
        "original_height": "",
        "original_url": "",
        "main_color": "",
        "type": "",
        "versions": "",
        "schema": ""
    },
    "cover_video": {
        "id": "",
        "original_id": "",
        "checksum": "",
        "raw_path": "",
        "hls_path": "",
        "cover_image": {
            "id": "",
            "original_id": "",
            "checksum": "",
            "original_width": "",
            "original_height": "",
            "original_url": "",
            "main_color": "",
            "type": "",
            "versions": "",
            "schema": ""
        }
    },
    "extra_images": [
        {
            "id": "",
            "original_id": "",
            "checksum": "",
            "original_width": "",
            "original_height": "",
            "original_url": "",
            "main_color": "",
            "type": "",
            "versions": "",
            "schema": ""
        }
    ],
    "merchant": {
        "id": "",
        "name": ""
    },
    "time_updated"
}
Name Type Required Description
product_id String True product relay_id
brand String False brand name
coverImage Image False cover image object
coverVideo Video False video object
consumerCategories [ConsumerCategory] False product categories
description String False product description
enabled Boolean False whether this product could be sell
extraImages [Image] False product images list object
features [String] False product features, there are at most 5 features
name String False product name
inventory Int False total count could to sell
skus [Sku] False Sku list
targetUserType TargetUserType False product is fit for
whiteBackgroundImage Image False white background image object
time_updated Int True timestamp

Create Sku

post params

{
    "identifier": "",
    "description": "",
    "color": "",
    "size": "",
    "inventory": "",
    "price": "",
    "shipping_price": "",
    "msrp": "",
    "shipping_time": "",
    "length": "",
    "width": "",
    "height": "",
    "weight": "",
    "cover_image": {
        "id": "",
        "original_id": "",
        "checksum": "",
        "original_width": "",
        "original_height": "",
        "original_url": "",
        "main_color": "",
        "type": "",
        "versions": "",
        "schema": ""
    },
    "enabled": "",
    "global_shipping_config": "",
    "merchant": {
        "id": "",
        "name": ""
    },
    "time_updated"
}
Name Type Required Description
color String True e.g., red / blue
coverImage Image True cover image for this Sku
enabled Boolean True this Sku whether could be sell
height String False default unit is inch
inventory Int True total count could be sell
length String False default unit is inch
msrp Float False MSRP
price Float True currency unit is USD
product Product True retrieve Sku's product
shippingConfig CustomerShippingConfig True specialized shipping price and shipping time for multiple countries
shippingPrice Float True Shipping price for this Sku, product all skus' shipping price are same
shippingTime String True Shipping days range, e.g., 3-10 days, product all skus' shipping time are same
size String False default unit is inch
weight String False default unit is Pound
width String False default unit is inch
time_updated Int True timestamp

Update Sku

post params

{
    "sku_id": "",
    "identifier": "",
    "description": "",
    "color": "",
    "size": "",
    "inventory": "",
    "price": "",
    "shipping_price": "",
    "msrp": "",
    "shipping_time": "",
    "length": "",
    "width": "",
    "height": "",
    "weight": "",
    "cover_image": {
        "id": "",
        "original_id": "",
        "checksum": "",
        "original_width": "",
        "original_height": "",
        "original_url": "",
        "main_color": "",
        "type": "",
        "versions": "",
        "schema": ""
    },
    "enabled": "",
    "global_shipping_config": "",
    "merchant": {
        "id": "",
        "name": ""
    },
    "time_updated"
}
Name Type Required Description
sku_id ID True Sku relay_id
color String False e.g., red / blue
coverImage Image False cover image for this Sku
enabled Boolean False this Sku whether could be sell
height String False default unit is inch
inventory Int False total count could be sell
length String False default unit is inch
msrp Float False MSRP
price Float False currency unit is USD
product Product False retrieve Sku's product
shippingConfig CustomerShippingConfig False specialized shipping price and shipping time for multiple countries
shippingPrice Float False Shipping price for this Sku, product all skus' shipping price are same
shippingTime String False Shipping days range, e.g., 3-10 days, product all skus' shipping time are same
size String False default unit is inch
weight String False default unit is Pound
width String False default unit is inch
time_updated Int True timestamp

Toggle Enabled Merchant

{
    "merchant_toggle_list": [
        {
            "merchant_id": "",
            "enabled": ""
        }
    ],
    "time_updated": ""
}

params

Name Type Required Description
merchant_toggle_list List True merchant toggle list
time_updated Int merchant_toggle_list timestamp

Cancel Partner Order

{
    "order_id": "1361546075101402",
    "timestamp": 1547705337,
}

params

Name Type Required Description
timestamp Integer True timestamp in seconds
order_id String True Partner Order Code

Deliver Partner Order

{
    "order_id": "1361546075101402",
    "timestamp": 1547705337
}

params

Name Type Required Description
timestamp Integer True timestamp in seconds
order_id String True Partner Order Code