Path: api/v1/jobcreate
This endpoint supports the following methods:
POST
Summary: Creates a new Job
Query Parameters
| Parameter | Optional | Description |
|---|---|---|
| Queue | ✓ | Set to true, 1, or t to queue the request via the Jim2 eBusiness Queue. If specified the response will be 202 Accepted and the B2B request number will be returned. Leave out, or set to false, 0, or f to process the request immediately. |
| SubmitRefId | ✓ | A unique reference ID for the request. This is used to prevent duplicate requests when the Queue parameter is also passed. If a SubmitRefId is passed via this
query parameter and within the request content (see submitRefId in JSON content) then the two values must be the same. A check for duplication due to re-processing
on the B2B queue is NOT performed unless the SubmitRefId is included in the request body (ie not passing the SubmitRefId in the message body allows an item on the
B2B queue to be reprocessed and potentially creating a duplicate object). The Queue parameter must also be specified if SubmitRefId is specified. Note that the SubmitRefId must be unique to Jim2, so if multiple systems are making calls care must be taken to avoid clashes in SubmitRefIds between systems. |
Request content
| Attribute | Type | Required | Description |
|---|---|---|---|
| accountMgr | object | See the accountMgr section below. | |
| asset | object | Fill out the asset object (one or more name/value pairs) to associate the job with an asset. See the asset section below. |
|
| branch | string | The branch code. Branches must be enabled. | |
| calcPricesFromTaxPaid | boolean | Default is according Tools->Options Job, Calc Tax Total From. | |
| comments | array of object | See the comments section below. | |
| currencyCode | string | The currency code the job is to be created in. Current exchange rate from Jim2 will be used. | |
| custom | any | A free-form JSON object carrying additional data for custom processing. Used where custom processing is required and additional data must be passed to that custom processing. | |
| customer | object | ✓ | The customer (bill-to) card file the job is for. See the customer section below. |
| custRefNo | string | The customer's reference for the job. | |
| dateDue | string | The date due for the new Job. Must be in ISO date format - eg "2020-01-31" | |
| faultDesc | string | The fault description. | |
| from | object | See the from section below. | |
| glDept | string | The GL department code. GL departments must be enabled. | |
| invoiceDesc | string | The description shown on the invoice. | |
| itemCode | string | The item code. | |
| itemDesc | string | The item description. | |
| itemSerialNo | string | The item's serial number. | |
| jobType | string | The Job type. If omitted the Job type will be Normal. | |
| ourRef | string | Our reference for the job. | |
| paysTax | boolean | Flag to indicate if the customer is to pay GST. Should normally be left to default (set by customer CardFile) | |
| project | object | Fill out the project object (one or more name/value pairs) to associate the job with an asset. See the project section below. |
|
| projectCode | string | Deprecated. Use project->code. This may be removed from future versions of Jim2. | |
| shipAddress | object | See the shipAddress section below. | |
| shipAttn | string | The ship-to contact (attention) name. | |
| shipEmail | string | The ship-to contact email address. | |
| shipPhone | string | The ship-to contact phone number. | |
| shipTo | object | See the shipTo section below. | |
| shipVia | string | The carrier or method the goods are shipped via. | |
| status | string | The status for the Job. This status must be valid per workflow from Booked, and cannot be FINISH. | |
| stockLines | array of object | See the stockLines section below. | |
| subBranch | string | The sub-branch code. Sub-branches must be enabled. Note that in the UI sub-branches may be renamed. | |
| submitRefID | string | A unique reference for the create request. This reference must be unique for each object and can be used to ensure duplicate objects are not created when re-trying API calls. Note this reference must be unique in Jim2, so if multiple systems are creating objects care must be taken to avoid clashes between the different system's submit ref id. Refer also to the SubmitRefId url query parameter for relevant endpoints. |
Attributes of the accountMgr object.
| Attribute | Type | Required | Description |
|---|---|---|---|
| cardCode | string | cardCode or cardNo are required. If both are supplied that must be consitent with each other (ie match what is stored within Jim2). | |
| cardNo | integer | cardCode or cardNo are required. If both are supplied that must be consitent with each other (ie match what is stored within Jim2). |
Attributes of the asset object.
| Attribute | Type | Required | Description |
|---|---|---|---|
| assetNo | integer | If supplied used to detemine the asset the created job will be linked to. If code and serial provided they must both match the same asset or the transaction will fail. | |
| code | string | If supplied used to detemine the asset the created job will be linked to. If assetNo and serial provided they must both match the same asset or the transaction will fail. | |
| serial | string | If supplied used to detemine the asset the created job will be linked to. If assetNo and code provided they must both match the same asset or the transaction will fail. | |
| useProjectAsset | boolean | If supplied used to detemine the asset the created job will be linked to. If set to true and assetNo, code, or serial provided they must both match the asset linked to the project or the transaction will fail. |
Attributes of each element in the comments array.
| Attribute | Type | Required | Description |
|---|---|---|---|
| comment | string | ✓ | The comment text. |
Attributes of the customer object.
| Attribute | Type | Required | Description |
|---|---|---|---|
| cardCode | string | cardCode or cardNo are required. If both are supplied that must be consitent with each other (ie match what is stored within Jim2). | |
| cardNo | integer | cardCode or cardNo are required. If both are supplied that must be consitent with each other (ie match what is stored within Jim2). |
Attributes of the from object.
| Attribute | Type | Required | Description |
|---|---|---|---|
| cardCode | string | cardCode or cardNo are required. If both are supplied that must be consitent with each other (ie match what is stored within Jim2). | |
| cardNo | integer | cardCode or cardNo are required. If both are supplied that must be consitent with each other (ie match what is stored within Jim2). |
Attributes of the project object.
| Attribute | Type | Required | Description |
|---|---|---|---|
| code | string | If supplied used to detemine the project the created job will be linked to. If projectNo provided they must both match the same project or the transaction will fail. | |
| projectNo | integer | If supplied used to detemine the project the created job will be linked to. If code provided they must both match the same project or the transaction will fail. |
Attributes of the shipAddress object.
| Attribute | Type | Required | Description |
|---|---|---|---|
| addressLine1 | string | Note, it is not required to split street address lines, you can specify multiple address lines in addressLine1. If you have an address that goes over more than two lines then you can: - include all lines in addressLine1 - seperated by new lines - put the first line (eg suite/level) into addressLine1 and the remaining lines into addressLine2 using a new line as seperator |
|
| addressLine2 | string | An optional second line of the ship-to street address (see addressLine1). | |
| country | string | The ship-to country. | |
| customerName | string | customer name as first line. | |
| isAddressResidential | boolean | is this a residential address? | |
| postcode | string | The ship-to post code. | |
| state | string | The ship-to state. | |
| suburb | string | The ship-to suburb. |
Attributes of the shipTo object.
| Attribute | Type | Required | Description |
|---|---|---|---|
| cardCode | string | cardCode or cardNo are required. If both are supplied that must be consitent with each other (ie match what is stored within Jim2). | |
| cardNo | integer | cardCode or cardNo are required. If both are supplied that must be consitent with each other (ie match what is stored within Jim2). |
Attributes of each element in the stockLines array.
| Attribute | Type | Required | Description |
|---|---|---|---|
| location | string | The location from which the stock is to be sold. Normally this field is left out. | |
| qty | number | ✓ | The quantity of the stock to add to the job. |
| serials | array of object | Only applicable to stock that is serial on purchase or serial on sell. An array of serial numbers (and possible attributes if stock is also attributed) related to this stock. See the stockLines.serials section below. |
|
| stockAttrs | array of object | Only applicable to stock that is attribute on purchase or attribute on sell. An array of attributes related to this stock. See the stockLines.stockAttrs section below. |
|
| stockCode | string | ✓ | The Jim2 stock code |
| stockDescription | string | The stock description. Only required if the default stock description needs to be overrridden. It is recommended this be set for special stock. | |
| unitPriceTF | number | The price ex. If no price is required then Jim2's default Job pricing will be used. However, only one of unitPriceTF or unitPriceTP can be provided. It is recommended to specify unitPriceTP if calcPriceFromTaxPaid is true. | |
| unitPriceTP | number | The price inc. If no price is required then Jim2's default Job pricing will be used. However, only one of PriceTF or PriceTP can be provided.It is recommended to specify unitPriceTF if calcPriceFromTaxPaid is false. | |
| unitQty | number | The number of base units contained in each unit of measure (eg 12 for a box of 12). If omitted, 1 is used. |
Attributes of each element in the stockLines.serials array.
| Attribute | Type | Required | Description |
|---|---|---|---|
| serialNo | string | ✓ | A stock serial number. |
| stockAttrs | array of object | Only applicable to stock that is serial and attributed on purchase or serial on sell. See the stockLines.serials.stockAttrs section below. |
Attributes of each element in the stockLines.stockAttrs array.
| Attribute | Type | Required | Description |
|---|---|---|---|
| name | string | ✓ | The attribute name. |
| value | string | ✓ | The attribute value. Note, this is always send as a string, but the attribute type dictates the acceptable string formats. eg integer attributes values must be a whole number date attribute values must be a date is ISO format real attribute values must be a decimal string (with period as the decimal separator)checkbox values must be a boolan value ("true", or "false"). |
Attributes of each element in the stockLines.serials.stockAttrs array.
| Attribute | Type | Required | Description |
|---|---|---|---|
| name | string | ✓ | The attribute name. |
| value | string | ✓ | The attribute value. Note, this is always send as a string, but the attribute type dictates the acceptable string formats. eg integer attributes values must be a whole number date attribute values must be a date is ISO format real attribute values must be a decimal string (with period as the decimal separator)checkbox values must be a boolan value ("true", or "false"). |
Response content
| Attribute | Type | Description |
|---|---|---|
| jobNo | integer | The number of the created job. |
Path: /api/v1/jobcreate Request: Response: This example shows the maximum set of fields the endpoint can return, all populated. A real response only contains the data that applies to that record, so fields that are empty or not relevant are omitted — do not assume every field shown here will be present in every response.
Example POST
{
"submitRefID": "JOB-REQ-0001",
"jobType": "Normal",
"customer": {
"cardCode": "CUST.1"
},
"shipTo": {
"cardCode": "CUST.1"
},
"from": {
"cardCode": "CUST.1"
},
"accountMgr": {
"cardCode": "STAFF.AM"
},
"dateDue": "2026-07-15",
"currencyCode": "AUD",
"status": "Booked",
"branch": "SYD",
"subBranch": "SYD-NORTH",
"glDept": "SERVICE",
"custRefNo": "PO-44821",
"ourRef": "JOB-REF-01",
"shipAttn": "Receiving Dock",
"shipAddress": {
"customerName": "Acme Corporation Pty Ltd",
"isAddressResidential": false,
"addressLine1": "12 Industrial Ave",
"addressLine2": "Building B",
"suburb": "Chatswood",
"state": "NSW",
"postcode": "2067",
"country": "Australia"
},
"shipVia": "Courier Express",
"shipPhone": "02 9999 0000",
"shipEmail": "dispatch@acme.example",
"project": {
"code": "PRJ-001"
},
"asset": {
"code": "ASSET-001"
},
"paysTax": true,
"calcPricesFromTaxPaid": false,
"itemCode": "WIDGET-1",
"itemDesc": "Widget assembly",
"itemSerialNo": "SN-12345",
"faultDesc": "Unit will not power on.",
"invoiceDesc": "Repair and test.",
"comments": [
{
"comment": "Initial booking note."
}
],
"stockLines": [
{
"stockCode": "WIDGET-1",
"stockDescription": "Widget assembly (special)",
"unitQty": 1,
"qty": 2,
"unitPriceTF": 100.00,
"location": "MAIN",
"serials": [
{
"serialNo": "serial1",
"stockAttrs": [
{ "name": "Colour", "value": "R,Red" }
]
}
],
"stockAttrs": [
{ "name": "Size", "value": "8,Eight" }
]
}
],
"custom": {
"externalRef": "EXT-12345"
}
}
{
"jobNo": 22
}