AI Search

Update Deal

Use the API to update the details of an existing deal using its unique deal ID. You can modify attributes like end date, targeting, margins, floor price, and more.

API Endpoint

PUT https://apis.demand.ssp.inmobi.com/v1/deals

Parameters

Headers

Field Name Type Is mandatory (Y/N)? Description
Authorization String Y Bearer token for authentication (Bearer <token>)
X-USER-ID String Y The ID of the user making the request
X-INMOBI-ORG-ID String Y The organization ID associated with the user
Content-Type String Y Specifies the media type of the request body. Use: application/json

General

Field Name Type Is mandatory (Y/N)? Description
deal.id String Y Unique ID of the deal to update
deal.name String Y Name of the deal
deal.dspID String Y DSP ID
deal.startDate String (DateTime) Y Start date in DD/MM/YYYY HH:mm:ss format
deal.endDate String (DateTime) Y Start date in DD/MM/YYYY HH:mm:ss format
deal.dealType String Y Deal type, e.g., PREFERRED_DEAL
deal.dealFloor Number Y Floor price
deal.dealFloorType String Y STATIC or VARIABLE
deal.margin Number N Partner margin %
deal.dealFloorTolerance String N Allowed floor tolerance (if applicable)
deal.isActive Boolean N Deal status flag
deal.targeting[].targetingSegmentId Integer N ID of the targeting segment

Targeting

Field Name Type Is mandatory (Y/N)? Description
geography.countryTargeting.countries[] Integer[] N Country IDs
geography.stateTargeting.states[].stateIds[] Integer[] N State IDs
geography.cityTargeting.cities[].cityIds[] Integer[] N City IDs
inventory.inventoryTypeTargeting.types[] String[] N E.g., APP, BROWSER
inventory.adTypeTargeting.types[] Integer[] N E.g., 1 = Video
inventory.adSlotTargeting.slots[] Integer[] N Ad slot IDs
audiences.csidFilterExpression String N CSID expression
devices.osVersions[] Integer[] N OS version IDs
devices.deviceIdPresent Integer N 1 if device ID is required

KPIs & Tracking

Field Name Type Is mandatory (Y/N)? Description
targetKpis[].kpi String N KPI type, e.g., vcr
targetKpis[].optimisationRule String N Rule: auto, manual
targetKpis[].target Integer N Target value for KPI
tracking.viewabilityPartners.ias.* Various N IAS tracking configuration flags
tracking.billOnViewability Boolean N Billing logic based on viewability
tracking.additionalParameters.* Various N Misc flags like trueViewEnabled, verticalVideoOnly

Sample Request

curl -X PUT "https://apis.demand.ssp.inmobi.com/v1/deals" \
-H "Authorization: Bearer <your bearer token>" \
-H "X-USER-ID: <test app>" \
-H "X-INMOBI-ORG-ID: <your org id>" \
-H "Content-Type: application/json" \
-d '{
  "deal": {
    "id": "4263509468",
    "name": "testdeal1",
    "dspId": "cbab4104e7f14e2fbd2e21e96a8bf787",
    "seats": [
      {
        "id": "seat1"
      }
    ],
    "startDate": "17/07/2025 00:00:00",
    "endDate": "18/07/2025 23:59:59",
    "dealType": "PREFERRED_DEAL",
    "dealFloor": 10,
    "dealFloorType": "STATIC",
    "margin": 20,
    "targeting": [
      {
        "targetingSegmentId": 30890,
        "geography": {
          "stateTargeting": {
            "states": [
              {
                "stateIds": [
                  31207
                ]
              }
            ],
            "isIncl": true
          },
          "cityTargeting": {
            "cities": [
              {
                "countryId": 53,
                "cityIds": [
                  900611
                ]
              },
              {
                "countryId": 111,
                "cityIds": [
                  49229,
                  49222
                ]
              }
            ],
            "isIncl": true
          },
          "countryTargeting": {
            "countries": [
              125
            ],
            "isIncl": true
          }
        },
        "inventory": {
          "bundleTargeting": {
            "bundleIds": [
              "app/domain"
            ],
            "isIncl": true
          },
          "publisherTargeting": {
            "publishers": [
              "publisherwhitelist"
            ],
            "isIncl": true
          },
          "inventoryTypeTargeting": {
            "types": [
              "BROWSER"
            ],
            "isIncl": true
          },
          "adTypeTargeting": {
            "types": [
              1
            ],
            "isIncl": true
          },
          "adSlotTargeting": {
            "slots": [
              14
            ],
            "isIncl": true
          }
        },
        "audiences": {
          "csidFilterExpression": "[[5ace5190-db24-4392-8c88-4042491bca2e,7740e4bb-1963-4ed5-b4e2-c4a69a716e2f]]"
        },
        "devices": {
          "osVersions": [
            3
          ],
          "deviceIdPresent": 1
        }
      }
    ],
    "dealFloorTolerance": "",
    "isActive": false,
    "targetKpis": [
      {
        "kpi": "vcr",
        "optimisationRule": "auto",
        "target": 70,
        "isPrimary": false
      }
    ],
    "tracking": {
      "viewabilityPartners": {
        "ias": {
          "enableIas": true,
          "useInmobiIasTag": true,
          "usePartnerAdvertiserIdIas": false,
          "iasExternalTags": []
        }
      }
    }
  }
}'

Sample Response

{
  "data": {
    "id": "4263509468",
    "message": "Updated successfully"
  }
}

Error Codes

For more information, see Error Codes.

On This Page

Last Updated on: 18 Jul, 2025