Users

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

data-variant=info
data-slots=text
You cannot use this resource to create a new profile. You must create a new profile on the Marketplace Developer Portal. If you use the sandbox environment, you must also create a new profile on the Sandbox Marketplace Developer Portal.

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.

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 Fields
Type
Description
send_newsletter
boolean
Whether to receive emails about policies and announcements
data-slots=heading, code
data-repeat=2
data-languages=CURL, JSON

Request

curl -X GET \
     -H 'Authorization: Bearer baGXoStRuR9VCDFQGZNzgNqbqu5WUwlr.cAxZJ9m22Le7' \
     https://commercedeveloper-sandbox-api.adobe.com/rest/v1/users/MAG123456789

Response

{
        "mage_id": "MAG123456789",
        "adobe_user_id": "ABC1234@AdobeID",
        "first_name": "John",
        "last_name": "Smith",
        "email": "jsmith@example.com",
        "screen_name": "Agent Smith",
        "has_completed_profile": true,
        "has_accepted_tos": true,
        "profile_image_artifact": {
            "file_upload_id": "5c119a03b4ddf6.75124444.0",
            "filename": "portrait.png",
            "content_type": "image/png",
            "url": "https://commercedeveloper-sandbox-static.adobe.com/user/68/f3/68f360d3516f594fc957c4179ed4a7a872911f07/pub/d9/c2/d9c23dd795a5faaab603b6b5965eca8a6d9430f2/portrait.png",
            "size": 1234,
            "file_hash": "d5db29cd03a2ed055086cef9c31c252b4587ffff",
            "malware_status": "pass"
        },

        "send_newsletter": true,
        "tos_accepted_version": "1.0",
        "tos_accepted_date": "2018-11-16 01:23:45",
        "is_company": false,
        "vendor_name": "johnsmith",
        "partner_level": 4,
        "locale": "en-US",
        "timezone": "UTC",
        "payment_type": 1,
        "payment_info": "{\"paypal_email\" : \"jsmith@example.com\"}",
        "taxpayer_type": 2,
        "tax_review_status": 3,
        "tax_withhold_percent": 25,
        "extension_share_percent": 85,
        "theme_share_percent": 85,
        "install_share_percent": 100,
        "support_share_percent": 100,
        "privacy_policy_url": "https://www.example.com/privacy",
        "api_callbacks": [
            {
                "name": "My 1st EQP Callback",
                "url": "https://developer.example.com/rest/v1/callback",
                "username": "key"
            }
        ],

        "personal_profile": {
            "bio": "Writes extensions that pass review first time. Blindfolded.",
            "last_logged_in": "2020-07-21 8:09:10",
            "created_at": "2018-10-01 14:04:59",
            "modified_at": "2020-03-14 01:23:45",
            "social_media_info": {
                "twitter": "@johnsmith",
                "stackexchange_url": "",
                "facebook_url": "",
                "linkedin_url": "",
                "github_username": ""
            },
            "addresses": [
                {
                    "address_key": 1,
                    "address_line_1": "123 Magento Way",
                    "state": "Texas",
                    "country": "USA",
                    "postal_code": "77777",
                    "phone": "555-123-4567",
                    "country_code": "+1",
                    "is_primary": true
                }
            ]
        },

        "company_profile": {
            "name": "Agent Smith Inc.",
            "bio": "Vendors of bespoke Magento Extensions.",
            "website_url": "https://www.example.com/",
            "primary_email": "jsmith@example.com",
            "support_email": "support@example.com",
            "created_at": "2018-10-01 14:04:59",
            "modified_at": "2019-12-25 01:23:45",
            "social_media_info": {
                "twitter": "@johnsmithinc",
                "stackexchange_url": "",
                "facebook_url": "",
                "linkedin_url": "",
                "github_username": ""
            },
            "addresses": [
                {
                    "address_key": 1,
                    "address_line_1": "123 Magento Way",
                    "state": "Texas",
                    "country": "USA",
                    "postal_code": "77777",
                    "phone": "555-123-4567",
                    "country_code": "+1",
                    "is_primary": true
                }
            ]
        },

        "organizations": [
           {
              "org_id": "000CBA111DCB222@AdobeOrg",
              "org_name": "My Fulfillment Service"
           }
        ]
}

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

data-slots=heading, code
data-repeat=2
data-languages=CURL, JSON

Request

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

Response

{
        "mage_id": "MAG123456789",
        "adobe_user_id": "ABC1234@AdobeID",
        "first_name": "John",
        "last_name": "Smith",
        "email": "jsmith@example.com",
        "screen_name": "Agent Smith",
        "has_completed_profile": true,
        "has_accepted_tos": true,
        "profile_image_artifact": {
            "file_upload_id": "5c119a03b4ddf6.75124444.0",
            "filename": "portrait.png",
            "content_type": "image.png",
            "url": "https://commercedeveloper-sandbox-static.adobe.com/user/68/f3/68f360d3516f594fc957c4179ed4a7a872911f07/pub/d9/c2/d9c23dd795a5faaab603b6b5965eca8a6d9430f2/portrait.png",
            "size": 1234,
            "file_hash": "d5db29cd03a2ed055086cef9c31c252b4587ffff",
            "malware_status": "pass"
        }
}

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.

PUT /rest/v1/users/:mage_id

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

{
  "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:

Request:

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.)

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.

GET /rest/v1/users/:mage_id/keys

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

Parameter
Type
Required
Description
type
string
no
Type of keys requested:<br/>m1 --- Magento 1 product keys<br/>m2 --- Magento 2 composer repo keys<br/>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:

data-slots=heading, code
data-repeat=2
data-languages=CURL, JSON

Request

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

Response

{
    "m2": [
            {
                "label": "main_key",
                "user_key": "d41d8cd98f00b204e9800998ecf8427e",
                "password_key": "12cbdcd3332eb8f166f62ee1a9bd33d0",
                "is_enabled": true,
                "uid": "MAG123456789"
            },
            {
                "label": "key_for_bob",
                "user_key": "4b335b25f8eb3449e7e222e8f9e052b0",
                "password_key": "9ca8abe7376f451bde40513474c13c3c",
                "is_enabled": false,
                "uid": "MAG123456789"
            },
            {
                "label": "Key for My Organization",
                "user_key": "784d67a640d0cc0e6381c7a24dc4132c",
                "password_key": "ae6569fd0e64a72b7f9f8e0396c372f0",
                "is_enabled": true,
                "uid": "000CBA111DCB222@AdobeOrg"
            }
        ],

    "m1": [
            {
                "product_name" : "acme/one-click-checkout-1.0.0",
                "product_key" : "https://connect20.magentocommerce.com/e8c258702e443c509b42fc44a49b83b0/acme+one-click-checkout-1.0.0"
            }
        ]
}

Magento 2 keys

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.

POST /rest/v1/users/:mage_id/keys
{
    "m2": [
        {
            "label": "key_for_alice"
        },
        {
            "label": "key_for_charlie",
            "uid": "MAG123456789"
        },
        {
            "label": "key_for_my_org",
            "uid": "000CBA111DCB222@AdobeOrg"
        }
    ]
}
data-slots=heading, code
data-repeat=2
data-languages=CURL, JSON

Request

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

Response

{
    "m2": [
            {
                "label": "key_for_alice",
                "user_key": "5c75f32248bdd335dc8d8d5a3e5cb52e",
                "password_key": "44db283cbb5fdf2c25cbc9352c2a75eb",
                "is_enabled": true,
                "uid": "MAG123456789",
                "code" : 200,
                "message" : "Success"
            },
            {
                "label": "key_for_charlie",
                "user_key": "19ba9488ff99a9346bdeb39ad4ab1a26",
                "password_key": "82167d38238911d212cc02a96f3f66f9",
                "is_enabled": true,
                "uid": "MAG123456789",
                "code" : 200,
                "message" : "Success"
            },
            {
                "label": "key_for_my_org",
                "user_key": "584d67a640d0cc0e6381c7a24dc4444d",
                "password_key": "5e6569fd0e64a72b7f9f8e0396c37222",
                "is_enabled": true,
                "uid": "000CBA111DCB222@AdobeOrg",
                "code" : 200,
                "message" : "Success"
            }
        ]
}

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.

PUT /rest/v1/users/:mage_id/keys/:url_encoded_label_of_m2_key
data-slots=heading, code
data-repeat=2
data-languages=CURL, JSON

Request

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

Response

{
    "m2": [
            {
                "label": "key_for_bob",
                "user_key": "4b335b25f8eb3449e7e222e8f9e052b0",
                "password_key": "9ca8abe7376f451bde40513474c13c3c",
                "is_enabled": true,
                "uid": "MAG123456789"
            }
     ]
}

Delete keys

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

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:

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.

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