Fancy Seller APIPermalink

    To make an API request, you must prefix the url with https://api.fancy.com/rest-api/v1/seller/{seller-id}/and send your API token as a parameter. All request/response formats are JSON.

    GET request example:

    GET /rest-api/v1/seller/1001/dashboard/summary/daily?token=APITOKEN
    Host: api.fancy.com

    POST request example:

    POST /rest-api/v1/seller/1001/products/
    Host: api.fancy.com
    Content-Type: application/json
    
    { "token": "APITOKEN", "title": "New Item", "price": "19.80", ... }

    Dashboard SummaryPermalink

    class DashboardSummaryView(**kwargs)Permalink
    get(*args, **kwargs)Permalink

    Dashboard Summary

    • URL
      1. dashboard/summary/{range}/
      2. dashboard/summary/specific/{date_from}/{date_to}/
    • Parameters
      1. {range}: one of “daily”, “weekly”, “monthly”, “24h”, “7d”, “30d”, “12m”.
      2. {date_from}, {date to}: 8 characters string as YYYYMMDD format
    • Example
      1. /dashboard/summary/
      2. /dashboard/summary/weekly/
      3. /dashboard/summary/12m/
      4. /dashboard/summary/specific/20140101/20150301/
    • HTTP Method: GET

    Return (JSON):

    {
        "range": one of "daily", "weekly", "monthly", "24h", "7d", "30d", "12m" (string),
        "date_from_str" : start date (date format string, YYYY-MM-DD HH:mm:ss),
        "date_to_str": end date (date format string, YYYY-MM-DD HH:mm:ss),
        "current_values": {
            "sales": sales count in this range (number),
            "fancyd": fancyd count in this range (number),
            "orders": orders count in this range (number),
            "view": view count in this range (number)
        },
        "prev_values": {
            "sales": sales count in previous range (number),
            "fancyd": fancyd count in previous range (number),
            "orders": orders count in previous range (number),
            "view": view count in this previous (number)
        }
    }
    

    Dashboard Area ChartPermalink

    class DashboardAreaChartDataView(**kwargs)Permalink
    get(*args, **kwargs)Permalink

    Dashboard Area Chart

    • URL
      1. dashboard/area-chart-data/{log_type}/{range}/
      2. dashboard/area-chart-data/{log_type}/specific/{date_from}/{date_to}/
    • Parameters
      1. {log_type}: one of “view”, “fancyd”, “orders”, “sales”
      2. {range}: one of “daily”, “weekly”, “monthly”, “7d”, ‘30d”, “12m”.
      3. {date_from}, {date to}: 8 characters string as YYYYMMDD format
    • Example
      1. /dashboard/area-chart-data/fancyd/daily
      2. /dashboard/area-chart-data/orders/12m
      3. /dashboard/area-chart-data/sales/specific/20140101/20150301

    HTTP Method: GET

    Return (JSON):

    {
        "range": one of "daily", "weekly", "monthly", "7d", "30d", "12m" or "specific" (string),
        "date_from_str" : start date (date format string, YYYY-MM-DD HH:mm:ss),
        "date_to_str": end date (date format string, YYYY-MM-DD HH:mm:ss),
        "data": [
            {
                "date": "2015-01-01 00:00:00",
                "value": 2
            },
            {
                "date": "2015-02-01 00:00:00",
                "value": 15
            }
            ...
        ]
    }
    

    Dashboard Shop ActivityPermalink

    class DashboardShopActivityListView(**kwargs)Permalink
    get(*args, **kwargs)Permalink

    Dashboard Shop Activity

    • URL: dashboard/shop-activity?page={page}

    • Parameters
      1. {page}: page number
    • Example
      1. /dashboard/shop-activity/
      2. /dashboard/shop-activity?page=2

    HTTP Method: GET

    Return (JSON):

    {
        "max_page": max page number,
        "current_page": current page number,
        "shop_activities": [
            {
                "id": id (number),
                "id_str": "id" (string),
                "date": "YYYY-MM-DD HH:mm:SS",
                "status": (TODO),
                "order_id": order_id (number),
                "order_id_str": "order_id" (string),
                "order": {
                    "quantity": number,
                    "is_gift": true or false,
                    "total_price": decimal number string,
                    "is_vip": true or false
                }
                "customer": {
                    "img_url": url string,
                    "username": string,
                    "name": string
                },
                "sale_item": {
                    "id": id,
                    "id_str": "id" (string),
                    "num_available": number,
                    "title": string
                }
            },
            ...
        ]
    }
    

    Dashboard Best SellersPermalink

    class DashboardBestSellerListView(**kwargs)Permalink
    get(*args, **kwargs)Permalink

    Dashboard Best Sellers

    • URL
      1. dashboard/best-sellers/{range}/
      2. dashboard/best-sellers/specific/{date_from}/{date_to}/
    • Parameters
      1. {range}: one of “daily”, “weekly”, “monthly”, “24h”, “7d”, “30d”, “12m”.
      2. {date_from}, {date to}: 8 characters string as YYYYMMDD format
    • Example
      1. /dashboard/best-sellers/
      2. /dashboard/best-sellers/weekly/
      3. /dashboard/best-sellers/12m/
      4. /dashboard/best-sellers/specific/20140101/20150301/
    • HTTP Method: GET

    Return (JSON):

    {
        "range": one of "daily", "weekly", "monthly", "24h", "7d", "30d", "12m" or "specific" (string),
        "date_from_str" : start date (date format string, YYYY-MM-DD HH:mm:ss),
        "date_to_str": end date (date format string, YYYY-MM-DD HH:mm:ss),
        "best_sellers": [
            {
                "quantity_ordered": number,
                "total_revenue": decimal number string,
                "sale_item": {
                    "id": id (number),
                    "id_str": "id" (string),
                    "title": string,
                    "price": decimal number string,
                    "img_url": url string
                }
            },
            ...
        ]
    }
    

    Dashboard ReferralsPermalink

    class DashboardReferralListView(**kwargs)Permalink
    get(*args, **kwargs)Permalink

    Dashboard Referrals

    • URL
      1. dashboard/referrals/{range}/
      2. dashboard/referrals/specific/{date_from}/{date_to}/
    • Parameters
      1. {range}: one of “daily”, “weekly”, “monthly”, “24h”, “7d”, “30d”, “12m”.
      2. {date_from}, {date to}: 8 characters string as YYYYMMDD format
    • Example
      1. /dashboard/referrals/
      2. /dashboard/referrals/30d or /dashboard/referrals/12m/
      3. /dashboard/referrals/specific/20140101/20150301/

    HTTP Method: GET

    Return (JSON):

    {
        "max_page": max page number,
        "current_page": current page number,
        "traffic_sources" : [
            {
                "count": number,
                "mobile_count": number,
                "source": string
            },
            ...
        ]
    }
    

    Dashboard Search HistoryPermalink

    class DashboardSearchKeywordView(**kwargs)Permalink
    get(*args, **kwargs)Permalink

    Dashboard Search History

    • URL
      1. dashboard/search-history/{range}/
      2. dashboard/search-history/specific/{date_from}/{date_to}/
    • Parameters
      1. {range}: one of “daily”, “weekly”, “monthly”, “24h”, “7d”, “30d”, “12m”
      2. {date_from}, {date to}: 8 characters string as YYYYMMDD format
    • Example

      1. /dashboard/search-history/2: /dashboard/search-history/30d/3. /dashboard/search-history/12m/4. /dashboard/search-history/specific/20140101/20150301/

    • HTTP Method: GET

    Return (JSON):

    [
        {
            "search_str": string,
            "sum_count": number
        },
        ...
    ]
    

    OrdersPermalink

    class SellerOrderListView(**kwargs)Permalink
    get(*args, **kwargs)Permalink

    Orders

    • URL: orders/

    • Parameters
      1. per_page: orders per page number
      2. page: current page number
      3. filter: one of “all”, “open”, “completed”, “canceled”
      4. search: search string
      5. sort[sort]: one of “id”, “total_price”
      6. sort[ascending]: “true” or “false”
    • Example
      1. /orders?per_page=20&page=1
      2. /orders?page_page=20&page=1&filter=canceled&sort[sort]=totla_price&sort[asceding]=false
    • HTTP Method: GET

    Return (JSON):

    {
        "current_page" : number,
        "max_page" : number,
        "orders": [
            {
                "id" : id (number),
                "id_str" : "id" (string),
                "quantity" : number,
                "note" : order note string,
                "customer" : {
                    "id" : id (number),
                    "id_str" : "id" (string),
                    "username" : username string,
                    "fullname" : fullname string,
                    "html_url" : fancy profile url string,
                },
                "channel" : string,
                "total" : decimal number string,
                "date" : "YYYY-MM-DD HH:mm:SS"
                "net_total" : decimal number string,
                "is_vip" : true or false,
                "status" : number,
                "status_str" : string
            },
            ...
        ]
    }
    

    Order DetailPermalink

    class SellerOrderDetailView(**kwargs)Permalink
    get(*args, **kwargs)Permalink

    Order Detail

    • URL: orders/{order_id}

    • Parameters
      1. order_id: order_id number
    • Example: /orders/1

    • HTTP Method: GET

    • Order ‘status_id’ and ‘status’ value (on Returned JSON):
      • (0, “Order received”)
      • (1, “Payment flagged”)
      • (2, “Payment received”)
      • (3, “Payment refunded”)
      • (4, “Order cancelled by Seller”)
      • (5, “Order cancelled by Customer”)
      • (6, “Processing order”)
      • (7, “Partial Shipment”)
      • (8, “Order shipped”)
      • (9, “Order delivered”)
      • (10, “Order processing”)
      • (11, “VIP order”)
      • (12, “Gift card sent”)
      • (13, “Purchase verification”)
      • (14, “Card verification”)
      • (15, “Partially processed”)
      • (16, “Payment partially refunded”)
      • (17, “Address verification”)
      • (18, “Twitter Buy Now verification”)

    Return (JSON):

    {
        "order" : {
            "address" : {
                "full_name" : string,
                "state" : string,
                "phone" : phone number (string),
                "zip" : zip (string),
                "address1" : string,
                "address2" : string,
                "address_id" : number,
                "alias" : string,
                "city" : string,
                "is_default" : true or false,
                "country_code" : string,
                "country" : string
            },
            "order_date" : "YYYY-MM-DD HH:mm:SS",
            "seller" : {
              "id" : id (number),
              "username" : string,
              "image_url" : url string
            },
            "status" : status string,
            "shipping_trackings" : [
                {
                    "courier" : string,
                    "tracking" : tracking number (string)
                },
                ...
            ],
            "shipping_cost" : decimal number string,
            "gift_message" : string,
            "can_release_to_seller" : true or false,
            "order_id" : id (number),
            "quantity" : number,
            "sub_total" : decimal number string,
            "total_price" : decimal number string,
            "customer" : {
                "id" : id (number),
                "following" : true or false,
                "original_image_url": url string,
                "image_url" : url string,
                "is_private" : true or false,
                "username" : string,
                "email" : email string,
                "type" : string,
                "fullname" : string
            },
                "is_gift" : true or false,
                "note" : string,
                "sale_items" : [
                {
                    "id" : id (number),
                    "quantity" : number,
                    "total_price" : decimal number string,
                    "thing_id" : id (number),
                    "currency_type" : string,
                    "shipping_option" : {
                        "name" : string,
                        "code" : 0
                    },
                    "image_url" : url string,
                    "title" : string,
                    "price" : decimal number string,
                    "selected_option" : {
                        "id" : id (number),
                        "value" : string
                    },
                "tracking_status" : string,
                "images" : [
                    {
                        "thumb_image_url_90_square_height" : number,
                        "thumb_image_url_310_height" : number,
                        "thumb_image_url_90_square" : url string,
                        "thumb_image_url_200" :  url string,
                        "thumb_image_url_200_height" : number,
                        "image_url_height" : number,
                        "image_url" : url string,
                        "thumb_image_url_100_80_height" : number,
                        "image_url_width" : number,
                        "thumb_image_url_100_80" : url string,
                        "thumb_image_url_90_square_width" : number,
                        "thumb_image_url_310" : url string,
                        "thumb_image_url_310_width" : number,
                        "thumb_image_url_100_80_width" : number,
                        "thumb_image_url_200_width" : number
                    },
                    ...
                ],
                "sale_id" : number,
                "is_shipped" : true or false,
                "status" : string
                },
            ],
                "sales_tax" : decial number string,
                "seller_id" : id (number),
                "sameday_message" : string,
                "status_id" : number,
                "currency_type" : string
        }
    }
    
    put(*args, **kwargs)Permalink

    Order Detail Action

    • URL: orders/{order_id}

    • Parameters
      1. order_id: order_id number

      2. action: one of “mark_as_processing”, “fulfill”, “cancel”

      3. service: (when action is “fulfill”) carrier code number,
        • USPS = 0
        • FEDEX = 1
        • UPS = 2
        • DHL = 3
        • EMS = 4
        • Australian Post = 5
        • DPD = 6
        • SameDay Shipping = 98
        • Private Courier = 99
      4. tracking: (when action is “fulfill”) tracking number string,

      5. items: (when action is “fulfill”) string as “id, id, id, ...” format. Ex) “130, 131, 132”

    • Example
      1. /orders/1
        • action=mark_as_processing
        • action=fulfill&service=0&items=130, 131
        • action=cancel
    • HTTP Method: PUT

    Return (JSON):

    Same format as Order Detail

    Product ListPermalink

    class ProductListView(**kwargs)Permalink
    get(*args, **kwargs)Permalink

    Products

    • URL: products/

    • Parameters
      1. per_page: orders per page number
      2. page: current page number
      3. status: one of “all”, “active”, “pending”, “sold_out”, “coming_soon”, “expired”
      4. sort[sort]: “one of “id”, “title”, “price”, “num_sold”, “num_available”
      5. sort[ascending]: “true” or “false”
      6. search[field]: one of “all”, “id”, “title”, “brand”
      7. search[text]: search keyword
    • Example
      1. /products?per_page=20&page=1
      2. /products?per_page=20&page=1&status=active&sort[sort]=id&sort[ascending]=true
    • HTTP Method: GET

    Return (JSON):

    {
        "current_page" : number,
        "max_page" : number,
        "products": [
            {
                "sync_quantity_with_warehouse" : true or false,
                "html_url" : url string,
                "personalizable" : true or false,
                "status" : string,
                "title" : string,
                "weight" : decimal number string,
                "unit_cost" : decimal number string,
                "options" : [
                    {
                        "id" : id (number),
                        "id_str" : "id" (string),
                        "quantity" : number,
                        "product_id" : id (number),
                        "product_id_str" : "id" (string),
                        "seller_sku" : string,
                        "num_sold" : number,
                        "prod_height" : decimal number string,
                        "position" : number,
                        "prod_length" : decimal number string,
                        "color" : null,
                        "price" : decimal number string,
                        "sync_quantity_with_warehouse" : true or false,
                        "unit_cost" : decimal number string,
                        "prod_width" : decimal number string,
                        "images" : [
    
                        ],
                        "retail_price" : decimal number string,
                        "prod_weight" : decimal number string,
                        "name" : string
                    },
                    ...
                ],
                "end_date" : "YYYY-MM-DD HH:mm:SS" (nullable),
                "retail_price" : decimal number string,
                "images" : [
                    {
                        "url_original" : url string,
                        "id" : id (number),
                        "id_str" : "id" (string),
                        "url_310" : url string,
                        "position" : number
                    },
                    ...
                ],
                "keywords" : string (nullable),
                "num_available" : number,
                "num_options" : number,
                "id" : id (number),
                "is_active" : true or false,
                "thing_id_str" : "id" (string),
                "quantity" : number,
                "image_url_original" : url string,
                "seller_id_str" : "id" (string),
                "height" : decimal number string,
                "length" : decimal number string,
                "width" : decimal number string,
                "num_sold" : number,
                "start_date" : "YYYY-MM-DD HH:mm:SS",
                "scarcity_ribbon_threshold" : null,
                "price" : decimal number string,
                "seller_id" : id (number),
                "id_str" : "id" (string),
                "image_url" : url string
            },
            ...
        ]
    }
    
    post(*args, **kwargs)Permalink

    Add New Product

    • URL: products/

    • Parameters
      1. is_active: true or false,

      2. title: string,

      3. price: decimal number string,

      4. num_available: number,

      5. description: string (html available),

      6. options:

        [
            {
                "price" : decimal number string,
                "name" : string,
                "quantity" : number,
                "sync_quantity_with_warehouse" : true or false,
                "retail_price" : decimal number string,
                "prod_height" : decimal number string,
                "prod_width" : decimal number string,
                "prod_length" : decimal number string,
                "prod_weight" : decimal number string
            },
            ...
        ]
        
         
      7. images:

        [
            { "original_rel_path" : url string },
            ...
        ]
        
         
      8. sync_quantity_with_warehouse: true or false,

      9. categories: [],

      10. collection_ids: [],

      11. colors: [],

      12. return_policy: number,

      13. retail_price: decimal number string,

      14. start_date: “MM/dd/YYYY”,

      15. shipping_rate_group_id: -1,

      16. exchange_policy: -3,

      17. expected_delivery_day_1: “”

      18. expected_delivery_day_2: “”,

      19. expected_delivery_day_intl_1: “”,

      20. expected_delivery_day_intl_2: “”

    • Example: /products

    • HTTP Method: POST

    Return (JSON):

    Same as Product Detail

    Product DetailPermalink

    class ProductDetailView(**kwargs)Permalink
    get(*args, **kwargs)Permalink

    Product Detail

    • URL: products/{product_id}

    • Parameters
      1. product_id: id (number)
    • Example: /products/1

    • HTTP Method: GET

    Return (JSON):

    {
          "categories" : [],
          "retail_price" : decimal number string,
          "id" : number,
          "shipping_rate_group_id" : number,
          "charge_domestic_shipping" : true or false,
          "end_date" : "YYYY-MM-DD HH:mm:SS" (nullable),
          "weight" : decimal number string,
          "personalizable" : true or false,
          "expected_delivery_day_intl_1" : null,
          "expected_delivery_day_intl_2" : null,
          "start_date" : "YYYY-MM-DD HH:mm:SS",
          "seller_collections" : [
            {
                "id" : "id" (string),
                "title" : string
            },
            ...
        ],
          "title" : string,
          "exchange_policy" : number,
          "scarcity_ribbon_threshold" : null,
          "status" : string,
          "description" : string (html available),
          "harmonized_commodity_code" : null,
          "use_custom_shipping" : true or false,
          "num_sold" : number,
          "brand" : string,
          "is_active" : true or false,
          "price" : decimal number string,
          "length" : decimal number string,
          "colors" : [
            (string)
        ],
          "num_available" : number,
          "unit_cost" : decimal number string,
          "thing_id_str" : "id" (string),
          "seller_tags" : [
            (string)
        ],
          "soldout_after_expired" : true or false,
          "international_shipping" : true or false,
          "height" : decimal number string,
          "custom_domestic_incremental_fee" : number,
          "seller_sku" : string,
          "custom_exchange_policy_days" : number,
          "tax_code" : string,
          "expected_delivery_day_1" : null,
          "expected_delivery_day_2" : null,
          "custom_international_incremental_fee" : number,
          "options" : [
            {
                Same in Products item's option
            }
        ],
          "show_in_search" : true or false,
          "return_policy" : number,
          "thing_id" : id (number),
          "return_exchange_policy_description" : string,
          "seller_owns_thing" : true or false,
          "collection_ids" : [
    
        ],
          "custom_international_charge" : number,
          "keywords" : null,
          "charge_international_shipping" : true or false,
          "quantity" : number,
          "images" : [
            {
                  "url_original" : url string
                  "id" : id (number),
                  "id_str" : "id" (string),
                  "url_310" : url string,
                  "position" : number
            }
        ],
          "sync_quantity_with_warehouse" : true or false,
          "width" : decimal number string,
          "origin_country" : string,
          "id_str" : "id" (string),
          "custom_domestic_charge" : 0,
          "custom_return_policy_days" : null
    }
    
    patch(*args, **kwargs)Permalink

    Update Product

    • URL: products/{product_id}

    • Parameters
      1. product_id: id (number)

      2. is_active: true or false,

      3. marked_soldout: true or false,

      4. title: string,

      5. price: decimal number string,

      6. num_available: number,

      7. description: string (html available),

      8. options:

        [
            {
                "price" : decimal number string,
                "name" : string,
                "quantity" : number,
                "sync_quantity_with_warehouse" : true or false,
                "retail_price" : decimal number string,
                "prod_height" : decimal number string,
                "prod_width" : decimal number string,
                "prod_length" : decimal number string,
                "prod_weight" : decimal number string,
                "marked_soldout" : true or false
            },
            ...
        ]
        
      9. images:

        [
            { "id_str" : "id" (string), "id" : id (number), "position" : number }, //Existing Image
            { "original_rel_path" : url string }, //New Image
            ...
        ]
        
      10. sync_quantity_with_warehouse: true or false

    • Example: /products/1

    • HTTP Method: PATCH

    Return (JSON):

    Same as Product Detail

    Customer ListPermalink

    class CustomerListView(**kwargs)Permalink
    get(*args, **kwargs)Permalink

    Customers

    • URL: customers/

    • Parameters
      1. per_page: orders per page number
      2. page: current page number
    • Example: /customers?per_page=20&page=1

    • HTTP Method: GET

    Return (JSON):

    {
        "num_pages" : number,
        "page" : number,
        "customers" : [
            {
                "id_str" : "id" (string),
                "is_vip" : true or false,
                "address" : {
                    "phone" : string,
                    "city" : string,
                    "country" : string,
                    "address1" : string,
                    "zip" : string,
                    "full_name" : string,
                    "state" : string,
                    "address2" : string
                },
                "id" : id (number),
                "total_spend" : decimal number string,
                "username" : string,
                "email" : email string,
                "img_url" : url string,
                "full_name" : string
            },
            ...
        ]
    }
    

    Customer InfoPermalink

    class CustomerOrderInfoView(**kwargs)Permalink
    get(*args, **kwargs)Permalink

    Customer Order Info

    • URL: customers/{customer_id}/info/

    • Parameters
      1. {customer_id}: orders per page number
    • Example: /customers/1/info

    • HTTP Method: GET

    Return (JSON):

    {
        "address" : {
            Same as customers
        },
        "is_vip" : true or false,
        "customer_note" : string,
        "id" : id (number),
        "total_spend" : decimal number string,
        "username" : string,
        "first_name" : string,
        "email" : email string,
        "processing_order" : number,
        "img_url" : url string,
        "ip_addr" : string,
        "completed_order" : number
    }
    

    Customer OrdersPermalink

    class CustomerOrdersView(**kwargs)Permalink
    get(*args, **kwargs)Permalink

    Customer Orders

    • URL: customers/{customer_id}/orders/

    • Parameters
      1. {customer_id}: orders per page number
      2. page: page number
    • Example: /customers/1/orders?page=1

    • HTTP Method: GET

    Return (JSON):

    {
        "page": page number,
        "max_page": max page number,
        "orders" : [
            {
                "id_str" : "id" (string),
                "quantity" : number,
                "note" : string,
                "id" : id (number),
                "status" : string,
                "status_id" : number,
                "status_icon" : string,
                "date_created" : "YYYY-MM-DD HH:mm:SS",
                "total_price" : decimal number string,
                "net_amount" : decimal number string
            },
            ...
        ]
    }