/
Creating an ad space

Creating an ad space

This function allows to create an ad space in the system. It allows then to attach it to campaigns. The site identifier and the zone to which the new ad space belong must be known with anticipation.

The request must be done through POST method.

URL: /admin/adnet/pub/admin/espacios.html?op=a&o=xml

Mandatory parameters:

  • descripcion: ad space name. It must be at least 2 characters long. Only  letters and numbers, not spaces, are recommended.
  • sitio_id: site identifier to which the ad space belongs
  • seccion_id: zone identifier to which the ad space belongs
  • tamano_tipo: ad space size type. In the Ad space size types Appendix the potential options are indicated. If fixed or variable size is selected, the following two parameters must been specified aswell:
  • width: width expressed in pixels (only for fixed/variable size)
  • height: height expreseed in pixels (only for fixed/variable size)
  • url: URL address where the ad space code is pasted. If entering the ad spaces URL is indicated as mandatory on global preferences, then it must always be indicated.
  • atributos_1: If DSM module is enabled, you must indicate 1 if the space can be marketed by DSM or 0 otherwise.


Optional parameters:

  • peso_maximo_anuncios:  maximum weight expressed in bytes for the ads uploaded in this space.
  • link_newwindow: if this parameter is speficied with value 1, then a new window will be open for each click on this ad space.  This value can be assigned campaign by campaign.

Response:

It contains an object <operacion> that contains a tag <resultado>. The result could be either 1 (successful operation) or 0 (failed operation). 

If the operation is unsuccessful, it adds a list of errors through tags <error>, containing the attribute that specifies the attribute's name with error, and message with the error message.


Response example without errors:

<operacion>
    <resultado>0</resultado>
    <errores>
        <error atributo=”sitio_id” mensaje=”Invalid option”/>
    </errores>
</operacion>

Related content