Skip to main content

Create a job stock

Create a new job stock. Job stock cannot be created for a job with cancelled status (required scope jobs:write)

Path Parameters
    jobId int64 required
Header Parameters
    Customer-Id int64 required

    The customer identifier

Request Body
    stockDetailsId int64

    The identifier of the type of stock associated with the planned stock usage on the job. Only one job stock can be created per stock detail if stock item id is null

    stockItemId int64 nullable

    The identifier of the specific stock item associated with the planned stock usage on the job. Must be null when stock detail is consumable. Only one job stock can be created per stock item

    action JobStockActionWrite

    Possible values: [noMovement, broughtAndLeft, broughtAndTakenBack, onSiteAndTakenBack, onSiteAndLeft, usedInStock]

    Represents the actions that can be performed on a job stock

    Possible values:

    • noMovement: No movement. Can not use when job is completed or cancelled
    • broughtAndLeft: Brought to job and left at location. Can not use when job is completed or cancelled. When this action is selected, the drop off contact id will be set to the job contact id automatically
    • broughtAndTakenBack: Brought to job and taken back. Can not use when job is completed or cancelled
    • onSiteAndTakenBack: Taken from job location. Can not use when job is completed or cancelled. When this action is selected, the pickup contact id will be set to the job contact id automatically
    • onSiteAndLeft: Already on site and left at location. Can not use when job is cancelled
    • usedInStock: Used on equipment. Can not use when job is completed or cancelled

    quantityPlanned double nullable

    The anticipated quantity of stock units that will be used on a job. Must be null or 1 when stock detail is not consumable. Can't be null when stock detail is consumable

    pickupContactId int64 nullable

    The identifier for the contact at the pickup location during the planned stock usage

    dropOffContactId int64 nullable

    The identifier for contact at the drop-off location during the planned stock usage

    isDeliveredToBeSold boolean

    A flag indicating whether the stock is delivered to be sold

    isEquipmentAtDropOff boolean

    A flag indicating whether the stock equipment is at the drop-off location

Responses

Created


Schema
    id int64

    Identifier of the newly created record

Loading...