真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

【代碼開源】GreaterWMS 抖音SDK調(diào)用教程

應(yīng)用介紹

GreaterWMS 抖音SDK調(diào)用教程

SDK具體功能:

  • 1,一倉(cāng)多店,多倉(cāng)多店
  • 2,庫(kù)存同步,商品同步
  • 3,快遞發(fā)貨,物流軌跡
  • 4,訂單攔截
  • 5,字節(jié)云倉(cāng)
  • 6,精選聯(lián)盟
  • 7,供應(yīng)分銷
  • 8,售后退款,賬單

對(duì)應(yīng)的API鏈接

  • 抖音API文檔
  • 抖音消息推送文檔

創(chuàng)建抖店

  • 去抖音官方創(chuàng)建個(gè)商家應(yīng)用
  • 抖店應(yīng)用會(huì)給到3個(gè)Key,APPID,APP_SECRET,SHOP_ID
  • 在GreaterWMS電商店鋪中,抖音頁(yè)面添加一個(gè)店鋪
  • 填入之前獲得的3個(gè)Key和店鋪名稱
  • GreaterWMS會(huì)給這個(gè)店鋪生成一個(gè)唯一值,用來實(shí)現(xiàn)一倉(cāng)多店的唯一性

沙箱環(huán)境開啟

  • 沙箱環(huán)境為了安全起見,并不能通過前端去修改,以免用戶誤點(diǎn)
  • 向以下路徑post一個(gè)json data
  • http://127.0.0.1:8008/shopid/douyin/sandbox/
{
  "t_code": "{ 你剛才在GreaterWMS會(huì)給這個(gè)店鋪生成一個(gè)唯一值 }",
  "sandbox": "{ 將sandbox調(diào)整成開啟還是關(guān)閉,開始是1,關(guān)閉是0 }"
}
  • 由此來控制店鋪是否正式運(yùn)營(yíng)上線,默認(rèn)是正式環(huán)境

代理IP開啟

  • 代理IP為了安全起見,并不能通過前端去修改,以免用戶誤點(diǎn)
  • 向以下路徑post一個(gè)json data
  • http://127.0.0.1:8008/shopid/douyin/proxy/
{
  "t_code": "{ 你剛才在GreaterWMS會(huì)給這個(gè)店鋪生成一個(gè)唯一值 }",
  "proxy": "{ 將代理調(diào)整成開啟還是關(guān)閉,開始是1,關(guān)閉是0 }",
  "proxy_ip": "{ 代理ip,是一個(gè)json數(shù)據(jù) }"
}
  • 代理設(shè)置,None或者{"https": "http://10.10.1.10:1080"},詳細(xì)格式參見https://docs.python-requests.org/zh_CN/latest/user/advanced.html
  • 由此來控制店鋪是否正式使用代理,默認(rèn)是不使用

安裝

  • 下載插件
  • https://community.56yhz.com/plugMarket/118.html
  • 放到GreaterWMS根目錄下面
    pip install GreaterWMS_DouYin-1.0.0-py3-none-any.whl
  • 版本的更新,安裝的插件名會(huì)不同,請(qǐng)自行調(diào)整版本
  • 注冊(cè)app
INSTALLED_APPS = [
    '...',
    '...',
    'douyin'
]

API調(diào)用例子

# 在views.py
from douyin.views.ding_dan.order_searchList import OrderSearchList

class Test(OrderSearchList):
    def __init__(self):
        self.params = {}
        self.param.product_id = ""
        self.param.out_product_id = ""
        self.param.show_draft = "true"

# urls.py
from django.urls import path
from .views import Test

urlpatterns = [
    path(r'test/', Test.as_view({"post": "create"}), name="test")
]
  • 接下來只要向這個(gè)接口POST一個(gè)之前提到的店鋪唯一值,"t_code" 就可以獲取數(shù)據(jù)
回調(diào)的示例
{
  "data": {
    "account_template_id": "1",
    "after_sale_service": "{\"supply_7day_return\":\"2\"}",
    "appoint_delivery_day": "2",
    "brand_id": "",
    "car_vin_code": "VIN",
    "category_detail": {
      "first_cid": "",
      "first_cname": "教育培訓(xùn)",
      "fourth_cid": "0",
      "fourth_cname": "-",
      "second_cid": "0",
      "second_cname": "學(xué)習(xí)卡",
      "third_cid": "0",
      "third_cname": "-"
    },
    "cdf_category": "1",
    "check_status": "1",
    "create_time": "2021-03-29 15:52:52",
    "delivery_delay_day": "2",
    "delivery_method": "7",
    "description": "",
    "discount_price": "",
    "draft_status": "2",
    "extra": "-",
    "img": "https://xxxx.byted.org/obj/temai/54cbfeff94ac0af5bf5c2960www800-800",
    "is_create": "1",
    "is_sub_product": "true",
    "limit_per_buyer": "5",
    "logistics_info": {
      "brand_country_id": "123",
      "customs_clear_type": "1",
      "net_weight_qty": "100",
      "origin_country_id": "123",
      "source_country_id": "123",
      "tax_payer": "0"
    },
    "market_price": "",
    "maximum_per_order": "5",
    "minimum_per_order": "1",
    "mobile": "",
    "name": "xxx爽膚水",
    "need_recharge_mode": "false",
    "open_user_id": "1",
    "out_product_id": "",
    "outer_product_id": "",
    "pay_type": "1",
    "pic": "[\"https://sf6-ttcdn-tos.pstatp.com/obj/temai/0c71ce6acb4e3b508e0db1aab41www800-800\"]",
    "poi_resource": {
      "coupon_return_methods": "[1]"
    },
    "presell_config_level": "2",
    "presell_delay": "4",
    "presell_type": "1",
    "price_has_tax": "0",
    "product_format": "{\"貨號(hào)\":\"8888\"}",
    "product_format_new": "{\"1088\":[{\"Value\":0,\"Name\":\"小33學(xué)二年級(jí)\",\"PropertyId\":1088,\"PropertyName\":\"適用學(xué)齡段\",\"diy_type\":1}],\"1319\":[{\"Value\":0,\"Name\":\"1\",\"PropertyId\":1319,\"PropertyName\":\"適用地區(qū)\",\"diy_type\":0}],\"1618\":[{\"Value\":0,\"Name\":\"\",\"PropertyId\":1618,\"PropertyName\":\"ISBN編號(hào)\",\"diy_type\":0}],\"1831\":[{\"Value\":0,\"Name\":\"小學(xué)英語看圖說話寫話二年級(jí)\",\"PropertyId\":1831,\"PropertyName\":\"書名\",\"diy_type\":0}],\"2000\":[{\"Value\":,\"Name\":\"無\",\"PropertyId\":2000,\"PropertyName\":\"作者地區(qū)\",\"diy_type\":0}],\"2229\":[{\"Value\":0,\"Name\":\"1\",\"PropertyId\":2229,\"PropertyName\":\"編者\(yùn)",\"diy_type\":0}],\"3271\":[{\"Value\":0,\"Name\":\"1\",\"PropertyId\":3271,\"PropertyName\":\"出版時(shí)間\",\"diy_type\":0}],\"449\":[{\"Value\":0,\"Name\":\"1\",\"PropertyId\":449,\"PropertyName\":\"作者\(yùn)",\"diy_type\":0}],\"501\":[{\"Value\":7310,\"Name\":\"否\",\"PropertyId\":501,\"PropertyName\":\"是否是套裝\",\"diy_type\":0}],\"855\":[{\"Value\":0,\"Name\":\"陜西人民教育出版社\",\"PropertyId\":855,\"PropertyName\":\"出版社名稱\",\"diy_type\":0}]}",
    "product_id": "",
    "product_id_str": "",
    "quality_list": [
      {
        "quality_attachments": [
          {
            "media_type": "1",
            "url": "http://www.byted***.com/YYYY"
          }
        ],
        "quality_key": "3457***",
        "quality_name": "進(jìn)貨憑證"
      }
    ],
    "recommend_remark": "真的很好啊",
    "spec_id": "1",
    "spec_pics": [
      {
        "pic": "temai/bc50b994f4c89de56acaca5d6569awww800-800",
        "spec_detail_id": ""
      }
    ],
    "spec_prices": [
      {
        "code": "aaa",
        "customs_report_info": {
          "bar_code": "-",
          "first_measure_qty": "1",
          "first_measure_unit": "-",
          "g_model": "-",
          "hs_code": "",
          "report_brand_name": "-",
          "report_name": "-",
          "second_measure_qty": "1",
          "second_measure_unit": "-",
          "unit": "-",
          "usage": "-"
        },
        "lock_step_stock_num": "1",
        "lock_stock_num": "1",
        "out_sku_id": "0",
        "outer_sku_id": "0",
        "presell_delay": "5",
        "price": "102",
        "prom_step_stock_num": "0",
        "prom_stock_num": "0",
        "promotion_step_stock_num": "0",
        "promotion_stock_num": "0",
        "sku_id": "",
        "sku_type": "0",
        "spec_detail_id1": "",
        "spec_detail_id2": "",
        "spec_detail_id3": "0",
        "spec_detail_ids": "[, ]",
        "step_stock_num": "0",
        "stock_num": "13",
        "stock_num_map": {},
        "supplier_id": "123",
        "tax_exemption_sku_info": {
          "is_suit": "1",
          "suit_num": "10",
          "volume": "100"
        }
      }
    ],
    "specs": [
      {
        "id": "",
        "is_leaf": "0",
        "name": "顏色",
        "pid": "",
        "spec_id": "",
        "values": [
          {
            "id": "",
            "is_leaf": "1",
            "name": "紅色",
            "pid": "",
            "spec_id": "",
            "status": "1"
          }
        ]
      }
    ],
    "standard_brand_id": "",
    "status": "1",
    "update_time": "2021-03-29T15:52:52+08:00"
  },
  "err_no": 0,
  "message": "success",
  "code": ,
  "msg": "success",
  "sub_code": "",
  "sub_msg": ""
}
  • 一定要POST店鋪唯一值,這樣系統(tǒng)才會(huì)判斷是哪個(gè)店鋪發(fā)起的請(qǐng)求

消息推送

# 在views.py
from douyin.views.notify import NotifyAPI

class Notify(NotifyAPI):
    def __init__(self):
        self.params = {}

# urls.py
from django.urls import path
from .views import Notify

urlpatterns = [
    path(r'notify/', Notify.as_view({"post": "create"}), name="notify")
]
  • 接下來只要向這個(gè)接口POST一個(gè)之前提到的店鋪唯一值,"t_code" 就可以獲取數(shù)據(jù)
  • 一定要POST店鋪唯一值,這樣系統(tǒng)才會(huì)判斷是哪個(gè)店鋪發(fā)起的請(qǐng)求
功能

下載地址
https://community.56yhz.com/plugMarket/118.html


技術(shù)交流群

專注于為中小企業(yè)提供成都做網(wǎng)站、成都網(wǎng)站設(shè)計(jì)服務(wù),電腦端+手機(jī)端+微信端的三站合一,更高效的管理,為中小企業(yè)榮成免費(fèi)做網(wǎng)站提供優(yōu)質(zhì)的服務(wù)。我們立足成都,凝聚了一批互聯(lián)網(wǎng)行業(yè)人才,有力地推動(dòng)了上千家企業(yè)的穩(wěn)健成長(zhǎng),幫助中小企業(yè)通過網(wǎng)站建設(shè)實(shí)現(xiàn)規(guī)模擴(kuò)充和轉(zhuǎn)變。





新聞名稱:【代碼開源】GreaterWMS 抖音SDK調(diào)用教程
文章地址:http://weahome.cn/article/dsoghio.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部