【问题标题】:I can't get the order list from square up platform server我无法从 square up 平台服务器获取订单列表
【发布时间】:2017-07-09 21:54:01
【问题描述】:
var request = require("request");

var options = { method: 'GET',
  url: 'https://connect.squareup.com/v2/locations/{location_id}/transactions',
  headers: 
   { 'postman-token': 'token',
     'cache-control': 'no-cache',
     authorization: 'Bearer square_token' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

得到以下结果;

"transactions": [<br>
        {
            "id": "wDWQ6dH7q4IneSDTpEx3zI2eV",<br>
            "location_id": "3XT6YVHAYDPFS",<br>
            "created_at": "2017-07-06T13:40:15Z<br>",
            "tenders": [<br>
                {<br>
                    "id": "IZPusLhhGnacnOHFysNpKQB",<br>
                    "location_id": "3XT6YVHAYDPFS",<br>
                    "transaction_id": "wDWQ6dH7q4IneSDTpEx3zI2eV",<br>
                    "created_at": "2017-07-06T13:40:13Z",<br>
                    "amount_money": {<br>
                        "amount": 730,<br>
                        "currency": "USD"<br>
                    },<br>
                    "processing_fee_money": {<br>
                        "amount": 0,<br>
                        "currency": "USD"<br>
                    },<br>
                    "type": "CASH",<br>
                    "cash_details": {<br>
                        "buyer_tendered_money": {<br>
                            "amount": 730,<br>
                            "currency": "USD"<br>
                        },<br>
                        "change_back_money": {<br>
                            "amount": 0,<br>
                            "currency": "USD"<br>
                        }<br>
                    }<br>
                }<br>
            ],<br>
            "product": "REGISTER",<br>
            "client_id": "60FA84DB-865C-4DC2-B824-56A4F87B7264"<br>
        },<br>

我无法订购食品和咖啡物品以及修饰符,只能订购金额。

【问题讨论】:

    标签: rest express point-of-sale square-connect


    【解决方案1】:

    要获取分项信息,请使用 v1 端点。 https://docs.connect.squareup.com/api/connect/v1/#navsection-transactions

    【讨论】:

      猜你喜欢
      • 2021-05-20
      • 2021-09-08
      • 2016-01-30
      • 1970-01-01
      • 2022-07-24
      • 1970-01-01
      • 2018-03-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多