Skip to main content

Posts section

The <posts> part of the XML's <job> element is an optional section that allows pre-filling data specific to individual Portals. This includes the posting Duration (number of days for which the Post should remain live on a given Portal) and, most importantly, the Portal's Extra Fields.

As part of the <posts> section, multiple <board> elements can be provided - each one identifying a single posting destination (Portal).

Every <board> element describes Portal-specific data for the given posting - including no more than a single <duration> element, and multiple <extrafield> elements.

Important: Skipping the <posts> section or failing to provide all required Extra Fields and the posting durations correctly for the selected Portals will result in the creation of a Post Completion Page. In order to perform a Direct Posting and omit the PCP step entirely, the data discussed in this article must always be complete and valid, along with the lockboards parameter set to yes in the Config section of the XML.

Even if this section is not utilized, the XML requires an empty <posts/> element to successfully complete a Direct Posting. Such an action allows creating or updating a Job without creating any Posts to Portals.

This block only applies to the Add, Repost, and Clone methods.

Fields description

XML elementType restrictionsRequired?Notes
board:idInteger

Accepted values obtainable via the Listing Portals method - returned as the id values of the board elements.
Client can only post to Portals to which their account is subscribed.
YesID of the Portal to which a Post will be created.
Must be provided as an id attribute of the <board> element.
board:preselectString (enum)

Default: yes

Accepted values:
yes - the Portal will be pre-selected in the PCP, with the specified Extra Fields values pre-filled
no - the Portal will not be pre-selected in the PCP, but if manually selected, the specified Extra Fields values will be pre-filled
NoOnly applicable to PCP.
Sending no for a Direct Posting will skip the posting to the given board entirely.
Must be provided as a preselect attribute of the <board> element.
board/duration:daysInteger

Accepted values obtainable via the Portal's detailed information method - returned as value attributes of the duration element.
NoNumber of days the posting will be live on a given Portal.
Must be provided as a days attribute of the <duration> element, beneath the <board> element.
Refer to the Duration section of the article for more info.
board/extrafield:nameString

Accepted values obtainable via the Portal's detailed information method - returned as name attributes of the extrafield elements.
NoName of the Extra Field for which the value is provided as part of the posting.
Must be provided as a name attribute of the <extrafield> element, beneath the <board> element.
board/extrafield:parentString

Accepted values obtainable via the Portal's detailed information method - returned as parent attributes of the option elements.
NoFor type=select fields, one (multiple not allowed) of the accepted parent values for the given Extra Field.
Must be provided as a parent attribute of the <extrafield> element, beneath the <board> element.
board/extrafield/item:idString

Accepted values obtainable via the Portal's detailed information method - returned as id attributes of the option elements.
NoFor type=select fields, one (or multiple, if multi=true) of the accepted values for the given Extra Field.
If the parent attribute is present on the <extrafield> element, only values belonging to that parent can be selected.
Must be provided as an id attribute of the <item> element, beneath the <extrafield> element.

Duration

Most Portals that are part of idibu's network have a set of available duration options - this set will be different for every Portal and can be queried through the Portal's detailed information method.

The available values will always indicate the number of days for which the Post will remain active on a given Portal.

Not every Portal is guaranteed to have duration options. If none are available, it means Posts to the given Portal will remain live indefinitely until they are actively deleted.

Contrary to the deleting process, expiry is automatically handled by the idibu system after a given number of days pass. This will not send a delete request to the Portal - it will only expire the advert in idibu.

Each website may expire its adverts at slightly different times, and while idibu does send the expiry information to the Portal, Posts' lifespans are not always guaranteed to be synchronized between Portals and the idibu system to the minute.

Each Post's exact expiry date in the idibu system can be obtained as the <stop_post> parameter of the Job's detailed view method.

Extra Fields

Portals will usually have specific fields called "Extra Fields", some of them mandatory to complete the posting. These fields are unique to each Portal and are, therefore, not covered by the Core Fields - so they must be provided separately to cater to each posting destination's requirements.

To obtain information about all Extra Fields for each portal, use the Portal's detailed information call. It is strongly recommended to retrieve each Portal's information before performing every posting, as the data is often subject to change and some Extra Fields' values are dynamically returned by respective Portals' APIs at the point of running the request.

Refer to this section of the documentation for more information about retrieving and understanding each Portal's Extra Fields data.

Format

The format below details the full <posts> section that goes under the <job> element. For the full list of fields that go alongside this data, refer to the Job Section.

  <posts>
<board id="[integer]"> <!-- multiple allowed -->
<duration days="[integer]" />
<extrafield name="[string]">[string]</extrafield> <!-- multiple allowed; data provided as the element's value -->
<extrafield name="[string]"> <!-- multiple allowed; for type=select, values are provided as 'item' elements below -->
<item id="[string]" /> <!-- multiple allowed if multi=true -->
</extrafield>
</board>
</posts>

Example

The format below details the full <posts> section that goes under the <job> element. For the remaining <job> data example, refer to the Job Section.

The example is for Portal ID 1234 - idibu Test Portal.

  <posts>
<board id="1234">
<duration days="7" />
<extrafield name="idibutest_text"><![CDATA[Text field value]]></extrafield>
<extrafield name="idibutest_area">
<![CDATA[Text area value.
Newlines allowed.
HTML not supported.]]>
</extrafield>
<extrafield name="idibutest_select">
<item id="3" />
</extrafield>
<extrafield name="idibutest_multi">
<item id="one" />
<item id="three" />
<item id="five" />
</extrafield>
<extrafield name="idibutest_double" parent="p2">
<item id="c21" />
</extrafield>
<extrafield name="idibutest_dmulti" parent="pm3">
<item id="cm31" />
<item id="cm32" />
<item id="cm33" />
</extrafield>
</board>
</posts>