Testing the MarketMan Website API

Hi all, this is Adil a junior data analyst. I am working on the MarketMan API integration with the PowerBI. However, I am facing some issues regarding the documentation of the MarketMan API’s and run in the Postman. I am not getting the relevant API URLs so that I can do some analysis as required. If anyone kindly help me with this regard!

Thanks,
Adil



Please anyone help me to resolve this issue?

Hey @descent-module-adm14 :wave:

Is there a reason you’re using the OAuth2 helper with that request?

From the docs example, it looks like it uses a Request header called AUTH_TOKEN with the value being your token.

You could manually add that into the Request Headers section, not the Auth section, to try it out?

Like most people here, I don’t know that API so I’m just reading things from the images. Can you share the URL of those docs?

1 Like

Sure, I am sharing the link with you…

MarketMan API V3 Document

I’m not seeing where it mentions using OAuth 2.0 here.

In the documentation, you can copy the cURL example and paste that directly into the URL bar in Postman. This will create the request for you:

curl --location 'https://api.marketman.com/v3/buyers/sales/GetTransactions' \
--header 'AUTH_TOKEN: {{accessToken}}' \
--header 'Content-Type: application/json' \
--data '{
    "SaleSummaryID": 17226984,
    "Take": 100,
    "Skip" : 100,
    "BuyerGuid": "{{buyerGuid}}"
}'

In the Headers section, replace the {{accessToken}} value with your token token that you obtained via the /GetToken route:

I would recommend storing that as a variable so that it can be easily used in other requests.

1 Like

Her is the Outh:2.0 besides Authorization. Yes I did the steps you just described but still it gives me an error!

I would appreciate if we schedule a meeting for 15 minutes from your precious schedules.

Did you try this request:

curl --location 'https://api.marketman.com/v3/buyers/sales/GetTransactions' \
--header 'AUTH_TOKEN: {{accessToken}}' \
--header 'Content-Type: application/json' \
--data '{
    "SaleSummaryID": 17226984,
    "Take": 100,
    "Skip" : 100,
    "BuyerGuid": "{{buyerGuid}}"
}'

And add your token value to the request header?


If you haven’t created a token yet, it’s not going to work. There isn’t anything that I can do to make this work for you, without a valid token.

I don’t know that API so all i’m doing is reading the documentation that you have shared.


Do you have an account on here: https://www.marketman.com/ - I’m guessing you need that in order to POST the request to get your token:

Use you API Partner key and password to get the access token.

curl --location 'https://api.marketman.com/v3/buyers/auth/GetToken' \
--header 'Content-Type: application/json' \
--data '{
	"APIKey":"{{apiKey}}",
	"APIPassword":"{{apiPassword}}"
}'
1 Like

The error you provided in your last screenshot is telling you what is wrong.

You somehow have setup the auth request as a “GET” request, when it needs to be a POST.

The documentation is created using Postman.

All you should need to do is click on the “Run in Postman” button at the top of the page which will allow you to fork the collection which includes example requests for all of the methods, including the authentication.

image

All you then need to do is fill in the Postman variables as it explains in the documentation.

image

1 Like

I got it now, I will try it out, and thanks for having time from your precious schedules. That means a lot

After Posting the request I can request the get method or not?

You would use a POST that endpoint with your APIKey and APIPassword in the body, that would return your token in the response body, if the request is successful.

That token value is then used in the Request Headers of the other requests.

1 Like

I used the token but still not working for me !

I removed your image because it showed all of your API Key and password details. Please, mask or hide values like that when sharing images.

From what I saw, that was a successful request and returned a token value in the response body.

What’s not working what you use that token in the requests?

Only you can see what’s in front of you so you need to either explain things in much more detail or share images with the sensitive values masked.

1 Like

over here I have to ask for the buyer ID from the manager right then I can access the post data and can get as well then after ?


The Data I want to get after posting … which Post methods helps me with this data as I have to make a reports on daily basis.

Does that request work and return a response?

I don’t know what that does, I’ve never used it before. If you’re able to get a request to the API working in Postman, that’s as far as I can really take you.

As per what you’re looking to do with that API, I can’t help you with that.

1 Like

I am waiting for the Managers response, as he sende me the Buyers guide, I will try again and let you know.

Hi Danny, I hope this message find you in a good mood.
Danny, I did all the steps and got the data, but I am getting wrong data with the APIs?

image

I crossed check and per item count price for that day is 1.58, hence with 7.91. but here in the above API data shows 5 with 7.91?

If you have the request to the API working from Postman, that’s as far as I can help here.

In terms of the response and data coming back from that API, it’s nothing that Postman has any say in so you’d need to reach out someone on the MarketMan side.