1. Resource Central
  2. arrow-right
  3. Kit Lines

Kit Lines

A kit line contains one type of material or another kit within a kit, similar to an order line's relationship to an order.

Attributes

  • id uuid

    Unique identifier for the kit line.

  • hasStock integer

    If there is enough stock to fulfill the kit line.

    Possible values:

    0 = False
    1 = True

  • kitId uuid

    Unique identifier of the kit that the kit line belongs to (similar to an order line's relationship to an order).

  • materialId uuid

    The ID of the material or kit on the kit line.

  • number integer

    Unique line sequence number of the kit line. If none is provided, the system automatically generates this.

  • quantity float

    If a material, the quantity of materials.
    If a kit, the multiplier for the entire contents of the included kit.

Endpoints

List Kit Lines /api/kit_lines
get

Get a list of kit lines of a kit (similar to getting order lines of an order) from the PPG database.View the guide on adding filters to List API calls.

Body Parameters

  • hasStock integer

    If there is enough stock to fulfill the kit line.

    Possible values:

    0 = False
    1 = True

  • kitId uuid

    Unique identifier of the kit that the kit line belongs to (similar to an order line's relationship to an order).

  • materialId uuid

    The ID of the material or kit on the kit line.

  • number integer

    Unique line sequence number of the kit line. If none is provided, the system automatically generates this.

  • quantity float

    If a material, the quantity of materials.
    If a kit, the multiplier for the entire contents of the included kit.

  • 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.

    Default value:

    1000

  • page integer

    Page numbering is zero-based and uses the value of the "limit" argument. (For example, if limit=20, then page=0 will display the hits from 1 to 20.)

  • 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/kit_lines" \ -X get \ -H "Content-Type: application/json" \ -H "Authorization: Bearer [Your JWT Access Token]" -d '{ }'
Example Response
{
    "kit_lines": [
        {
            "hasStock": 1,
            "id": "37E70F65-C2C5-4B34-A7B6-3F051E96F9D1",
            "kitId": "5B5F9DFA-2A2E-4017-823A-EB706E296573",
            "materialId": "56C557D7-E526-4B42-A024-BA35D08AB46D",
            "number": 1,
            "quantity": 1.0
        },
        {
            "hasStock": 1,
            "id": "CD905727-5936-4CF5-B29C-737323405F50",
            "kitId": "5B5F9DFA-2A2E-4017-823A-EB706E296573",
            "materialId": "F4CBF898-E628-466F-A6CF-A700211A3EBE",
            "number": 2,
            "quantity": 1.0
        }
    ]
}
Create Kit Line /api/kit_lines
post

Create a kit line, to be imported by Power Pick. Requires passing the ID of the kit the new line is being added to.

Body Parameters

  • kitId uuid
    REQUIRED

    The ID of the kit this kit line belongs to.

  • number integer

    Unique line sequence number of the kit line. If none is provided, the system automatically generates this.

  • materialId uuid
    REQUIRED

    The ID of the material or kit on the kit line.

  • quantity float

    If a material, the quantity of materials.
    If a kit, the multiplier for the entire contents of the included kit.

  • target string

Request with curl
curl "http://[subdomain.itempath.com or IP]/api/kit_lines" \ -X post \ -H "Content-Type: application/json" \ -H "Authorization: Bearer [Your JWT Access Token]" \ -d '{ "kitId": "uuid", "materialId": "uuid", }'
Example Response
{ "kit_line": { "id": " 37E70F65-C2C5-4B34-A7B6-3F051E96F9D1 ", "hasStock": " 1 ", "kitId": " 5B5F9DFA-2A2E-4017-823A-EB706E296573 ", "materialId": " 56C557D7-E526-4B42-A024-BA35D08AB46D ", "number": " 1 ", "quantity": " 2.0 ", } }
Show Kit Line http://api/kit_lines/[id]
get

Get a specific kit line by its ID from the PPG database and return a JSON response.

Body Parameters

Request with curl
curl "http://[subdomain.itempath.com or IP]http://api/kit_lines/[id]" \ -X get \ -H "Content-Type: application/json" \ -H "Authorization: Bearer [Your JWT Access Token]"
Example Response
{ "kit_line": { "id": 37E70F65-C2C5-4B34-A7B6-3F051E96F9D1 , "hasStock": 1 , "kitId": 5B5F9DFA-2A2E-4017-823A-EB706E296573 , "materialId": 56C557D7-E526-4B42-A024-BA35D08AB46D , "number": 1 , "quantity": 2.0 , } }
Update Kit Line /api/kit_lines/[id]
put

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

Body Parameters

  • kitId uuid

    The ID of the kit this kit line belongs to.

  • number integer

    Unique line sequence number of the kit line. If none is provided, the system automatically generates this.

  • materialId uuid

    The ID of the material or kit on the kit line.

  • quantity float

    If a material, the quantity of materials.
    If a kit, the multiplier for the entire contents of the included kit.

  • target string

Request with curl
curl "http://[subdomain.itempath.com or IP]/api/kit_lines/[id]" \ -X put \ -H "Content-Type: application/json" \ -H "Authorization: Bearer [Your JWT Access Token]"
Example Response
{ "kit_line": { "id": " 37E70F65-C2C5-4B34-A7B6-3F051E96F9D1 ", "hasStock": " 1 ", "kitId": " 5B5F9DFA-2A2E-4017-823A-EB706E296573 ", "materialId": " 56C557D7-E526-4B42-A024-BA35D08AB46D ", "number": " 1 ", "quantity": " 2.0 ", } }
Delete Kit Line http://api/kit_lines/[id]/delete
delete

Delete a kit line by calling its ID.

Body Parameters

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