Skip to main content
PUT
/
v2
/
access
/
promotions
/
:promotionId
Update promotion
curl --request PUT \
  --url https://api-next.ofauth.com/v2/access/promotions/:promotionId \
  --header 'Content-Type: application/json' \
  --header 'apiKey: <api-key>' \
  --header 'x-connection-id: <api-key>' \
  --data '
{
  "discount": 50,
  "message": "<string>",
  "finishDays": 183,
  "subscribeCounts": 2,
  "subscribeDays": 183,
  "type": [
    "<string>"
  ]
}
'
{
  "id": 123,
  "message": "<string>",
  "rawMessage": "<string>",
  "hasRelatedPromo": true,
  "price": 123,
  "type": "<string>",
  "canClaim": true,
  "claimsCount": 123,
  "subscribeCounts": 123,
  "subscribeDays": 123,
  "createdAt": "<string>",
  "finishedAt": "<string>",
  "isFinished": true
}

Authorizations

apiKey
string
header
required

Your OFAuth API key for authenticating requests.

x-connection-id
string
header
required

Requires a connection via the x-connection-id header.

Path Parameters

promotionId
string | null

Promotion ID

Minimum string length: 1

Body

application/json
discount
integer

Discount percentage to offer

Required range: 1 <= x <= 100
message
string

Promotion message

Maximum string length: 1000
finishDays
integer

Days until promotion ends

Required range: 1 <= x <= 365
subscribeCounts
integer

Maximum subscribers

Required range: x >= 1
subscribeDays
integer

Subscription duration in days

Required range: 1 <= x <= 365
type
string[]

Promotion types

Minimum array length: 1

Response

Successful response

id
number
required
message
string
required
rawMessage
string
required
price
number
required
type
string
required
canClaim
boolean
required
claimsCount
number
required
subscribeCounts
number
required
subscribeDays
number
required
createdAt
string
required
finishedAt
string
required
isFinished
boolean
required