Show / Hide Table of Contents

    Part queries

    In this example we will go over a few different variations of querying the API for parts.

    See the reference documentation for more information about the commands used in this example:

    • Parts

    All parts

    GET /sv/004.1/api/v1/Inventory/Parts HTTP/1.1
    Host: localhost:8001
    Content-Type: application/json
    Cache-Control: no-cache
    Accept: application/json
    X-Monitor-SessionId: {sessionId}
    

    Retrieves all parts.

    By business key identifier

    GET /sv/004.1/api/v1/Inventory/Parts/412391 HTTP/1.1
    Host: localhost:8001
    Content-Type: application/json
    Cache-Control: no-cache
    Accept: application/json
    X-Monitor-SessionId: {sessionId}
    

    Retrieves the part that has the business key identifier of 412391.

    Filtered paginated query

    GET /sv/004.1/api/v1/Inventory/Parts?$filter=StandardPrice%20gt%20200&$skip=20&$top=10 HTTP/1.1
    Host: localhost:8001
    Content-Type: application/json
    Cache-Control: no-cache
    Accept: application/json
    X-Monitor-SessionId: {sessionId}
    

    The unencoded query string looks as follows:

    $filter=StandardPrice gt 200&$skip=20&$top=10
    

    Filters out all parts that have a standard price that is lesser than or equal to 200, skips 20 results and retrieves the next 10 results.

    Back to top Copyright © 2023 Monitor ERP System AB