MCM Sandbox
There are test-able endpoints for those interested in testing and experiencing the Moloco Commerce Media APIs. We currently support the following APIs, and they are enabled with a “Try it” button like the below screenshot on their respective pages:
The following APIs have usable Try it! buttons
Decision API:
Event API
Pressing the "Try-it!" button will send the request to Moloco MCM sandbox services that have been setup for specifically handling example requests, a response from sandbox services will be populated onto the page.
Usage
Use the below information and values in setting up requests to the Moloco MCM Sandbox
Field | Available Values | Comments |
---|---|---|
platform_id | SANDBOX | |
inventory | for field values see next row | for decision requests, this object must be created |
inventory_id | Main-test, HOME, home_auction | Main-test and HOME are for recommendation api (DecideAdItems), home_auction is for auction api (DecideAdCreative/Bulk) |
You will need an authorization API key, which can be provided by your Moloco representative. If you are not already in contact with a Moloco representative, you can fill out the form here: select 'Commerce Platform: interested in retail media platforms' and mention 'requesting Sandbox access' in the body and we will get back to you.
Once you receive the key, it will be put in the authorization header box, pictured below.
Walkthrough & Examples
To walkthrough an example, input the following infromation into the indicated sections to receive a response on DecideAdItems
Path Parameters
platform_id : SANDBOX
Body parameters
request_id : any valid input, required but is client created, example abc
session_id : any valid input, not required, but is client created, example abc
user : a user object or device object is required for a DecideAdItems request, for this example click the plus symbol '+' on the right hand side of the "USER OBJECT" box to create a user.
- user_id, year_of_birth : any valid input, example
abc
for user_id and2000
for year_of_birth
inventory : required to be created, like the user object click the plus symbol '+' to create the object
- inventory_id : for this example we'll use
Main-test
, this is a required field - num_items: we'll use
1
for this example
Having followed all of those steps should create the following request:
curl --request POST \
--url https://sandbox-dcsn.mcm-api.moloco.com/rmp/decision/v1/platforms/SANDBOX/auction \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-api-key: OMITTED FROM EXAMPLE' \
--data '
{
"user": {
"gender": "UNKNOWN_GENDER",
"user_id": "abc",
"year_of_birth": 2000
},
"inventory": {
"inventory_id": "Main-test",
"num_items": 1
},
"request_id": "abc",
"session_id": "abc"
}
'
and after clicking the Try it! button, the following response was received.
{
"request_id": "abc",
"decided_items": [
{
"item_id": "1099",
"auction_result": {
"ad_account_id": "10016",
"campaign_id": "p1oursOJtY0K6nSY",
"win_price": {
"currency": "USD",
"amount_micro": "280000"
}
},
"imp_trackers": [
"https://sandbox-evt.mcm-api.moloco.com/t/i/SANDBOX?source=2X2GlM9XAjX068GppSMbezYn2I840P4W79eRd9oRd1aScPYpCPiocHan6fkPcR6Q6R4O6x8o7B2RcPgoc1YOcR4Q79cQ6x6Scx4S6Pkp71WOcfoPCHYOd0nWn4BN0n01502-4WGnC3av"
],
"click_trackers": [
"https://sandbox-evt.mcm-api.moloco.com/t/c/SANDBOX?source=2X2GlM9XAjX068GppSMbezYn2I840P4W79eRd9oRd1aScPYpCPiocHan6fkPcR6Q6R4O6x8o7B2RcPgoc1YOcR4Q79cQ6x6Scx4S6Pkp71WOcfoPCHYOd0nWn4BN0n01502-4WGnC3av"
],
"track_id": "2X2GlM9XAjX068GppSMbezYn2I840P4W79eRd9oRd1aScPYpCPiocHan6fkPcR6Q6R4O6x8o7B2RcPgoc1YOcR4Q79cQ6x6Scx4S6Pkp71WOcfoPCHYOd0nWn4BN0n01502-4WGnC3av"
}
]
}
Examples of the other APIs can be found at the end of this document.
Using Filters
Currently, there are two items from the catalog that campaigns have available for responses. The categorical information of these two items are as follows
item_id | category (can be a list of strings, in this case it is just a single string) |
---|---|
1086 | “Beauty>Makeup>Eye Makeup>Mascara” |
1099 | “Beauty>Makeup>Face>Face Primer” |
There is no location or brand information associated with these entries.
Here is an example of filtering based off this information in a DecideAdItems request:
curl --request POST \
--url https://sandbox-dcsn.mcm-api.moloco.com/rmp/decision/v1/platforms/SANDBOX/auction \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-api-key: OMITTED FROM EXAMPLE' \
--data'
{
"user": {
"gender": "UNKNOWN_GENDER",
"user_id": "abc",
"year_of_birth": 2000
},
"inventory": {
"inventory_id": "HOME",
"num_items": 1
},
"filtering": {
"category": {
"operator": "AND",
"categories": [
"Beauty>Makeup>Face>Face Primer"
]
}
},
"request_id": "abc",
"session_id": "abc"
}
'
And the response, note that it returns the expected associated item with "Beauty>Makeup>Face>Face Primer" category
{
"request_id": "abc",
"decided_items": [
{
"item_id": "1099",
"auction_result": {
"ad_account_id": "10016",
"campaign_id": "p1oursOJtY0K6nSY",
"win_price": {
"currency": "USD",
"amount_micro": "750000"
}
},
"imp_trackers": [
"https://sandbox-evt.mcm-api.moloco.com/t/i/SANDBOX?source=2X2Dx8Mqzh0XB5i6ci1cxMJt2I840P4W79eRd9oRd1aScPYpCPiocHan6fkPcR6Q6R4O6x8o7B2RcPgoc1YOcR4Q79cQ6x6Scx4S6Pkp71WOcfoPCHYOd0nmIKVN0n01502-4WGnC3av"
],
"click_trackers": [
"https://sandbox-evt.mcm-api.moloco.com/t/c/SANDBOX?source=2X2Dx8Mqzh0XB5i6ci1cxMJt2I840P4W79eRd9oRd1aScPYpCPiocHan6fkPcR6Q6R4O6x8o7B2RcPgoc1YOcR4Q79cQ6x6Scx4S6Pkp71WOcfoPCHYOd0nmIKVN0n01502-4WGnC3av"
],
"track_id": "2X2Dx8Mqzh0XB5i6ci1cxMJt2I840P4W79eRd9oRd1aScPYpCPiocHan6fkPcR6Q6R4O6x8o7B2RcPgoc1YOcR4Q79cQ6x6Scx4S6Pkp71WOcfoPCHYOd0nmIKVN0n01502-4WGnC3av"
}
]
}
Other examples
PostUserEventExample
curl --request POST \
--url https://sandbox-evt.mcm-api.moloco.com/rmp/event/v1/platforms/SANDBOX/userevents \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-api-key: OMITTED FROM EXAMPLE' \
--data '
{
"event_type": "SEARCH",
"channel_type": "SITE",
"revenue": {
"currency": "USD",
"amount": 1
},
"shipping_charge": {
"currency": "USD",
"amount": 1
},
"id": "abc",
"timestamp": "1707165409000",
"user_id": "abc",
"search_query": "example search"
}
'
Which has the following (expected) response:
{}
DecideAdCreative Example
curl --request POST \
--url https://sandbox-dcsn.mcm-api.moloco.com/rmp/decision/v1/platforms/SANDBOX/creative-auction \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-api-key: OMITTED FROM EXAMPLE' \
--data '
{
"user": {
"gender": "UNKNOWN_GENDER",
"user_id": "abc",
"year_of_birth": 2000
},
"inventory": {
"inventory_id": "home_auction"
},
"request_id": "abc",
"session_id": "abc"
}
'
{
"request_id": "abc",
"auction_result": {
"ad_account_id": "10016",
"campaign_id": "MMxM7yXintVyzBl7",
"win_price": {
"currency": "USD",
"amount_micro": "1320"
}
},
"banner": {
"creative_id": "ZfM0CNNRLqjtzDx5",
"image_url": "https://rmp-cdn.moloco.com/platform/MOLOCO_SHOP_DEMO/images/llzjhneu_pglevo9.jpeg",
"imp_trackers": [
"https://sandbox-evt.mcm-api.moloco.com/t/i/SANDBOX?source=2X353g2kdj16f9zZglLoMp1A2I840P4W79eRd9oRd1aScPYpCPiocHan6fkPcR6Q6R4O6x8o7B2RcPgoc1YOcR4Q79cQ6x6Scx4S6Pkp71WOcfoPCHYOd0nQyoBhWOW0oW1"
],
"click_trackers": [
"https://sandbox-evt.mcm-api.moloco.com/t/c/SANDBOX?source=2X353g2kdj16f9zZglLoMp1A2I840P4W79eRd9oRd1aScPYpCPiocHan6fkPcR6Q6R4O6x8o7B2RcPgoc1YOcR4Q79cQ6x6Scx4S6Pkp71WOcfoPCHYOd0nQyoBhWOW0oW1"
]
},
"items": [
{
"item_id": "1099",
"imp_trackers": [
"https://sandbox-evt.mcm-api.moloco.com/t/i/SANDBOX?source=2X353g2kdj16f9zZglLoMp1A2I840P4W79eRd9oRd1aScPYpCPiocHan6fkPcR6Q6R4O6x8o7B2RcPgoc1YOcR4Q79cQ6x6Scx4S6Pkp71WOcfoPCHYOd0nQyoBhWOW0oW1-4WGnC3av"
],
"click_trackers": [
"https://sandbox-evt.mcm-api.moloco.com/t/c/SANDBOX?source=2X353g2kdj16f9zZglLoMp1A2I840P4W79eRd9oRd1aScPYpCPiocHan6fkPcR6Q6R4O6x8o7B2RcPgoc1YOcR4Q79cQ6x6Scx4S6Pkp71WOcfoPCHYOd0nQyoBhWOW0oW1-4WGnC3av"
]
},
{
"item_id": "1086",
"imp_trackers": [
"https://sandbox-evt.mcm-api.moloco.com/t/i/SANDBOX?source=2X353g2kdj16f9zZglLoMp1A2I840P4W79eRd9oRd1aScPYpCPiocHan6fkPcR6Q6R4O6x8o7B2RcPgoc1YOcR4Q79cQ6x6Scx4S6Pkp71WOcfoPCHYOd0nQyoBhWOW0oW1-204I134mE3O"
],
"click_trackers": [
"https://sandbox-evt.mcm-api.moloco.com/t/c/SANDBOX?source=2X353g2kdj16f9zZglLoMp1A2I840P4W79eRd9oRd1aScPYpCPiocHan6fkPcR6Q6R4O6x8o7B2RcPgoc1YOcR4Q79cQ6x6Scx4S6Pkp71WOcfoPCHYOd0nQyoBhWOW0oW1-204I134mE3O"
]
}
],
"landing_url": null
}
Updated 7 months ago