Update

When updating an assignment, send then same XML as when creating an assignment, but also add the xml node <id>, containing the ID of the assignment that should be updated. The ID for an assignment can be found in the returned URL when successfully calling the CREATE web service (previously described). The ID is the last, numeric portion of that URL.

End point

/api/distributionapi/edit

Request format

POST

Request content

Example XML:

<?xml version=""1.0"" encoding=""UTF-8""?>
<requisition>
<id>3654</id>
<assignmentstartdate></assignmentstartdate>
<assignmentenddate>2022-12-31</assignmentenddate>
<competenceareaid>1</competenceareaid>
<extent>100</extent>
<extenttype>%</extenttype>
<location>Stockholm</location>
<locationcountryid>22</locationcountryid>
<masterlevel>Advanced</masterlevel>
<maxrate>800</maxrate>
<maxratedisplay>1</maxratedisplay>
<publicationenddate>2022-08-31</publicationenddate>
<regionid>12</regionid>
<role>Developer</role>
<text>We are looking for a C# developer</text>
<title>C# Developer</title>
</requisition>
Property Name Required Description
id
Yes

An integer value containing the identification number of the assignment that is to be updated.

acceptsubcontractors
No

Boolean value (true/false)

If subcontractors are accepted when applying for this assignment

applicationemail
No

Tracking email from calling system

assignmentenddate
No

End date for the assignment. If specified, should be formatted as YYYY-MM-DD

assignmentstartdate
No

Start date for the assignment. If specified, should be formatted as YYYY-MM-DD

competenceareaid
Yes

An integer value for competence area (industry). Possible values can be found here:

https://www.brainville.com/content/xml/industries.xml

endclient
No

End client status. Possible values:

0 (default) - Not set

2 - Posting company have agreement with the end client

3 - Posting company is the end client

extent
Yes

Extent in hours or percentage. Must be an integer.
Extent is the total number of hours or a percentage of a full time that the consultant is expected to work with the assignment.

extenttype
Yes

Integer value:

1 - Percentage
2 - Hours
3 - Hours per week

locations
No

List of locations for the assignment

Format:

<locations>
  <location>
    <city></city>
    <regionid><regionid>
    <countryid></countryid>
  <location>
</locations>

Possible values for countryid and regionid can be found here: https://www.brainville.com/content/xml/countries.xml

location
Yes

Geographic location, i.e. city name

locationcountryid
Yes

Country id. Possible values can be found here:

https://www.brainville.com/content/xml/countries.xml

masterlevel
Yes

Skill/Experience level. Possible values are

Low
Medium
High
Advanced
Expert

maxrate
No

Rate, if specified must be a numeric value. Decimal values are allowed.

maxratedisplay
No

How maxrate should be displayed. Possible values:

1 - Mandatory

2 (default) - Informative

4 - Negotiable (rate is not shown)

nodelay
No

Boolean value (true/false)
Publishes the assignment directly to non-premium users of Brainville (without the normal delay of 72 hours). Note that in most cases the publishing company will be charged for each assignment published with NoDelay.

publicationenddate
Yes

End date for assignment publication. Must be a date on the format YYYY-MM-DD hh:mm:ss or YYYY-MM-DD.
Note: The date has to be in the future!

referencenumber
No

Internal reference number used by posting company

regionid
No

Region ID. Possible values can be found here:
https://www.brainville.com/content/xml/countries.xml
Note that regions belong to countries. Which regions belong to which countries can be found in the above xml.

requestor
No

Id-number för the Co-worker that will be shown as Contact for the assignment. This Id can be found as the last numeric part of the URL when clicking on a Co-worker in Brainville. If not specified, the user identified by the authkey will be set as requestor.

role
Yes

Consultant role for the assignment. Must be a text containing max 100 characters.

text
Yes

Description of assignment. Must be a text containing max 10 000 characters. HTML-formatting can be used, but is limited to the following tags:

br i b li ul
title
Yes

Title of the assignment. Must be a text containing max 100 characters.

Response Messages

The Brainville API will respond to the HTTP POST in the following manner:

Success

If the post was successful, the response will be the URL to the posted assignment. For example: https://www.brainville.com/Market/RequisitionSearchResult/Details/6020

 

Failure

Bad XML – If the XML is malformed, a HTTP Status 400 (Bad Request) will be returned.

Missing/incorrect data – If the XML is correct, but the data inside it is wrong (for example, a required value is missing, out of range or of the wrong type), a message with HTTP Status 200 (OK) will be returned. The message will begin with “ERROR:”, then followed by a text describing the specific error.