Giter Site home page Giter Site logo

Comments (1)

neekfenwick avatar neekfenwick commented on July 20, 2024

When you say the API returns 'nothing' do you mean you get an empty array response like [], or a completely blank response body? It would help greatly if you showed the exact way you're calling the functions, with what arguments, and exactly what you get back.

I have found the API to have some really weird calling patterns, if you get the syntax slightly wrong it can just return zero results, then you fix one of the query parameters slightly, for example specify an ordering for the results, and it can start working. It's been a year or more since I worked against the API in much detail but here's some PHP code I wrote to call the API through my helper (which basically just uses GuzzleHttp, a standard HTTP request library, to send the request) as documented at https://apps.linnworks.net/Api/Method/Inventory-GetStockItemIdsBySKU:

$lw_api->genericAPICall('POST', 'api/Inventory/GetStockItemIdsBySKU',
        [ 'request' => '{
          "SKUS": [
            "' . $sku . '"
          ]
        }' ]);

I couldn't quite believe that's actually what the body has to look like, but there it is :) It's one of the weirder APIs I've worked with.

from linnworksnetsdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.