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
Header Parameters
The customer identifier
Request Body
- 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
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
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
Possible values: [noMovement
, broughtAndLeft
, broughtAndTakenBack
, onSiteAndTakenBack
, onSiteAndLeft
, usedInStock
]
Represents the actions that can be performed on a job stock
Possible values:
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
The identifier for the contact at the pickup location during the planned stock usage
The identifier for contact at the drop-off location during the planned stock usage
A flag indicating whether the stock is delivered to be sold
A flag indicating whether the stock equipment is at the drop-off location
- 201
- 400
- 403
- 404
- 422
- 500
Created
Schema
Identifier of the newly created record
{
"id": 0
}
Bad Request
Schema
A URI reference [RFC3986] that identifies the problem type
A short, human-readable summary of the problem type
The HTTP status code([RFC7231], Section 6) generated by the origin server for this occurrence of the problem
A human-readable explanation specific to this occurrence of the problem
A URI reference that identifies the specific occurrence of the problem
{
"type": "https://example.com/probs/out-of-credit",
"title": "You do not have enough credit",
"status": 403,
"detail": "Your current balance is 30, but that costs 50",
"instance": "/account/12345/msgs/abc"
}
Forbidden
Schema
A URI reference [RFC3986] that identifies the problem type
A short, human-readable summary of the problem type
The HTTP status code([RFC7231], Section 6) generated by the origin server for this occurrence of the problem
A human-readable explanation specific to this occurrence of the problem
A URI reference that identifies the specific occurrence of the problem
{
"type": "https://example.com/probs/out-of-credit",
"title": "You do not have enough credit",
"status": 403,
"detail": "Your current balance is 30, but that costs 50",
"instance": "/account/12345/msgs/abc"
}
Not Found
Schema
A URI reference [RFC3986] that identifies the problem type
A short, human-readable summary of the problem type
The HTTP status code([RFC7231], Section 6) generated by the origin server for this occurrence of the problem
A human-readable explanation specific to this occurrence of the problem
A URI reference that identifies the specific occurrence of the problem
{
"type": "https://example.com/probs/out-of-credit",
"title": "You do not have enough credit",
"status": 403,
"detail": "Your current balance is 30, but that costs 50",
"instance": "/account/12345/msgs/abc"
}
Client Error
Schema
- Array [
- ]
errors object
property name* string[]
string
A URI reference [RFC3986] that identifies the problem type
A short, human-readable summary of the problem type
The HTTP status code([RFC7231], Section 6) generated by the origin server for this occurrence of the problem
A human-readable explanation specific to this occurrence of the problem
A URI reference that identifies the specific occurrence of the problem
{
"errors": {},
"type": "https://example.com/probs/out-of-credit",
"title": "You do not have enough credit",
"status": 403,
"detail": "Your current balance is 30, but that costs 50",
"instance": "/account/12345/msgs/abc"
}
Server Error
Schema
A URI reference [RFC3986] that identifies the problem type
A short, human-readable summary of the problem type
The HTTP status code([RFC7231], Section 6) generated by the origin server for this occurrence of the problem
A human-readable explanation specific to this occurrence of the problem
A URI reference that identifies the specific occurrence of the problem
{
"type": "https://example.com/probs/out-of-credit",
"title": "You do not have enough credit",
"status": 403,
"detail": "Your current balance is 30, but that costs 50",
"instance": "/account/12345/msgs/abc"
}