Kits

A kit contains one or materials, or other kits (multiple levels), with a quantity of each.

Attributes

  • name string

    The name of the kit.

  • id uuid

    Unique identifier for the object.

  • hasStock integer

    If there is enough stock to fulfill the kit. 0=False, 1=True.

  • target string

Endpoints

List Kits /api/kits
get

Get a list of all kits, at all levels (including kits within kits). View the guide on adding filters to List API calls.

Body Parameters

  • hasStock integer

    If there is enough stock to fulfill the kit. 0=False, 1=True.

  • name string

    Only return items that have the given name.

  • target string

  • countOnly boolean

    When "true", will only return a count of the amount of items in the query.

    Default value:

    false

  • limit integer

    A limit on the number of objects to be returned. Limit can range between 1 and 1000.

    Default value:

    250

  • page integer

    Page-numbering is based on the value of the "limit" argument. If limit=20, then page=0 will display the hits from 1 to 20. (Page numbers are zero-based.) Using page without a limit returns all items.

  • orderBy string, array

    Order the response by the selected field. Multiple values can be passed, separated by a comma.

Request with curl
curl "http://[subdomain.itempath.com or IP]/api/kits" \ -X get \ -H "Content-Type: application/json" \ -H "Authorization: Bearer [Your JWT Access Token]" -d '{ }'
Example Response
{
    "kits": [
        {
            "hasStock": 1,
            "id": "E616AF5B-47BF-47A9-B61D-1CB8B70B6DA9",
            "lines": [],
            "name": "Test Kit",
            "target": "Target"
        },
        {
            "hasStock": 1,
            "id": "5B5F9DFA-2A2E-4017-823A-EB706E296573",
            "lines": [
                {
                    "hasStock": 1,
                    "id": "37E70F65-C2C5-4B34-A7B6-3F051E96F9D1",
                    "materialId": "56C557D7-E526-4B42-A024-BA35D08AB46D",
                    "number": 1,
                    "quantity": 1.0
                },
                {
                    "hasStock": 1,
                    "id": "CD905727-5936-4CF5-B29C-737323405F50",
                    "materialId": "F4CBF898-E628-466F-A6CF-A700211A3EBE",
                    "number": 2,
                    "quantity": 1.0
                }
            ],
            "name": "K-101",
            "target": null
        }
    ]
}
Create Kit http://api/kits
post

Create a kit of materials or other kits. An array of at least one kit line is required. For fields on the kit lines level, click here.

Body Parameters

  • name string
    REQUIRED

    The unique kit name/number.

  • target string

Request with curl
curl "http://[subdomain.itempath.com or IP]http://api/kits" \ -X post \ -H "Content-Type: application/json" \ -H "Authorization: Bearer [Your JWT Access Token]" \ -d '{ "name": "string", }'
Example Response
{ "kit": { "name": " string ", "id": " uuid ", "hasStock": " integer ", "target": " string ", } }
Show Kit /api/kits/[id]
get

Get a single kit from the PPG database and return a JSON response with the kit lines.

Body Parameters

Request with curl
curl "http://[subdomain.itempath.com or IP]/api/kits/[id]" \ -X get \ -H "Content-Type: application/json" \ -H "Authorization: Bearer [Your JWT Access Token]"
Example Response
{ "kit": { "name": " string " , "id": uuid , "hasStock": integer , "target": " string " , } }
Update Kit http://api/kits
put

Update a kit by calling its ID and get a response. Each key/value is optional. Only keys sent will be updated.

Body Parameters

  • name string
    REQUIRED

    The unique kit name/number.

  • target string

Request with curl
curl "http://[subdomain.itempath.com or IP]http://api/kits" \ -X put \ -H "Content-Type: application/json" \ -H "Authorization: Bearer [Your JWT Access Token]"
Example Response
{ "kit": { "name": " string ", "id": " uuid ", "hasStock": " integer ", "target": " string ", } }
Delete Kit /api/kits/[id]/delete
delete

Delete a kit by calling its ID.

Body Parameters

Request with curl
curl "http://[subdomain.itempath.com or IP]/api/kits/[id]/delete" \ -X delete \ -H "Content-Type: application/json" \ -H "Authorization: Bearer [Your JWT Access Token]"
Example Response
{ "deleted": "true" }