Skip to content

For developers and partners

Diretsa data model

Diretsa's data model: the main things the platform keeps, how they connect, and every controlled list with the standard it follows. It describes kinds of data, never anyone's records. Machine-readable version: api.diretsa.com/api/model (also at /model.json).

Version 2026-11-04

Standards we use

StandardVersionUsed for
Ad Context Protocol (AdCP)3.1Products, formats, pricing, media buys, accounts and the 20 media channels
OpenOOH Venue Taxonomy1.2Venue types of screens and billboards
IAB Tech Lab Content Taxonomy3.1Audience interests (tier 1)
IAB Tech Lab Ad Product Taxonomy2.0Sensitive ad categories
ISO 3166-1 and 3166-2Country (ZA) and provinces (ZA-GP, ZA-WC ...)
ISO 4217Currency (ZAR)
schema.orgOrganization, Place and Offer in the data model

How it fits together

Each arrow means "has". Select a box to read about it.

Entities

Organisation

A business on Diretsa: an advertiser (buys media) or a publisher (sells it). People are members with roles.

Key: org_id
schema.org: Organization
AdCP: Account (for advertisers buying over AdCP)
FieldTypeDescription
kindenumadvertiser or publisher
brand_domaindomainAdvertisers: the brand's verified website; ads may only link there or to approved pages
ad_categorieslistAdvertisers: sensitive categories the brand declaresList: ad_categories
ad_policyobjectPublishers: blocked categories and brands, whether each ad is reviewed, auto-accept of orders
trust_levelenumSets booking limits; grows with verified history
  • has many Site — A publisher owns sites
  • has many Campaign — An advertiser runs campaigns
  • has many Payout — A publisher is paid monthly

Site

A property a publisher sells: a website, newsletter, screen network, radio station, publication or any of the 20 channels. Verified before it can sell.

Key: site_id
schema.org: WebSite (web), Periodical (newsletter, print), Organization (networks)
AdCP: Property (in adagents.json and publisher_properties)
FieldTypeDescription
domaindomainThe site or network domain
channelenumThe media channelList: channelsAd Context Protocol (AdCP)
verifiedbooleanOwnership proven (meta tag, DNS or file)
audienceAudienceProfileThe publisher's description of its audience, dated

AudienceProfile

Who a site reaches, in the publisher's words and dated; Diretsa adds counted impressions for websites and newsletters.

Key: site_id
FieldTypeDescription
regionslist"national" or provincesList: provincesISO 3166-1 and 3166-2
languageslistLanguages of the audienceList: languages
age_groupslistAge bandsList: age_groups
income_groupslistIncome bandsList: income_groups
interestslistInterestsList: interestsIAB Tech Lab Content Taxonomy
monthly_reachintegerPeople reached a month (publisher figure)
  • belongs to Site — Describes one site

Placement

One space for sale: an ad size on a website, a slot in a newsletter, a screen or set of screens, a radio spot. Sold to buyers as an AdCP product.

Key: product_id
schema.org: Offer
AdCP: Product
FieldTypeDescription
pricing_modelenumHow it is pricedList: pricing_modelsAd Context Protocol (AdCP)
pricemoney (ZAR)Price under the pricing modelISO 4217
min_spendmoney (ZAR)Smallest booking
formatobjectSize or material it takes (image, video, audio, document, text, brief)Ad Context Protocol (AdCP)
proof_levelenumHow strongly delivery can be checkedList: proof_levels
listedbooleanOn sale
  • belongs to Site — On one site
  • has one ScreenLocation — Screens and billboards: where it is
  • has many Package — Booked in packages

ScreenLocation

Where a screen or billboard placement is, and what kind of venue.

Key: product_id
schema.org: Place
FieldTypeDescription
lat, lngcoordinatesWGS84
city, provincetextProvince from the nineList: provincesISO 3166-1 and 3166-2
venue_typeenumKind of venueList: venue_typesOpenOOH Venue Taxonomy
screen_idslistThe network's own ids for each physical screen
impressions_per_playnumberThe network's estimate of people who see one play
  • belongs to Placement — Locates one placement

Campaign

An advertiser's plan: the brief, budget ceiling, dates, what it wants, and its artwork slots.

Key: campaign_id
FieldTypeDescription
brieftextAudience, goal, anything to avoid, in words
objectiveenumWhat the campaign is forList: objectives
target_audienceobjectLanguages, age groups, income groups, interests: the same vocabularies as AudienceProfileIAB Tech Lab Content Taxonomy
regionslistProvinces (empty: all of South Africa)List: provincesISO 3166-1 and 3166-2
categorieslistSensitive categories declaredList: ad_categoriesIAB Tech Lab Ad Product Taxonomy
max_total_budgetmoney (ZAR)Ceiling across all its bookings
  • belongs to Organisation — Of one advertiser
  • has many Creative — Artwork slots
  • has many MediaBuy — Bookings made for it, after a draft is approved

Creative

Approved material for a slot: an image, video, audio, document, text or brief, with its click-through on the brand's domain.

Key: creative_id
AdCP: Creative
FieldTypeDescription
kindenumimage, video, audio, document, text or brief
click_urlurlOn the brand's domain or an approved destination
  • many to many Package — Assigned to packages

MediaBuy

A booking: made in the console from an approved draft, or by an AI agent over AdCP. Prepaid or within a credit line.

Key: media_buy_id
AdCP: Media buy
FieldTypeDescription
start, enddatetimeFlight, Africa/Johannesburg
total_budgetmoney (ZAR)Reserved when booked
statusenumpending_creatives, pending_start, active, paused, completed, rejected, canceledAd Context Protocol (AdCP)
  • has many Package — One package per placement booked
  • belongs to Organisation — Paid by one advertiser

Package

One placement within a booking, with its budget, price and creatives.

Key: package_id
AdCP: Package
FieldTypeDescription
budgetmoney (ZAR)Spend on this placement
pricing_option_ididWhich price appliesAd Context Protocol (AdCP)
  • belongs to Placement — Of one placement
  • has one Order — Channels the publisher runs: the order they accept and report on
  • has many DeliveryReport — Counted delivery

Order

A package a publisher runs themselves (screens, radio, print ...): accepted or declined, then reported with proof.

Key: order_id
FieldTypeDescription
statusenumawaiting_material, new, accepted, declined, canceled
prooflistPlay logs, tear sheets, photos, platform reportsList: proof_levels
  • belongs to Package — Runs one package

DeliveryReport

What ran: impressions and clicks counted by Diretsa's ad server, or units (plays, spots, screen-days) reported with proof. Earnings are settled after a dispute window.

Key: package_id + date
FieldTypeDescription
impressions, clicks, unitsintegerBy day
spendmoney (ZAR)At the booked price
  • belongs to Package — For one package

Payout

A publisher's monthly payment of settled earnings, by Paystack transfer.

Key: payout_id
FieldTypeDescription
amountmoney (ZAR)Earnings after the dispute window, 70% of media revenue by default

Lists (vocabularies)

channels · 20 values · Ad Context Protocol (AdCP)

Standard: Ad Context Protocol (AdCP) 3.1

idlabelproof_level
displayWebsite displaymeasured
olvOnline videomachine
socialSocial mediamachine
searchSearchmachine
ctvConnected TV / streaming TVmachine
linear_tvBroadcast TVself_reported
radioRadioself_reported
streaming_audioStreaming audiomachine
podcastPodcastmachine
doohDigital screens (DOOH)machine
oohBillboards and outdoorself_reported
printPrint (newspapers and magazines)self_reported
cinemaCinemaself_reported
emailNewsletter / emailmeasured
gamingGamingmachine
retail_mediaRetail mediamachine
influencerCreators and influencersself_reported
affiliateAffiliateself_reported
product_placementProduct placementself_reported
sponsored_intelligenceSponsored AI answersmachine
pricing_models · 10 values · Ad Context Protocol (AdCP)

Standard: Ad Context Protocol (AdCP) 3.1

idlabel
cpmper 1 000 impressions
vcpmper 1 000 viewable impressions
cpcper click
cpcvper completed view
cpvper view
cppper rating point
cpaper sale or sign-up
revenue_share% of sales revenue
flat_rateper unit
timeper period
proof_levels · 3 values
idlabel
measuredVerified by Diretsa
machinePublisher's system report
self_reportedPublisher's own report
venue_types · 23 values · OpenOOH Venue Taxonomy

Standard: OpenOOH Venue Taxonomy 1.2

Accepts: Any OpenOOH 1.2 enumeration id or string value at any level; it is turned into the nearest Diretsa venue type.

Diretsa idLabelOpenOOH codeOpenOOH id
mallMallretail.mall205
roadsideRoadsideoutdoor.billboard301
airportAirporttransit.airports101
taxi_rankTaxi ranktransit.bus.terminal10202
in_taxiInside taxistransit.taxi_rideshare_tv103
train_stationTrain stationtransit.train.station10604
bus_stationBus stationtransit.bus.terminal10202
petrol_stationPetrol stationretail.gas_stations201
retailShopretail.other216
groceryGrocery storeretail.grocery203
pharmacyPharmacyretail.pharmacies207
gymGymhealth_beauty.gym401
salonSalonhealth_beauty.salon402
clinicClinic or doctor's roomspoint_care.doctor_office501
hospitalHospitalpoint_care.hospital504
officeOffice buildingoffice_building.office_building701
schoolSchooleducation.schools601
campusCollege or universityeducation.college602
barBar or tavernentertainment.bars804
restaurantRestaurantentertainment.casual_dining805
hospitalityHotelentertainment.hotels807
stadiumStadium or sports venueentertainment.sports803
otherOther
interests · 35 values · IAB Tech Lab Content Taxonomy

Standard: IAB Tech Lab Content Taxonomy 3.1

NameIAB id
Attractions150
Automotive1
Books and Literature42
Business and Finance52
Careers123
Communication80DV8O
Crime380
Disasters381
Education132
EntertainmentJLBCU7
Events8VZQHL
Family and Relationships186
Fine Art201
Food & Drink210
Healthy Living223
Hobbies & Interests239
Holidays1KXCLD
Home & Garden274
Law383
Medical Health286
Personal Celebrations & Life Events163
Personal Finance391
Pets422
Politics386
Pop Culture432
Real Estate441
Religion & Spirituality453
Science464
Shopping473
Sports483
Style & Fashion552
Technology & Computing596
Travel653
Video Gaming680
War and Conflicts389
ad_categories · 9 values · IAB Tech Lab Ad Product Taxonomy

Standard: IAB Tech Lab Ad Product Taxonomy 2.0

Accepts: Diretsa ids, or IAB Ad Product Taxonomy 2.0 ids ("1361" or "iab:1361").

Diretsa idLabelIAB Ad Product idsIAB names
alcoholAlcohol1002Alcohol
gamblingGambling and betting1361Gambling
tobaccoTobacco and vaping1544Tobacco
datingDating1259Dating
cryptoCrypto and trading1448Non-Fiat Currency
loansLoans and debt1349, 1338Finance and Insurance / Payday and Emergency Loans, Finance and Insurance / Credit and Debt Repair/Credit Reporting
weight_lossWeight loss and supplements1291, 1255Dieting and Weightloss, Consumer Packaged Goods / Vitamins and Supplements / Weightloss Supplements
politicsPolitical1474Politics
religionReligious1487Religion and Spirituality
provinces · 9 values · ISO 3166-1 and 3166-2

Standard: ISO 3166-1 and 3166-2

ProvinceISO 3166-2
Eastern CapeZA-EC
Free StateZA-FS
GautengZA-GP
KwaZulu-NatalZA-KZN
LimpopoZA-LP
MpumalangaZA-MP
North WestZA-NW
Northern CapeZA-NC
Western CapeZA-WC
languages · 12 values

South Africa's official languages

idlabel
EnglishEnglish
AfrikaansAfrikaans
isiZuluisiZulu
isiXhosaisiXhosa
SepediSepedi
SetswanaSetswana
SesothoSesotho
XitsongaXitsonga
siSwatisiSwati
TshivendaTshivenda
isiNdebeleisiNdebele
South African Sign LanguageSouth African Sign Language
age_groups · 6 values
idlabel
under_18under 18
18_2418–24
25_3425–34
35_4935–49
50_6450–64
65_plus65+
income_groups · 5 values

Plain bands; the licensed SAARF/MAPS segments are not used

idlabel
lowerlower
lower_middlelower middle
middlemiddle
upper_middleupper middle
upperupper
objectives · 4 values
idlabel
awarenessGet known (reach and impressions)
visitsWebsite visits (clicks)
signupsSign-ups or leads
salesSales
currencies · 1 values · ISO 4217

Standard: ISO 4217

idlabel
ZARSouth African rand
countries · 1 values · ISO 3166-1 and 3166-2

Standard: ISO 3166-1 and 3166-2

idlabel
ZASouth Africa