Edit in GitHubLog an issue

Users

The users resource accesses and updates your user profile. You can also access your sales reports.

Profile

You must use your mage_id for these endpoints. One way you can get your mage_id is when you obtain a session token.

Copied to your clipboard
GET /rest/v1/users/:mage_id
GET /rest/v1/users/:mage_id?style=summary

Get profile data

By default, requests for profile data return all fields. You can limit the amount of data that the request returns by using the style=summary option.

The following example shows the request/response body for retrieving all profile data.

Selected FieldsTypeDescription
send_newsletter
boolean
Whether to receive emails about policies and announcements
Copied to your clipboard
curl -X GET \
-H 'Authorization: Bearer baGXoStRuR9VCDFQGZNzgNqbqu5WUwlr.cAxZJ9m22Le7' \
https://commercedeveloper-sandbox-api.adobe.com/rest/v1/users/MAG123456789

The following example shows the request/response body for retrieving a subset of profile data:

Copied to your clipboard
curl -X GET \
-H 'Authorization: Bearer baGXoStRuR9VCDFQGZNzgNqbqu5WUwlr.cAxZJ9m22Le7' \
https://commercedeveloper-sandbox-api.adobe.com/rest/v1/users/MAG123456789?style=summary

Update profile data

You can update most of your profile data fields, but you only need to include the fields you want to modify in the request body.

Copied to your clipboard
PUT /rest/v1/users/:mage_id

The following example shows a request to update the personal profile bio field:

Copied to your clipboard
{
"action" : "submit",
"personal_profile" : {
"bio" : "My extensions have won Nobel Prizes in both literature and physics."
}
}

The action field specifies which update operation to perform:

  • submit --- Once your profile is complete, publishes the profile to the Commerce Marketplace partners page.
  • draft --- The update is saved on the Marketplace Developer Portal, but not published to the Commerce Marketplace.

Request:

Copied to your clipboard
curl -X PUT \
-H 'Authorization: Bearer baGXoStRuR9VCDFQGZNzgNqbqu5WUwlr.cAxZJ9m22Le7' \
-H 'Content-Type: application/json' \
-d '{ "action" : "submit", "personal_profile" : { "bio" : "My extensions have won Nobel Prizes in both literature and physics." } }' \
https://commercedeveloper-sandbox-api.adobe.com/rest/v1/users/MAG123456789

Response:

A 200 OK HTTP response code indicates a successful update.

Magento 2 package access keys

Use these endpoints to manage your Magento 2 package access keys. (These keys are not your API access keys.)

Copied to your clipboard
GET /rest/v1/users/:mage_id/keys
POST /rest/v1/users/:mage_id/keys
PUT /rest/v1/users/:mage_id/keys/:url_encoded_label_of_m2_key
DELETE /rest/v1/users/:mage_id/keys/:url_encoded_label_of_m2_key

Get keys

Use this endpoint to return the keys associated with the specified mage_id.

Copied to your clipboard
GET /rest/v1/users/:mage_id/keys

The following table lists available query parameters, all of which are optional:

ParameterTypeRequiredDescription
type
string
no
Type of keys requested:
m1 --- Magento 1 product keys
m2 --- Magento 2 composer repo keys
all --- Both M1 and M2 keys (default)
label
string
no
The url encoded value of the key label; only valid for m2 type.
uid
string
no
Your mage_id, current Adobe org_id, or the special token all. Defaults to all.

The following example shows the request/response body for retrieving keys without any query parameters:

Copied to your clipboard
curl -X GET \
-H 'Authorization: Bearer baGXoStRuR9VCDFQGZNzgNqbqu5WUwlr.cAxZJ9m22Le7' \
https://commercedeveloper-sandbox-api.adobe.com/rest/v1/users/MAG123456789/keys?uid=all

Magento 2 keys

  • Each Composer key-pair has unique label and is_enabled flags to indicate whether the key is enabled.
  • A Composer key-pair is identified by user_key (username) and password_key (password) when prompted for Composer credentials.
  • The uid indicates whether the key is to be associated with a specific mage_id or a specific Adobe org_id. If this field is absent, then the mage_id is used.

Create keys

Use this endpoint to create new Magento 2 Composer key-pairs. You must specify a unique label for each key. You can create multiple key-pairs in a single request.

Copied to your clipboard
POST /rest/v1/users/:mage_id/keys
Copied to your clipboard
{
"m2": [
{
"label": "key_for_alice"
},
{
"label": "key_for_charlie",
"uid": "MAG123456789"
},
{
"label": "key_for_my_org",
"uid": "000CBA111DCB222@AdobeOrg"
}
]
}
Copied to your clipboard
curl -X POST \
-H 'Authorization: Bearer baGXoStRuR9VCDFQGZNzgNqbqu5WUwlr.cAxZJ9m22Le7' \
-H 'Content-Type: application/json' \
-d '{ "m2": [ {"label":"key_for_alice"}, {"label":"key_for_charlie", "uid":"MAG123456789"}, {"label":"key_for_my_org", "uid":"000CBA111DCB222@AdobeOrg"} ] }' \
https://commercedeveloper-sandbox-api.adobe.com/rest/v1/users/MAG123456789/keys
  • The API returns a batch response for each label.
  • A 200 OK HTTP response code indicates a successful update.
  • Any non-200 HTTP response code indicates an error. See the message field for details.

Update keys

Use this endpoint to enable or disable a Magento 2 Composer key-pair. You must specify the key-pair in the request using a URL-encoded string.

  • The uid indicates whether the label refers to a key associated with a specific mage_id or to a specific Adobe org_id. If this field is absent, then the mage_id is used.
Copied to your clipboard
PUT /rest/v1/users/:mage_id/keys/:url_encoded_label_of_m2_key
Copied to your clipboard
curl -X PUT \
-H 'Authorization: Bearer baGXoStRuR9VCDFQGZNzgNqbqu5WUwlr.cAxZJ9m22Le7' \
-H 'Content-Type: application/json' \
-d '{ "m2" : [ { "is_enabled" : true, "uid" : "MAG123456789" } ] }' \
https://commercedeveloper-sandbox-api.adobe.com/rest/v1/users/MAG123456789/keys/key_for_bob

Delete keys

This endpoint can be used to remove a Magento 2 composer key-pair identified by the given url-encoded label.

  • The uid indicates whether the label refers to a key associated with a specific mage_id or to a specific Adobe org_id. If this field is absent, then the mage_id is used.
Copied to your clipboard
DELETE /rest/v1/users/:mage_id/keys/:url_encoded_label_of_m2_key?uid=:mage_id

The following curl example illustrates the call to be made:

Request:

Copied to your clipboard
curl -X DELETE \
-H 'Authorization: Bearer baGXoStRuR9VCDFQGZNzgNqbqu5WUwlr.cAxZJ9m22Le7' \
https://commercedeveloper-sandbox-api.adobe.com/rest/v1/users/MAG123456789/keys/key_for_charlie?uid=MAG123456789

Response:

A 204 No Content HTTP response code indicates a successful update.

User reports

Use these endpoints to retrieve reports owned by a specific user. Reports contain information about extension sales, payout status, aggregate sales, refund data, and more.

Copied to your clipboard
GET /rest/v1/users/:mage_id/reports/pageviews
GET /rest/v1/users/:mage_id/reports/totals
GET /rest/v1/users/:mage_id/reports/sales
GET /rest/v1/users/:mage_id/reports/refunds
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.