v1

latestOpenAPI 3.0.12026-07-245752052.0 MB
jobs

Create a job and replace its Company Attributes with the payload

Creates a Job and upserts its Company Attributes in one request. The provided customAttributesPayload replaces the entire set of attributes attached to the job: attributes omitted from the payload will be removed, attributes present will be created/updated. Values must match the attribute data type configured for the company attribute.

post/api/serviceworkforce/processes/jobs/custom_attributes

Request body

Example request

{
  "jobPayload": {
    "name": "Cherry Picker",
    "description": "Picking cherries",
    "externalPosition": {
      "source": "hire",
      "externalIdentifier": "pos_12345",
      "externalCreatedAt": "2024-01-10T05:19:37.788-08:00"
    }
  },
  "customAttributesPayload": [
    {
      "attribute": "job_category",
      "value": "Agriculture"
    },
    {
      "attribute": "requires_experience",
      "value": true
    },
    {
      "attribute": "onboarding_start_date",
      "value": "2025-06-01"
    }
  ]
}

Response

Created successfully. Wrapped in a JsonAPI root response.

Example response

{
  "data": {
    "createdAt": "2021-05-05T01:02:03.924Z",
    "createdBy": "1e4e9128-fbb2-4b0a-97fc-f65bb1efee55",
    "lastUpdatedAt": "2021-05-05T04:05:06.924Z",
    "lastUpdatedBy": "7097bb82-61bd-4724-82ac-eab598190e47",
    "lastUpdatedByAudience": "employer",
    "lastUpdatedByAudienceUuid": "68df4316-590a-4081-9f24-9d9311977c9d",
    "lastUpdatedByImpersonatedBy": "3462e1d4-0e27-4798-b4a2-76412ab21892",
    "lastUpdatedByCompanyUuid": "d310aada-b1ad-4e9a-b822-b90c3cdb65bb",
    "lastUpdatedByEnterpriseUuid": "a6420cdc-285a-4f75-8ccc-8edff6d60c0a"
  },
  "meta": {
    "timestamp": "2021-05-05T09:47:58.924Z",
    "verb": "GET",
    "path": "/api/structure/resources/5949cf7c-fec6-4b31-947c-3aceabff58c5",
    "jti": "%cQN3RIGp",
    "rid": "$2d2zkHZ5",
    "count": 1,
    "status": "200",
    "duration": 17,
    "size": 1234
  }
}