Kit Lines

A kit line contains one type of material or another kit within a kit.

Attributes

  • id uuid

    Unique identifier for the kit line.

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

  • materialName string

    The name of the material or nested kit.

  • quantity float

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

  • hasStock integer

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

Endpoints

List Kit Lines

get /api/kit_lines

Arguments

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

  • materialName string

    The name of the material or nested kit.

  • quantity float

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

  • hasStock integer

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

  • limit integer

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

  • offset integer

    Will return items, but only those after the integer amount.

  • countOnly boolean

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

Request with curl
curl "http://[Your IP] /api/kit_lines" \ -X get \ -H "Content-Type: application/json" \ -H "Authorization: Bearer [Your JWT Access Token]"
Example Response
{ "kit lines": [{ "id": " uuid ", "number": " integer ", "materialId": " uuid ", "materialName": " string ", "quantity": " float ", "hasStock": " integer ", }] }] }

Create Kit Line

post /api/kit_lines

Create a kit line, to be imported by PowerPick. 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://[Your 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": " uuid ", "number": " integer ", "materialId": " uuid ", "materialName": " string ", "quantity": " float ", "hasStock": " integer ", } }

Show Kit Line

get http://api/kit_lines/[id]

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

Arguments

Request with curl
curl "http://[Your 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": uuid , "number": integer , "materialId": uuid , "materialName": " string " , "quantity": float , "hasStock": integer , } }

Update Kit Line

put /api/kit_lines/[id]

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

Arguments

  • 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://[Your IP] /api/kit_lines/[id]" \ -X put \ -H "Content-Type: application/json" \ -H "Authorization: Bearer [Your JWT Access Token]"
Example Response
{ "kit line": { "id": " uuid ", "number": " integer ", "materialId": " uuid ", "materialName": " string ", "quantity": " float ", "hasStock": " integer ", } }

Delete Kit Line

get http://api/kit_lines/[id]/delete

Delete a kit line by calling its ID.

Arguments

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