cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing API with B1if

Former Member
0 Kudos

Hi Experts,

I am attempting to make basic API calls to Magento API using REST protocol through B1if. I have tried a couple of ways from previously attended B1if training but don’t seem to be getting anywhere.

This is what I have done so far:

1.     Created HTTP SLD connected successfully to Magento using basic authentication.

2.     Scenario Step to make REST calls to Magento API to get list of customers. (not yet working)

3.     Scenario Step to INSERT customer details in B1. (not yet working)

I am trying to establish basic communication.  In my training (By Yatsea Li), we passed our parameters through the URL (using POST) and into B1 to add a new BP. But now I am doing the opposite. I want to make a REST API call from B1if to fetch customers from Magento and push them into SAP.

I’m not sure what to use as inbound and outbound.  Can spomeone please point me in the right direction?

I am after a simple way to generate API XML calls through B1if.  Once I am able to do a proof-of-concept with Magento, I will move on to eBay.

Thank you!

Ray Mirza.

SAP Business One Consultant

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Ray,

From my point of view you should use the "Void (Time Triggered)" as inbound and outbound.

Best practice from SAP is that you should use a B1 Object Call to insert/update the business partners in SBO because it's much faster.

What you could do is each time the step get's triggered, is to retrieve a list of the magento customers by using this:

http://www.magentocommerce.com/api/soap/customer/customer.list.html

Then create a query to compare the existing customers with the customers in SBO and then create the customers that are not in the SBO Database. You can retrieve the customer details by using:

http://www.magentocommerce.com/api/soap/customer/customer.info.html

If you have any questings, don't hesitate to ask..

Kind Regards,

Jeroen

Former Member
0 Kudos

Hi Ray, I'm also trying to make some scenario's were I have to create some web services on B1if that deal with a REST call e JSON Payload, do you have any example on how to do this? So far I only found help with SOAP/XML but I really need to use REST/JSON.

Thank you.

Silvio Canha