Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter odzhuryk

    (@odzhuryk)

    Hi, @dougaitken ,
    yeah, I know that is not the latest version, I don’t think that is a problem with the version, because it sends an array not all the time. So I mean sometimes it works as expected and sometimes doesn’t. Unfortunately, I don’t have the request, could you please explain about formatting? Can you please give me any examples of requests to POST /orders that can lead to an array of orders as a response?

    • This reply was modified 5 years, 11 months ago by odzhuryk.
    • This reply was modified 5 years, 11 months ago by odzhuryk.
    Thread Starter odzhuryk

    (@odzhuryk)

    @3sonsdevelopment , here’s the better-formated response also please check my message above.

    [
      {
        "id": 921,
        "date_created": "2020-06-10T22:57:46",
        "date_created_gmt": "2020-06-10T20:57:46",
        "note": "Lagernivåerna minskade: Saltvattentvål | Sjö&Hav Utomhus Tvål (SH1003) 936→935, Saltvattenschampo | Sjö&Hav Utomhus Schampo (SH1004) 9929→9928",
        "customer_note": false,
        "_links": {
          "self": [
            {
              "href": "https://sjohav.se/wp-json/wc/v2/orders/15108/notes/921"
            }
          ],
          "collection": [
            {
              "href": "https://sjohav.se/wp-json/wc/v2/orders/15108/notes"
            }
          ],
          "up": [
            {
              "href": "https://sjohav.se/wp-json/wc/v2/orders/15108"
            }
          ]
        }
      },
      {
        "id": 922,
        "date_created": "2020-06-10T22:57:46",
        "date_created_gmt": "2020-06-10T20:57:46",
        "note": "Order skapad – Beställningsstatus ändrad från Inväntar betalning till Behandlas.",
        "customer_note": false,
        "_links": {
          "self": [
            {
              "href": "https://sjohav.se/wp-json/wc/v2/orders/15108/notes/922"
            }
          ],
          "collection": [
            {
              "href": "https://sjohav.se/wp-json/wc/v2/orders/15108/notes"
            }
          ],
          "up": [
            {
              "href": "https://sjohav.se/wp-json/wc/v2/orders/15108"
            }
          ]
        }
      }
    ]
    Thread Starter odzhuryk

    (@odzhuryk)

    Yeah, there was a trying to send a note with specific text. But I got in response something like
    [
    {
    “id”:921,
    “date_created”:”2020-06-10T22:57:46″,
    “date_created_gmt”:”2020-06-10T20:57:46″,
    “note”:”Lagerniv\u00e5erna minskade: Saltvattentv\u00e5l | Sj\u00f6&Hav Utomhus Tv\u00e5l (SH1003) 936→935, Saltvattenschampo | Sj\u00f6&Hav Utomhus Schampo (SH1004) 9929→9928″,
    “customer_note”:false,
    “_links”:{
    “self”:[
    {
    “href”:”https:\/\/sjohav.se\/wp-json\/wc\/v2\/orders\/15108\/notes\/921″
    }
    ],
    “collection”:[
    {
    “href”:”https:\/\/sjohav.se\/wp-json\/wc\/v2\/orders\/15108\/notes”
    }
    ],
    “up”:[
    {
    “href”:”https:\/\/sjohav.se\/wp-json\/wc\/v2\/orders\/15108″
    }
    ]
    }
    },
    {
    “id”:922,
    “date_created”:”2020-06-10T22:57:46″,
    “date_created_gmt”:”2020-06-10T20:57:46″,
    “note”:”Order skapad – Best\u00e4llningsstatus \u00e4ndrad fr\u00e5n Inv\u00e4ntar betalning till Behandlas.”,
    “customer_note”:false,
    “_links”:{
    “self”:[
    {
    “href”:”https:\/\/sjohav.se\/wp-json\/wc\/v2\/orders\/15108\/notes\/922″
    }
    ],
    “collection”:[
    {
    “href”:”https:\/\/sjohav.se\/wp-json\/wc\/v2\/orders\/15108\/notes”
    }
    ],
    “up”:[
    {
    “href”:”https:\/\/sjohav.se\/wp-json\/wc\/v2\/orders\/15108″
    }
    ]
    }
    }
    ]

    And the weirdest it tried to send the note today(11.06) but in response, I got creation_date yesterday(10.06), so I can assume that it couldn’t create the note and returned something wrong. This behavior has been presenting since the 2.06 at least

Viewing 3 replies - 1 through 3 (of 3 total)