Updates an ad

Update an ad

put
Path parameters
idstringRequired

The id of the ads to update.

Header parameters
Brand-URLstringRequired

The brand URL of the request. This is used to identify the brand.

Example: YOUR_BRAND_URL
Auth-KeystringRequired

This is used to authenticate the request. If the request is not authenticated, the server will return a 401 Unauthorized response.

Example: YOUR_AUTH_KEY
Body

Represents a command request data transfer object (DTO) used to create or update Ads object.

typestring · enumRequiredPossible values:
titlestring · min: 1Required

Gets or sets the title of the advertisement.

positionstring · min: 1Required

Gets or sets the display position of the advertisement (e.g., homepage-top, sidebar).

targetURLstring · uri | nullableOptional

Gets or sets the target URL that the ad points to when clicked.

descriptionstring | nullableOptional

Gets or sets the description of the advertisement.

tagsstring | nullableOptional

Gets or sets the tags of the advertisement.

startDatestring · date-timeRequired

Gets or sets the start date and time when the advertisement becomes active. Format: yyyy-MM-dd HH:mm:ss

endDatestring · date-timeRequired

Gets or sets the end date and time when the advertisement expires. Format: yyyy-MM-dd HH:mm:ss

metadatastring | nullableOptional

Gets or sets the metadata of the advertisement.

languageCodesstring[] | nullableOptional

Gets or sets the list of supported language codes for targeting the advertisement. Uses ISO 639-1 format (e.g., "en", "vi"). If null, the advertisement is available for all languages.

countryCodesstring[] | nullableOptional

Gets or sets the list of supported country codes for targeting the advertisement. Uses ISO 3166-1 alpha-2 format (e.g., "US", "VN"). If null, the advertisement is available in all countries.

statusstring · enumOptionalPossible values:
imageURLsstring[] | nullableOptional

Gets or sets the list of image URLs for the advertisement. Allowed formats: JPG, PNG, GIF. Maximum allowed images: 5.

brandDomainIdsstring[]Required

The list of brand domains for the advertisement.

Responses
200

The request was successful.

application/json
put
PUT /api/v1/ads/{id} HTTP/1.1
Host: protocol.jframework.io
Brand-URL: text
Auth-Key: text
Content-Type: application/json
Accept: */*
Content-Length: 336

{
  "type": "0 - Image",
  "title": "text",
  "position": "text",
  "targetURL": "https://example.com",
  "description": "text",
  "tags": "text",
  "startDate": "2025-09-12T21:06:41.971Z",
  "endDate": "2025-09-12T21:06:41.971Z",
  "metadata": "text",
  "languageCodes": [
    "text"
  ],
  "countryCodes": [
    "text"
  ],
  "status": "0 - Inactive",
  "imageURLs": [
    "text"
  ],
  "brandDomainIds": [
    "text"
  ]
}
{
  "success": true,
  "statusCode": 200,
  "message": "The request was successful.",
  "data": true,
  "errors": []
}

Last updated

Was this helpful?