App versions
Applications
Apps
Assets
Categories
License types
Migrations
Privacy and Security
Products
Promotions (Removed)
Reporting
Reviews
Vendors

Rate this page:

Promotions (Removed)

Information about vendor promotions

Get promotions

Deprecated

GET /rest/2/vendors/{vendorId}/promotions

Get a list of promotions for the specified vendor.

This resource requires authentication.

This is a deprecated API. Refer Get promotions for the new API details

Request

Path parameters
vendorId Required

integer

The unique identifier for this vendor

Format: int64

Example

1
2
3
4
curl --request GET \
  --url 'https://marketplace.atlassian.com/rest/2/vendors/{vendorId}/promotions' \
  --user 'email@example.com:<api_token>' \
  --header 'Accept: application/json'

Responses

Content typeValue
application/json

PromotionList

Create promotion

Deprecated

POST /rest/2/vendors/{vendorId}/promotions

Create a new promotion for the specified vendor.

This resource requires authentication.

This is a deprecated API. Refer Create promotion for the new API details

Request

Path parameters
vendorId Required

integer

The unique identifier for this vendor

Format: int64
Body parameters
_links

PromotionLinks

name Required

string

Name of the promotion

products Required

Array<string>

App keys of the apps for which this promotion is applicable

startDate

string

Starting date of the promotion

Format: date
expirationDate Required

string

Expiration date of the promotion

Format: date
status

string

Current status of the promotion

Valid values: ACTIVE, ENDED-EARLY, EXPIRED

usageType Required

string

Indicates whether this is a shared or single-use promotion

Valid values: MULTI, SINGLE

discountType Required

string

Indicates whether the promotion uses percentage discounts or dollar amounts

Valid values: FLAT, PERCENTAGE

discountPercent

integer

Discount percentage if this promotion is based on a percentage discount

Format: int32
appliesToAllLicenseTypes

boolean

True if the promotion applies to all license types

maxUses

integer

Maximum number of times this promotion can be used if it is a shared promotion

Format: int32
hosting

string

Hosting environment of the apps for which this promotion is applicable. Allowed values are server or datacenter, defaulting to server.

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
curl --request POST \
  --url 'https://marketplace.atlassian.com/rest/2/vendors/{vendorId}/promotions' \
  --user 'email@example.com:<api_token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "_links": {
    "self": {
      "href": "<string>",
      "type": "<string>",
      "title": "<string>"
    },
    "edit": {
      "href": "<string>",
      "type": "<string>",
      "title": "<string>"
    },
    "status": {
      "href": "<string>",
      "type": "<string>",
      "title": "<string>"
    },
    "codes": {
      "href": "<string>",
      "type": "<string>",
      "title": "<string>"
    },
    "usage": {
      "href": "<string>",
      "type": "<string>",
      "title": "<string>"
    }
  },
  "name": "<string>",
  "products": [
    "<string>"
  ],
  "startDate": "<string>",
  "expirationDate": "<string>",
  "status": "ACTIVE",
  "usageType": "MULTI",
  "discountType": "FLAT",
  "discountPercent": 71,
  "appliesToAllLicenseTypes": true,
  "maxUses": 78,
  "hosting": "<string>"
}'

Responses

Successfully created

A schema has not been defined for this response code.

Header Parameters
Location

string

URI of the new resource

Get promotion

Deprecated

GET /rest/2/vendors/{vendorId}/promotions/{promotionId}

Get a specific promotion for the specified vendor.

This resource requires authentication.

This is a deprecated API. Refer Get promotion for the new API details

Request

Path parameters
vendorId Required

integer

The unique identifier for this vendor

Format: int64
promotionId Required

string

The unique identifier for this promotion

Example

1
2
3
4
curl --request GET \
  --url 'https://marketplace.atlassian.com/rest/2/vendors/{vendorId}/promotions/{promotionId}' \
  --user 'email@example.com:<api_token>' \
  --header 'Accept: application/json'

Responses

Content typeValue
application/json

Promotion

Update promotion

Deprecated

PATCH /rest/2/vendors/{vendorId}/promotions/{promotionId}

Update a specific promotion for the specified vendor.

The request body must be a valid JSON Patch document. The properties which can be referenced in the PATCH are the same ones returned by a GET on this URI.

This resource requires authentication.

This is a deprecated API. Refer Update promotion for the new API details

Request

Path parameters
vendorId Required

integer

The unique identifier for this vendor

Format: int64
promotionId Required

string

The unique identifier for this promotion

Body parameters
Content typeValue
application/json-patch+json

Array<JsonPatchDocumentation>

Example

1
2
3
curl --request PATCH \
  --url 'https://marketplace.atlassian.com/rest/2/vendors/{vendorId}/promotions/{promotionId}' \
  --user 'email@example.com:<api_token>'

Responses

Successfully modified

Header Parameters
Location

string

URI of the resource

Get promotion codes

Deprecated

GET /rest/2/vendors/{vendorId}/promotions/{promotionId}/codes

Get a list of single-use codes for the specified promotion.

This resource requires authentication.

This is a deprecated API. Refer Get promotion codes for the new API details

Request

Path parameters
vendorId Required

integer

The unique identifier for this vendor

Format: int64
promotionId Required

string

The unique identifier for this promotion

Example

1
2
3
4
curl --request GET \
  --url 'https://marketplace.atlassian.com/rest/2/vendors/{vendorId}/promotions/{promotionId}/codes' \
  --user 'email@example.com:<api_token>' \
  --header 'Accept: application/json'

Responses

Content typeValue
application/json

PromotionCodeList

Create promotion code

Deprecated

POST /rest/2/vendors/{vendorId}/promotions/{promotionId}/codes

Create a new single-use code for the specified promotion.

This resource requires authentication.

This is a deprecated API. Refer Create promotion code for the new API details

Request

Path parameters
vendorId Required

integer

The unique identifier for this vendor

Format: int64
promotionId Required

string

The unique identifier for this promotion

Example

1
2
3
4
curl --request POST \
  --url 'https://marketplace.atlassian.com/rest/2/vendors/{vendorId}/promotions/{promotionId}/codes' \
  --user 'email@example.com:<api_token>' \
  --header 'Accept: application/json'

Responses

Content typeValue
application/json

PromotionCode

Get promotion code

Deprecated

GET /rest/2/vendors/{vendorId}/promotions/{promotionId}/codes/{promotionCode}

Get a specific single-use code for the specified promotion.

This resource requires authentication.

This is a deprecated API. Refer Get promotion code for the new API details

Request

Path parameters
vendorId Required

integer

The unique identifier for this vendor

Format: int64
promotionId Required

string

The unique identifier for this promotion

promotionCode Required

string

Example

1
2
3
4
curl --request GET \
  --url 'https://marketplace.atlassian.com/rest/2/vendors/{vendorId}/promotions/{promotionId}/codes/{promotionCode}' \
  --user 'email@example.com:<api_token>' \
  --header 'Accept: application/json'

Responses

Content typeValue
application/json

PromotionCode

Delete promotion code

Deprecated

DELETE /rest/2/vendors/{vendorId}/promotions/{promotionId}/codes/{promotionCode}

Delete a specific single-use code for a specific promotion associated with a specific vendor.

Promotion codes can only be deleted prior to their use.

This resource requires authentication.

This is a deprecated API. Refer Delete promotion code for the new API details

Request

Path parameters
vendorId Required

integer

The unique identifier for this vendor

Format: int64
promotionId Required

string

The unique identifier for this promotion

promotionCode Required

string

Example

1
2
3
curl --request DELETE \
  --url 'https://marketplace.atlassian.com/rest/2/vendors/{vendorId}/promotions/{promotionId}/codes/{promotionCode}' \
  --user 'email@example.com:<api_token>'

Responses

Successfully deleted

A schema has not been defined for this response code.

Get promotion status

Deprecated

GET /rest/2/vendors/{vendorId}/promotions/{promotionId}/status

Get a specific promotion status for the specified vendor.

This resource requires authentication.

This is a deprecated API. Refer Get promotion status for the new API details

Request

Path parameters
vendorId Required

integer

The unique identifier for this vendor

Format: int64
promotionId Required

string

The unique identifier for this promotion

Example

1
2
3
4
curl --request GET \
  --url 'https://marketplace.atlassian.com/rest/2/vendors/{vendorId}/promotions/{promotionId}/status' \
  --user 'email@example.com:<api_token>' \
  --header 'Accept: application/json'

Responses

Content typeValueRestrictions
application/json

string

Valid values: ACTIVE, ENDED-EARLY, EXPIRED

Rate this page: