Can i create new job order with php api?

Forum for users and developers of Bullhorn's Webservices API suite

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
amaljo
User
Posts: 1
Joined: Thu Jan 24, 2013 7:20 am

Can i create new job order with php api?

Post by amaljo » Thu Jan 24, 2013 7:48 am

Hi,

Can i create new job order via API. My client need to manage their jobs from their website. I have tried but only able to fetch the job list. Is it possible with the API. IF yes could you please provide me a sample code?.

s.emmons
User
Posts: 333
Joined: Wed Dec 31, 1969 8:00 pm

Re: Can i create new job order with php api?

Post by s.emmons » Mon Jan 28, 2013 4:32 pm

Hi amaljo,

You can create new job orders in the APIs using the save operation. The minimum requirements is that the jobOrderID and dateAdded fields are not passed as part of the request, as these are primary keys and autogenerated by the system. Additionally, your request should have values defined for all non-nullable fields on JobOrder. The best practice for creating a template is to do a find on an existing job and copy the DTO. You can remove jobOrderID and dateAdded tags altogether, while simply just clearing the data from other fields.

It is also best to have knowledge of the value list you or your client uses for each non-nullable field on JobOrder so any records you create via the APIs contain relevant data. In general, this is recommended across all fields and entities, but it is particularly important for non-nullable fields since those are required to create a new instance. How much data you define beyond the non-nullable fields is entirely up to you or your client's needs.

Unfortunately we do not have sample code for this in PHP, but here is an XML example of the minimum that must be passed to create a job in the APIs:

Code: Select all

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:apis="http://apiservice.bullhorn.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <apis:save>
         
          <session>*********************</session>

  <dto xsi:type="ns4:jobOrderDto" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns4="http://job.entity.bullhorn.com/">
               
               <clientContactID>5135821</clientContactID>
               <clientCorporationID>120621</clientCorporationID>
               <employmentType>Permanent</employmentType>
               <ownerID>5126272</ownerID>
               <startDate>2013-01-28T00:00:00-04:00</startDate>
            </dto>

      </apis:save>
   </soapenv:Body>
</soapenv:Envelope>
Sam Emmons
Enterprise Team Lead
BULLHORN
US Support 617-478-9126

Post Reply