Index

api/v1/jobs

Path: api/v1/jobs

This API is JSON:API compliant.

This endpoint supports the following methods:
GET POST PATCH

The resource type for this endpoint is Job
The identifier is jobno
Supported inclusions are comments,contract,customer,from,ship,stock,labour

The Job resource type attributes are as follows:

{
"Status":string
"CustRef":string
"OurRef":string
"Priority":string
"FaultDesc":string
"InvoiceDesc":string
"ItemDesc":string
"SubBranchCode":string
"BranchCode":string
"dateIn":string (DateTime in ISO format) (read-only)
optional
"DateDue":string (DateTime in ISO format)
optional
"StatusDue":string (DateTime in ISO format)
"Type":string
"priceLevel":string (read-only)
"taxPaid":boolean (read-only)
"serial":string (read-only)
"currencyCode":string (read-only)
"source":string (read-only)
"sourceValue":string (read-only)
"companyCode":string (read-only)
"exchangeRate":number (read-only)
"rateLocked":boolean (read-only)
optional
"prevJobNo":integer (read-only)
optional
"quoteNo":integer (read-only)
optional
"invoiceGroupNo":integer (read-only)
"GLDeptCode":string
"TaxInc":boolean
"manufacturing":{
optional
"qty":number (read-only)
optional
"cost":number (read-only)
optional
"configNo":integer (read-only)
"locationCode":string (read-only)
"stockCode":string (read-only)
}
"jobDetails":{
"customer":{
"attn":string (read-only)
"name":string (read-only)
optional
"isAddressResidential":boolean (read-only)
"streetAddress":string (read-only)
"suburb":string (read-only)
"state":string (read-only)
"postCode":string (read-only)
"country":string (read-only)
"orderNo":string (read-only)
}
"ship":{
"attn":string (read-only)
"name":string (read-only)
optional
"isAddressResidential":boolean (read-only)
"streetAddress":string (read-only)
"suburb":string (read-only)
"state":string (read-only)
"postCode":string (read-only)
"country":string (read-only)
}
"freight":{
"amount":number (read-only)
"tax":number (read-only)
"taxCode":string (read-only)
"dispatch":{
}
}
}
}

Example GET (Return all)

Path: api/v1/jobs?filter[Sale]=True&filter[Reserved][-eq]Y&filter[Current]=T&filter[Finish]=T

Supported Filters:

AccMngNoLookupAssetNoLookupBranchLookupCardGroupGroup
CompanyLookupContractTextCurrencyNoLookupCurrentBoolCustJobNoText
CustNoLookupCustTypeLookupDateDueDateRangeDateInDateRangeDateOutDateRange
DuedateOverdueBoolDueWithinTextDueWithinMeasureTexteInvNoIntFinishBool
FromNoLookupGLDeptLookupHasUnreadEmailBoolInvedBoolItemGroupGroup
ItemNoLookupJobNoIntJobStatusTextLastModifiedDateRangeMakeLookup
ManfBoolModeTextModelLookupNameLookupOrderNoInt
OurRefTextPartStatusTextPriorityTextProjectGroupGroupProjectMasterLookup
ProjectNoLookupProjectTypeLookupQuoteBoolQuoteNoIntReadyBool
ReservedBoolSaleBoolSerialNoTextServBoolShipGroupGroup
ShipNoLookupSourceLookupSourceValueTextStatusOverdueBoolStockGroupGroup
StockNoLookupStockSerialNoTextSubBranchLookupTaxPaidBoolTypeText

Operators:

=Equals
[-gte]GreaterThanOrEqual
[-lte]LessThanOrEqual
[-ne]NotEqual
[-lt]LessThan
[-gt]GreaterThan
[-eq]Equal
[-like]Like

Response:

{
  "data": {
    "id": "10",
    "type": "Job",
    "attributes": {
      "Status": "FINISH",
      "Type": "Normal",
      "CustRef": "ASDF",
      "GLDeptCode": null,
      "TaxInc": true
    },
    "relationships": {
      "customer": {
        "data": {
          "type": "CardFile",
          "id": "3"
        }
      },
      "from": {
        "data": {
          "type": "CardFile",
          "id": "3"
        }
      },
      "ship": {
        "data": {
          "type": "CardFile",
          "id": "3"
        }
      },
      "contract":{
        "data":{
          "type":"Contract",
          "id":"4"
        }
      },	
      "asset":{
        "data":{
          "type":"Asset",
          "id":"1"
        }
      },
      "comments": {
        "data": [
          {
            "type": "JobComment",
            "id": "10-2"
          },
          {
            "type": "JobComment",
            "id": "10-1"
          }
        ]
      },
      "stock": {
        "data": [
          {
            "type": "JobStock",
            "id": "10-1"
          },
          {
            "type": "JobStock",
            "id": "10-2"
          }
        ]
      }
    },
    "links": {
      "self": "/test/api/v1/jobs/10"
    }
  },
  "included": [
    {
      "type": "JobStock",
      "id": "10-1",
      "attributes": {
        "serials": [
          {
            "serialNo": "serial1"
          },
          {
            "serialNo": "serial2"
          },
          {
            "serialNo": "serial3"
          }
        ],
        "stockId": 53,
        "stockCode": "SERIAL.ONSELL",
        "unit": "UNIT",
        "qty": "3.0000",
        "description": "Serial on sell stock",
        "modifyinit": "SYS",
        "modifydate": "2021-03-10T11:33:53"
      }
    },
    {
      "type": "JobStock",
      "id": "10-2",
      "attributes": {
        "stockAttrs": [
          {
            "name": "Colour",
            "value": "R,Red"
          },
          {
            "name": "Size",
            "value": "8,Eight"
          }
        ],
        "stockId": 54,
        "stockCode": "ATTRIBUTES.ONSELL",
        "unit": "UNIT",
        "qty": "3.0000",
        "description": "Attributes on sell stock",
        "modifyinit": "SYS",
        "modifydate": "2021-03-10T11:33:53"
      }
    },
    {
      "type": "JobStock",
      "id": "10-3",
      "attributes": {
        "serials": [
          {
            "serialNo": "serial1",
            "stockAttrs": [
              {
                "name": "Colour",
                "value": "R,Red"
              },
              {
                "name": "Size",
                "value": "8,Eight"
              }
            ]
          },
          {
            "serialNo": "serial2",
            "stockAttrs": [
              {
                "name": "Colour",
                "value": "G,Green"
              },
              {
                "name": "Size",
                "value": "10,Ten"
              }
            ]
          }
        ],
        "stockId": 55,
        "stockCode": "SERIAL.AND.ATTRIBUTES.ONSELL",
        "unit": "UNIT",
        "qty": "2.0000",
        "description": "Serials and Attributes on sell stock",
        "modifyinit": "SYS",
        "modifydate": "2021-03-10T11:33:53"
      }
    },
    {
      "type": "JobComment",
      "id": "10-2",
      "attributes": {
        "include": true,
        "status": "FINISH",
        "comment": "",
        "modifyinit": "SYS",
        "modifydate": "2021-03-10T11:34:13"
      }
    },
    {
      "type": "JobComment",
      "id": "10-1",
      "attributes": {
        "include": false,
        "status": "Booked",
        "comment": "",
        "modifyinit": "SYS",
        "modifydate": "2021-03-10T11:33:41"
      }
    }
  ]
}

Example GET (Return specific)

Path: api/v1/jobs/10?include=stock,comments

Response:

{
  "data": {
    "id": "10",
    "type": "Job",
    "attributes": {
      "Status": "FINISH",
      "Type": "Normal",
      "CustRef": "ASDF",
      "GLDeptCode": null,
      "TaxInc": true
    },
    "relationships": {
      "customer": {
        "data": {
          "type": "CardFile",
          "id": "3"
        }
      },
      "from": {
        "data": {
          "type": "CardFile",
          "id": "3"
        }
      },
      "ship": {
        "data": {
          "type": "CardFile",
          "id": "3"
        }
      },
      "comments": {
        "data": [
          {
            "type": "JobComment",
            "id": "10-2"
          },
          {
            "type": "JobComment",
            "id": "10-1"
          }
        ]
      },
      "stock": {
        "data": [
          {
            "type": "JobStock",
            "id": "10-1"
          },
          {
            "type": "JobStock",
            "id": "10-2"
          }
        ]
      }
    },
    "links": {
      "self": "/test/api/v1/jobs/10"
    }
  },
  "included": [
    {
      "type": "JobStock",
      "id": "10-1",
      "attributes": {
        "serials": [
          {
            "serialNo": "serial1"
          },
          {
            "serialNo": "serial2"
          },
          {
            "serialNo": "serial3"
          }
        ],
        "stockId": 53,
        "stockCode": "SERIAL.ONSELL",
        "unit": "UNIT",
        "qty": "3.0000",
        "description": "Serial on sell stock",
        "modifyinit": "SYS",
        "modifydate": "2021-03-10T11:33:53"
      }
    },
    {
      "type": "JobStock",
      "id": "10-2",
      "attributes": {
        "stockAttrs": [
          {
            "name": "Colour",
            "value": "R,Red"
          },
          {
            "name": "Size",
            "value": "8,Eight"
          }
        ],
        "stockId": 54,
        "stockCode": "ATTRIBUTES.ONSELL",
        "unit": "UNIT",
        "qty": "3.0000",
        "description": "Attributes on sell stock",
        "modifyinit": "SYS",
        "modifydate": "2021-03-10T11:33:53"
      }
    },
    {
      "type": "JobStock",
      "id": "10-3",
      "attributes": {
        "serials": [
          {
            "serialNo": "serial1",
            "stockAttrs": [
              {
                "name": "Colour",
                "value": "R,Red"
              },
              {
                "name": "Size",
                "value": "8,Eight"
              }
            ]
          },
          {
            "serialNo": "serial2",
            "stockAttrs": [
              {
                "name": "Colour",
                "value": "G,Green"
              },
              {
                "name": "Size",
                "value": "10,Ten"
              }
            ]
          }
        ],
        "stockId": 55,
        "stockCode": "SERIAL.AND.ATTRIBUTES.ONSELL",
        "unit": "UNIT",
        "qty": "2.0000",
        "description": "Serials and Attributes on sell stock",
        "modifyinit": "SYS",
        "modifydate": "2021-03-10T11:33:53"
      }
    },
    {
      "type": "JobComment",
      "id": "10-2",
      "attributes": {
        "include": true,
        "status": "FINISH",
        "comment": "",
        "modifyinit": "SYS",
        "modifydate": "2021-03-10T11:34:13"
      }
    },
    {
      "type": "JobComment",
      "id": "10-1",
      "attributes": {
        "include": false,
        "status": "Booked",
        "comment": "",
        "modifyinit": "SYS",
        "modifydate": "2021-03-10T11:33:41"
      }
    }
  ]
}

Example POST

Path: api/v1/jobs

Request:

{
  "data": {
    "relationships": {
      "customer": {
        "data": {
          "type": "CardFile",
          "id": "1"
        }
      },
      "ship": {
        "data": {
          "type": "CardFile",
          "id": "1"
        }
      },
      "stock": {
        "data": [
          {
            "type": "JobStock",
            "lid": "guid1"
          }
        ]
      }
    },
    "type": "Job",
    "attributes": {
      "Status": "Proceed",
      "CustRef": "SA",
      "OurRef": "",
      "Priority": "Normal",
      "FaultDesc": "Test Job",
      "ItemDesc": "Sale",
      "DateDue": "2024-06-24T14:05:00",
      "Type": "Normal",
      "TaxInc": true
    }
  },
  "included": [
    {
      "type": "JobStock",
      "lid": "guid1",
      "attributes": {
        "code": "T.SA.ON.SELL",
        "qty": 1,
        "serials": [
          {
            "serialNo": "serial1",
            "stockAttrs": [
              {
                "name": "Colour",
                "value": "R,Red"
              },
              {
                "name": "Size",
                "value": "8,Eight"
              }
            ]
          }
        ]
      }
    }
  ]
}

Response:

{
    "data": {
        "id": "10",
        "type": "Job",
        "attributes": {
            "Status": "Proceed",
            "CustRef": "SA",
            "OurRef": "",
            "Priority": "Normal",
            "FaultDesc": "Test Job",
            "InvoiceDesc": null,
            "ItemDesc": "Sale",
            "SubBranchCode": null,
            "BranchCode": null,
            "dateIn": "2025-03-26T18:10:50.65",
            "DateDue": "2010-06-10T14:05:00",
            "StatusDue": "2025-03-27T09:00:00+11:00",
            "Type": "Normal",
            "priceLevel": "Dealer",
            "taxPaid": true,
            "serial": null,
            "currencyCode": "AUD",
            "source": null,
            "sourceValue": null,
            "companyCode": "",
            "exchangeRate": 1.0,
            "rateLocked": true,
            "prevJobNo": null,
            "quoteNo": null,
            "invoiceGroupNo": null,
            "GLDeptCode": null,
            "TaxInc": true,
            "manufacturing": null,
            "jobDetails": {
                "customer": {
                    "attn": null,
                    "name": null,
                    "isAddressResidential": null,
                    "streetAddress": null,
                    "suburb": null,
                    "state": null,
                    "postCode": null,
                    "country": null,
                    "orderNo": null
                },
                "ship": {
                    "attn": null,
                    "name": null,
                    "isAddressResidential": null,
                    "streetAddress": null,
                    "suburb": null,
                    "state": null,
                    "postCode": null,
                    "country": null
                },
                "freight": {
                    "dispatch": {
                        "shipVia": null,
                        "shipRef": null
                    },
                    "amount": 0.0,
                    "tax": 0.0,
                    "taxCode": null,
                    "noOfCartons": null
                }
            }
        },
      "relationships": {
        "customer": {
          "data": {
            "type": "CardFile",
            "id": "1"
          }
        },
        "from": {
          "data": {
            "type": "CardFile",
            "id": "1"
          }
        },
        "ship": {
          "data": {
            "type": "CardFile",
            "id": "1"
          }
        },
        "name": {
          "data": {
            "type": "Name",
            "id": "7"
          }
        },
        "invoice": {
          "data": {
            "type": "Invoice",
            "id": "-1"
          }
        },
        "comments": {
          "data": [
            {
              "type": "JobComment",
              "id": "10-2"
            },
            {
              "type": "JobComment",
              "id": "10-1"
            }
          ]
        },
        "stock": {
          "data": [
            {
              "type": "JobStock",
              "id": "10-1"
            }
          ]
        }
      },
        "links": {
            "self": "/api/v1/jobs/10"
        }
    }
}

Example PATCH

Path: api/v1/jobs/10

Request:

{
    "data": {
        "id":"10",
        "type": "Job",
        "attributes": {
            "Status": "Proceed",
            "CustRef": "SA",
            "OurRef": "",
            "Priority": "Normal",
            "FaultDesc": "Test Job",
            "ItemDesc": "Sale",
            "DateDue": "2024-06-24T14:05:00",
            "Type": "Normal",
            "TaxInc": true
        }
    }
}

Response:

{
    "data": {
        "id": "10",
        "type": "Job",
        "attributes": {
            "Status": "Proceed",
            "CustRef": "SA",
            "OurRef": "",
            "Priority": "Normal",
            "FaultDesc": "Test Job",
            "InvoiceDesc": null,
            "ItemDesc": "Sale",
            "SubBranchCode": null,
            "BranchCode": null,
            "dateIn": "2025-03-26T18:22:50.953",
            "DateDue": "2024-06-24T14:05:00",
            "StatusDue": "2025-03-27T09:00:00",
            "Type": "Normal",
            "priceLevel": "Dealer",
            "taxPaid": true,
            "serial": null,
            "currencyCode": "AUD",
            "source": null,
            "sourceValue": null,
            "companyCode": "",
            "exchangeRate": 1.0000,
            "rateLocked": true,
            "prevJobNo": null,
            "quoteNo": null,
            "invoiceGroupNo": null,
            "GLDeptCode": null,
            "TaxInc": true,
            "jobDetails": {
                "customer": {
                    "attn": "Test",
                    "name": "System administrator",
                    "isAddressResidential": null,
                    "streetAddress": "street line 1\r\nstreet line 2",
                    "suburb": "the burbs",
                    "state": "STA",
                    "postCode": "9876",
                    "country": "Australia",
                    "orderNo": ""
                },
                "ship": {
                    "attn": "Test",
                    "name": "System administrator",
                    "isAddressResidential": null,
                    "streetAddress": "del street line 1\r\nstreet line 2",
                    "suburb": "del the burbs",
                    "state": "DEL",
                    "postCode": "8765",
                    "country": "Australia"
                },
                "freight": {
                    "dispatch": {
                        "shipVia": "",
                        "shipRef": null
                    },
                    "amount": 0.0,
                    "tax": 0.0,
                    "taxCode": null,
                    "noOfCartons": null
                }
            }
        },
        "relationships": {
            "customer": {
                "data": {
                    "type": "CardFile",
                    "id": "1"
                }
            },
            "from": {
                "data": {
                    "type": "CardFile",
                    "id": "1"
                }
            },
            "ship": {
                "data": {
                    "type": "CardFile",
                    "id": "1"
                }
            },
            "name": {
                "data": {
                    "type": "Name",
                    "id": "7"
                }
            },
            "invoice": {
                "data": {
                    "type": "Invoice",
                    "id": "-1"
                }
            },
            "comments": {
                "data": [
                    {
                        "type": "JobComment",
                        "id": "10-2"
                    },
                    {
                        "type": "JobComment",
                        "id": "10-1"
                    }
                ]
            }
        },
        "links": {
            "self": "/api/v1/jobs/10"
        }
    }
}