0
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);
});

The following results are obtains;

"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>

I can't get order food & coffee items and modifiers, only amount money.

Renzo
  • 26,848
  • 5
  • 49
  • 61
jwsoftwaregroup
  • 129
  • 1
  • 16

1 Answers1

0

To get the itemization information use the v1 endpoints. https://docs.connect.squareup.com/api/connect/v1/#navsection-transactions

tristansokol
  • 4,054
  • 2
  • 17
  • 32