Drop2Run docs
Drop2Run.Api | v1

Campaigns an account can claim, offered to it in a list or reached by typing a code, and what each would give before it is claimed. Eligibility is settled before a place is taken, so a refused claim never uses one up.


Lists the promotions this account can still claim.

GET
https://dropto.run
/api/promotions
d2r_session (cookie)
or
Bearer

Lists the promotions this account can still claim. › Responses

OK

Response of `GET /promotions`.
​OfferedPromotion[] · required

What this account can claim, the ones closing soonest first and the open-ended ones last.


Shows what a promotion code would give this account, without claiming it.

POST
https://dropto.run
/api/promotions/preview
d2r_session (cookie)
or
Bearer

Shows what a promotion code would give this account, without claiming it. › Request Body

Body of `POST /promotions/preview`.
code
​string · maxLength: 64 · required

The code, as typed. Folded to upper case here, so the case somebody used does not matter. Bounded by the same length an operator may give one.

Shows what a promotion code would give this account, without claiming it. › Responses

OK

One campaign this account may claim.
allowsFeedback
​boolean · required

Whether claiming it switches on comments.

allowsInvitedViewers
​boolean · required

Whether claiming it switches on private sharing by email.

allowsPasswordProtection
​boolean · required

Whether claiming it switches on password protection.

code
​null | string · required

Its code, or null when there is none to type.

deltaAccountBytes
​null | integer | string · int64 · pattern: ^-?(?:0|[1-9]\d*)$ · required

Extra storage it gives, or null when it gives none.

deltaMaxCustomDomains
​integer | string · int32 · pattern: ^-?(?:0|[1-9]\d*)$ · required

Extra custom domains it gives.

deltaSitesPerDay
​null | integer | string · int32 · pattern: ^-?(?:0|[1-9]\d*)$ · required

Extra sites a day the account may create, or null. Only ever set on a campaign aimed at named accounts, so only an account the operator chose ever reads a figure here.

deltaWriteOpsPerDay
​null | integer | string · int64 · pattern: ^-?(?:0|[1-9]\d*)$ · required

Extra publishing operations a day, or null.

deltaWriteOpsPerMonth
​null | integer | string · int64 · pattern: ^-?(?:0|[1-9]\d*)$ · required

Extra publishing operations a month, or null.

endsAt
​null | string · date-time · required

When claiming closes, or null when it does not.

grantExpiresAfterDays
​null | integer | string · int32 · pattern: ^-?(?:0|[1-9]\d*)$ · required

How long what it gives lasts, or null for good.

id
​string · required

The campaign, which is what a button with no code to type sends back.

name
​string · required

What to call it on the banner.

placesLeft
​null | integer | string · int32 · pattern: ^-?(?:0|[1-9]\d*)$ · required

How many accounts may still claim it, or null when any number may. Read a moment ago and acted on a moment later, so it is a number to show rather than a number to trust — the redeem endpoint is what decides, and it decides in one statement.

suppressesBadge
​boolean · required

Whether claiming it takes the Drop2Run badge off.


Claims a promotion for this account.

POST
https://dropto.run
/api/promotions/redeem
d2r_session (cookie)
or
Bearer

Claims a promotion for this account. › Request Body

Body of `POST /promotions/redeem`. Exactly one of the two says which campaign.
code
​null | string · required

The code, as typed. Folded to upper case here, so the case somebody used does not matter.

promotionId
​null | string · required

The campaign's id, for an offer that was listed — a button rather than something to type. Refused for a campaign whose audience is Code: there the code is the only way in.

Claims a promotion for this account. › Responses

OK

What was claimed.
expiresAt
​null | string · date-time · required

When the grant runs out, or null when it does not.

name
​string · required

Its name, so the page can say what was applied without a second call.

promotionId
​string · required

The campaign claimed.