Bring Your Own Algorithm (BYOA) API
  • 2 Minutes to read

    Bring Your Own Algorithm (BYOA) API


      Article summary

      Use the Bring Your Own Algorithm API, available through the Yahoo Ad Tech Cleanroom, to create a BYOA rule that can be assigned to a line. The Yahoo Ad Tech Cleanroom offers an environment where external data can be combined with Yahoo data to create custom bidding algorithms.

      The following HTTP methods can be used:

      Resources

      byoa

      The byoa object contains the following fields.

      Parameter

      Definition

      Data Type

      Create

      Update

      Id

      The unique identifier for the BYOA rule.

      Integer

      Required

      Required

      payload

      The base64 encoded rule file.

      String

      Required

      Required

      accountId

      The ID of the advertiser.

      Integer

      Required

      Required

      name

      The name of the uploaded file.

      String

      Required

      Required

      Read BYOA Rules by Account ID, Name or ID

      Read all BYOA rules for an advertiser by Account Id with Max version

      Get all BYOA rules for an advertiser by account ID.

      GET /byoa/account/{accountId}

      Parameters

      Parameters

      Parameter Type

      Description

      Data Type

      Required

      accountId

      path

      The ID of the advertiser.

      integer

      Y

      Sample Request

      GET /byoa/account/987654321

      Sample Response

      [
         {"id": 1,accountId:2397,name:”byaa_nyc_apr-2018”,version: 1, inputFileUrl:”http://yahooo.s3/file1.rule”},
        {"id": 2,accountId:2397,name:”byoa_nyc_mar_2018”,version: 1, inputFileUrl:”http://yahooo.s3/file2.rule”},
       {"id": 3,accountId:2397,name:”byoa_nyc_103_2018”,version: 1, inputFileUrl:”http://yahooo.s3/file3.rule”} ]

      Read all BYOA rules by Name

      Get a list of all BYOA rules by name for the account.

      GET /byoa/account/{account_id}/name/{name}

      Parameters

      Parameters

      Parameter Type

      Description

      Data Type

      Required

      accountId

      path

      The ID of the advertiser.

      integer

      Y

      name

      path

      The BYOA rule name.

      string

      Y

      Sample Request

      GET /byoa/account/987654321/name/rule-1234

      Sample Response

      [{
         byoaId     : 978937432             		// LONG  (id of this particular upload)
         byoa Name  : nyc-2018
         version	 : 3
         fileName   : 'http://yahoo.s2/file2.rule,  	// STRING   (name of file uploaded - received from FE)
         }, ...]

      Read BYOA rule by Id

      Get a BYOA rule by ID.

      GET /byoa/{byoa_id}

      Parameters

      Parameters

      Parameter Type

      Description

      Data Type

      Required

      byoa_id

      path

      The BYOA ID.

      integer

      Y

      Sample Request

      GET /byoa/123456’

      Sample Response

      {
          id           : 978937432             		// LONG  (id of this particular upload)
          name        : ‘nyc-2018’
          version	         : 3
          inputFileUrl      : 'http://yahoo.s2/file2.rule’,  	// STRING   (name of file uploaded - received from FE),
          accountId: 34567,
          assignmentStatusId: 1,    // NOT_ASSIGNED = 1, PENDING = 2, FAILED = 3, SUCCESS = 4
          linesTargetingBYOA: []
      }

      Create / Import BYOA rule

      Create or import a new BYOA rule.

      POST /byoa

      Parameters

      All fields are specified in the request body.

      Sample Request

      POST /byoa

      Sample Request Body

      {
          payload 	: '....',             			// STRING   (base64 encoded rule file). Encoded 
          accountId   : 1232424,            		    // INTEGER  (Current advertiser-id)
          name    	: 'accuen_byoa_042018.txt'  	// STRING   (name of the file uploaded)
      }

      Sample Response

      {
        id: 123456,
        name: “rule-1234”,
        inputFileUrl: “https://yahoo.s3/rule.txt”,
        version: 1,
        accountId: 34567,
        assignmentStatusId: 1,    // NOT_ASSIGNED = 1, PENDING = 2, FAILED = 3, SUCCESS = 4
        linesTargetingBYOA: []
      }

      Update a BYOA Rule

      Update an existing BYOA rule.

      PUT /byoa

      Parameters

      All fields are specified in the request body.

      Sample Request URL

      PUT /byoa

      Sample Request Body

      {
          Id		    : ‘978937432’ 			// LONG Unique identifier for BYOA table
          payload 	: '....',             			// STRING   (base64 encoded rule file). Encoded string?
          accountId   : 1232424,            		// INTEGER  (Current advertiser-id)
          name    	: 'company_byoa_042018.txt'  	// STRING   (name of the file uploaded)
      }

      Sample Response

      {
        id: 123456,
        name: “rule-1234”,
        inputFileUrl: “https://yahoo.s3/rule.txt”,
        version: 1,
        accountId: 34567,
        assignmentStatusId: 1,    // NOT_ASSIGNED = 1, PENDING = 2, FAILED = 3, SUCCESS = 4
        linesTargetingBYOA: []
      }


      Was this article helpful?