API reference

Account

The Red Hat Marketplace Account API provides an interface to manage account profiles.

Open specifications

Fetch accounts

get

/account/api/v1/accounts

Get a list of accounts by specifying at least one query parameter

URL parameters

_id

string

optional

identifier of account to fetch


billingAccountId

string

optional

billingAccount identifier of account(s) to fetch, use comma delimited for multiple (eg. billingAccountId=123,321)


skip

number

optional

number of records to skip in results


limit

number

optional

number of records to show in results (max 100)


name

string

optional

company name of account to fetch


includeNestedLevel

number

optional

level of user details to fetch (eg. includeNestedLevel=1 for user role, includeNestedLevel=2 for detailed user data)

Body parameters

No parameters.

GET /account/api/v1/accountsCURL
curl --location --request GET '/account/api/v1/accounts?5ee98dd2790490b6281a2402 \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ACCESS_TOKEN' \
Success responses

HTTP status 202

The message was understood and all events were accepted. The result of the processing is determined by the returned content.


totalResults

number

optional

Total accounts returned


OMAccounts

array

optional

An array of matching accounts

  • _id

    string

    optional

    ID of the account record


    name

    string

    optional

    Company name of the account


    isCompany

    boolean

    optional

    True if a company account


    billingAccountId

    string

    optional

    Billing account ID of the account


    billingAddress

    object

    optional

    Billing address of the account

    • companyName

      string

      optional

      Name of the company


      firstName

      string

      optional

      First name of the billing address


      lastName

      string

      optional

      Last name of the billing address


      address1

      string

      optional

      Address line 1 of the billing address


      address2

      string

      optional

      Address line 2 of the billing address


      city

      string

      optional

      City of the billing address


      stateProvince

      string

      optional

      State/Province of the billing address


      postalCode

      string

      optional

      Postal/Zip code of the billing address


      phoneNumber

      string

      optional

      Phone number of the billing address


      countryCode

      string

      optional

      Country code of the billing address


    vatNumber

    string

    optional

    VAT number of the account


    taxCode

    string

    optional

    Tax code of the account


    status

    string

    optional

    Status of the account

    • PENDING
      ACTIVE
      SUSPENDED

    vendorStatus

    string

    optional

    Status of the vendor account

    • PENDING
      ACTIVE
      SUSPENDED

    billingAccountRefs

    object

    optional

    Billing references of the account

    • zuoraAccountId

      string

      optional

      Reference to zuora account ID


      sapSiteNumber

      string

      optional

      Reference to SAP site number


      ibmCustomerNumber

      string

      optional

      Reference to IBM customer number (ICN)


      mppNumber

      string

      optional

      Reference to MPP number


    isCustomer

    boolean

    optional

    True if account is type customer


    isVendor

    boolean

    optional

    True if account is type vendor


    partnerConnectId

    string

    optional

    Partner connect ID of the account


    accountRHIdLink

    string

    optional

    Red Hat ID linked to the account


    loginRHIdLink

    string

    optional

    Red Hat login linked to the account


    companyRef

    string

    optional

    Reference to the ID record of the corresponding company for the account


    vendorAccount

    object

    optional

    Vendor details if a vendor account

    • addressVerified

      boolean

      optional

      True if address is verified


      vendorLegalAddress

      object

      optional

      The legal address for the vendor account

      • companyName

        string

        optional

        Name of the company


        firstName

        string

        optional

        First name of the vendor legal address


        lastName

        string

        optional

        Last name of the vendor legal address


        address1

        string

        optional

        Address line 1 of the vendor legal address


        address2

        string

        optional

        Address line 2 of the vendor legal address


        city

        string

        optional

        City of the vendor legal address


        stateProvince

        string

        optional

        State/Province of the vendor legal address


        postalCode

        string

        optional

        Postal/Zip code of the vendor legal address


        phoneNumber

        string

        optional

        Phone number of the vendor legal address


        countryCode

        string

        optional

        Country code of the vendor legal address


      vatNumber

      string

      optional

      VAT number for the vendor account


      taxCode

      string

      optional

      Tax code for the vendor account


      vendorType

      string

      optional

      Type of the vendor, can be IBM or ISV

      • IBM
        ISV

    bssAccountId

    string

    optional

    BSS account ID of the account


    createdAt

    string

    optional

    Created at timestamp of the account


    paymentInfo

    array

    optional

    An array of payment information objects.

    • _id

      string

      optional

      ID of the payment record


      type

      string

      optional

      Type of payment - can be Invoice or Credit Card


      isDefault

      boolean

      optional

      True if this is the default payment method


      cardType

      string

      optional

      Type of credit card


      scrambledNumber

      string

      optional

      Masked credit card number showing last 4 digits only


      expiryDate

      string

      optional

      Expiry date MMYY of credit card


      customerNumber

      string

      optional

      Customer number for Invoice payment method


      poNumber

      string

      optional

      PO number for Invoice payment method


      verified

      boolean

      optional

      True if payment method has been verified


      walletId

      string

      optional

      Wallet ID corresponding to the payment method


      accountId

      string

      optional

      Account ID corresponding to the payment method


    accountCreationStatus

    object

    optional

    Creation status of the account

    • _id

      string

      optional

      ID of the account create record


      accountId

      string

      optional

      The account ID for the account


      updatedOn

      string

      optional

      Last update timestamp of the account


      lastProcessingAttempt

      string

      optional

      Last processing attempt of the account


      stuckAlert

      boolean

      optional

      Flag for stuck account


      zuora

      boolean

      optional

      Flag for zuora account


      customerCreate

      boolean

      optional

      Flag for customer create account


      icn

      boolean

      optional

      Flag for ICN


      orderContainer

      boolean

      optional

      Flag for order container


    OMRoles

    array

    optional

    Roles of the users of the account

    • userId

      string

      optional

      The ID of the user record, only shown when includeNestedLevel=1


      roleName

      string

      optional

      The role of the user

      • AccountOwner
        AccountMember
        AccountAdmin
        ClusterAdmin
        Purchaser
        VendorProductAdmin
        VendorSalesAdmin
        VendorLegalAdmin
        Partner

      OMUser

      object

      optional

      Details of the user, only shown when includeNestedLevel=2

      • _id

        string

        optional

        The ID of the user record


        iamId

        string

        optional

        Cloud IAM ID of the user


        emailAddress

        string

        optional

        Email address of the user


        firstName

        string

        optional

        First name of the user


        lastName

        string

        optional

        Last name of the user


        preferredLanguage

        string

        optional

        Preferred language of the user


    enterpriseMarketplace

    object

    optional

    Details of the enterprise marketplace account

    • name

      string

      optional

      Display name of the EM enabled account


      theme

      object

      optional

      Theme details of the EM enabled account

      • primary

        string

        optional

        Primary background color (in hex) for the EM enabled account


        secondary

        string

        optional

        Generated gradient background color (in hex) for the EM enabled account


        fontColor

        string

        optional

        Generated font color (in hex) for the EM enabled account


      enabled

      boolean

      optional

      True if EM account is enabled


    isTaxExempt

    boolean

    optional

    True if account is tax exempt

Response example
{
"totalResults": 1,
"OMAccounts": [
{
"_id": "5ee98dd2790490b6281a2402",
"name": "ABC Account",
"isCompany": true,
"billingAccountId": "ACCT000004261",
"billingAddress": {
"companyName": "ABC Test Company",
"firstName": "John",
"lastName": "Doe",
"address1": "123 Test Street",
"address2": "Suite 456",
"city": "New York",
"stateProvince": "New York",
"postalCode": "10001",
"phoneNumber": "(123)4567890",
"countryCode": "US"
},
"vatNumber": "12345",
"taxCode": "123",
"status": "PENDING",
"vendorStatus": "PENDING",
"billingAccountRefs": {
"zuoraAccountId": "2c92c0fb72e0de460172f21985ae6d5a",
"sapSiteNumber": "0004134380",
"ibmCustomerNumber": "1990789",
"mppNumber": "0198098765"
},
"isCustomer": true,
"isVendor": true,
"partnerConnectId": "12345",
"accountRHIdLink": "13337759",
"loginRHIdLink": "redHatuserLogin",
"companyRef": "5ee39b052ea9a08821470e4a",
"vendorAccount": {
"addressVerified": true,
"vendorLegalAddress": {
"companyName": "ABC Vendor Company",
"firstName": "Jane",
"lastName": "Doe",
"address1": "123 Test Street",
"address2": "Suite 456",
"city": "New York",
"stateProvince": "New York",
"postalCode": "10001",
"phoneNumber": "(123)4567890",
"countryCode": "US"
},
"vatNumber": "12345",
"taxCode": "123",
"vendorType": "IBM"
},
"bssAccountId": "OMP-2f88191ae209449aae23884437c8c36b",
"createdAt": "2020-06-17T03:28:18.050Z",
"paymentInfo": [
{
"_id": "5f982c6b7fb6b5e2d31214ee",
"type": "CREDIT_CARD",
"isDefault": true,
"cardType": "VISA",
"scrambledNumber": "****1234",
"expiryDate": "1123",
"verified": true,
"walletId": "61ef13f0185f11eb8d4b35c4e7bebf44",
"accountId": "5f982b957fb6b5e2d31214eb"
},
{
"_id": "5f99f2aa7fb6b5e2d31214f6",
"type": "CREDIT_CARD",
"isDefault": false,
"cardType": "MASTERCARD",
"scrambledNumber": "****1111",
"expiryDate": "0123",
"walletId": "61ef13f0185f11eb8d4b35c4e7bebf44",
"accountId": "5f982b957fb6b5e2d31214eb"
}
],
"accountCreationStatus": {
"_id": "2c92c0fb72e0de460172f21985ae6d5a",
"accountId": "5ee98dd2790490b6281a2402",
"updatedOn": "2020-06-17T03:28:18.050Z",
"lastProcessingAttempt": "2020-06-17T03:28:18.050Z",
"stuckAlert": false,
"zuora": true,
"customerCreate": true,
"icn": true,
"orderContainer": true
},
"OMRoles": [
{
"roleName": "AccountOwner",
"OMUser": {
"_id": "5f7dcdce501cf8bcadc40c54",
"iamId": "IBMid-55000950RA",
"emailAddress": "test@mail.test.ibm.com",
"firstName": "Userfirstname",
"lastName": "Userlastname",
"preferredLanguage": "en-us"
}
},
{
"roleName": "AccountMember",
"OMUser": {
"_id": "5f7de18b501cf8bcadc40c56",
"iamId": "IBMid-55000951R4",
"emailAddress": "test1@mail.test.ibm.com",
"firstName": "Userfirstname1",
"lastName": "Userlastname1",
"preferredLanguage": "en-us"
}
}
],
"enterpriseMarketplace": {
"name": "ABC Test Company",
"theme": {
"primary": "#ABC123",
"secondary": "#321DEF",
"fontColor": "#000000"
},
"enabled": true
},
"isTaxExempt": false
}
]
}
Error response

HTTP status default

Any unrecoverable failure, the platform will give up sending the event


No error response parameters.

Commerce

The Red Hat Marketplace Commerce API provides an interface to access product edition data and units of measure.

Open specifications

Fetch all units of measure

get

/commerce/api/v2/uoms

Get all units of measure

URL parameters

locale

string

optional

Locale code to return translation for (default en-us)

Body parameters

No parameters.

GET /commerce/api/v2/uomsCURL
curl --location --request GET '/commerce/api/v2/uoms' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ACCESS_TOKEN' \
Success responses

HTTP status 200

List of units of measure


identifier

string

required

Unique identifier


multiplier

number

required

Unit multiplier


supportUsageChargeType

boolean

required

True if this UOM supports usage charges


translations

object

optional

Locale specific text values for UOM

  • de

    object

    optional

    Translations

    • singularName

      string

      required

      Singular name


      pluralName

      string

      required

      Plural name


      suffix

      string

      required

      Suffix


      inputLabel

      string

      required

      Input label


      summaryLabel

      string

      required

      Summary label


    en

    object

    optional

    Translations

    • singularName

      string

      required

      Singular name


      pluralName

      string

      required

      Plural name


      suffix

      string

      required

      Suffix


      inputLabel

      string

      required

      Input label


      summaryLabel

      string

      required

      Summary label


    es

    object

    optional

    Translations

    • singularName

      string

      required

      Singular name


      pluralName

      string

      required

      Plural name


      suffix

      string

      required

      Suffix


      inputLabel

      string

      required

      Input label


      summaryLabel

      string

      required

      Summary label


    fr

    object

    optional

    Translations

    • singularName

      string

      required

      Singular name


      pluralName

      string

      required

      Plural name


      suffix

      string

      required

      Suffix


      inputLabel

      string

      required

      Input label


      summaryLabel

      string

      required

      Summary label


    it

    object

    optional

    Translations

    • singularName

      string

      required

      Singular name


      pluralName

      string

      required

      Plural name


      suffix

      string

      required

      Suffix


      inputLabel

      string

      required

      Input label


      summaryLabel

      string

      required

      Summary label


created

number

required

Unix timestamp of creation


updated

number

required

Unix timestamp of last update

Response example
[
{
"identifier": "ActiveUser",
"multiplier": 1,
"created": 1583808165047,
"updated": 1583808165047,
"supportUsageChargeType": false,
"singularName": "Active User",
"pluralName": "Active Users",
"suffix": "per active user",
"inputLabel": "Enter number of active users",
"summaryLabel": "Number of active users"
},
{
"identifier": "Agent",
"multiplier": 1,
"created": 1593701055699,
"updated": 1593701055699,
"supportUsageChargeType": false,
"singularName": "Agent",
"pluralName": "Agents",
"suffix": "per agent",
"inputLabel": "Enter number of agents",
"summaryLabel": "Number of agents"
},
{
"identifier": "ApplicationInstance",
"multiplier": 1,
"created": 1583808165879,
"updated": 1583808165879,
"supportUsageChargeType": false,
"singularName": "Application Instance",
"pluralName": "Application Instances",
"suffix": "per application instance",
"inputLabel": "Enter number of application instances",
"summaryLabel": "Number of application instances"
}
]
Error response

HTTP status default


No error response parameters.

Fetch unit of measure

get

/commerce/api/v2/uoms/{identifier}

Get unit of measure

URL parameters

identifier

string

required

UOM identifier of entity to return


locale

string

optional

Locale code to return translation for (default en-us)

Body parameters

No parameters.

GET /commerce/api/v2/uoms/{identifier}CURL
curl --location --request GET '/commerce/api/v2/uoms/Asset' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ACCESS_TOKEN' \
Success responses

HTTP status 200

Unit of Measure


identifier

string

required

Unique identifier


multiplier

number

required

Unit multiplier


supportUsageChargeType

boolean

required

True if this UOM supports usage charges


translations

object

optional

Locale specific text values for UOM

  • de

    object

    optional

    Translations

    • singularName

      string

      required

      Singular name


      pluralName

      string

      required

      Plural name


      suffix

      string

      required

      Suffix


      inputLabel

      string

      required

      Input label


      summaryLabel

      string

      required

      Summary label


    en

    object

    optional

    Translations

    • singularName

      string

      required

      Singular name


      pluralName

      string

      required

      Plural name


      suffix

      string

      required

      Suffix


      inputLabel