> For the complete documentation index, see [llms.txt](https://viktor-derk.gitbook.io/woocommerce_react_native/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://viktor-derk.gitbook.io/woocommerce_react_native/custom-api.md).

# Custom API

You can use custom REST API for Woocommerce mobile app. Please replace these callbacks (info actual for release 1.4)

![](https://1401004667-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LfeX420KuhcT10nBM2K%2F-LmJPpgZlVQW_wIZLbtX%2F-LmJPsYNhP-o2jQOG80W%2Fbegin.gif?alt=media\&token=52b16caf-c476-4c98-8d40-017012c42532)

Replace init code in `App.js`

![](https://1401004667-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LfeX420KuhcT10nBM2K%2F-LmJFUwdpv1LRHA6a0WZ%2F-LmJH42p_07LDBKf4Cch%2Frest_init.png?alt=media\&token=c6a736f1-6c3e-4eb5-8be8-b0cba401fbec)

&#x20;Replace get categories list in `CategoryReducer.js`&#x20;

![](https://1401004667-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LfeX420KuhcT10nBM2K%2F-LmJFUwdpv1LRHA6a0WZ%2F-LmJI-Gr2QxOjC9o2vjq%2Frest_categories.png?alt=media\&token=e915790b-a2e2-4000-aeba-41dd558ea493)

Replace get products list in `ProductReducer.js`

![](https://1401004667-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LfeX420KuhcT10nBM2K%2F-LmJFUwdpv1LRHA6a0WZ%2F-LmJIYGrkeVuwAX_SwpZ%2Frest_get_products.png?alt=media\&token=1b118a2a-0dad-41aa-a95a-ad14fae78dc1)

Replace create order in `CheckoutRedux.js`

![](https://1401004667-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LfeX420KuhcT10nBM2K%2F-LmJFUwdpv1LRHA6a0WZ%2F-LmJIrcInxMkd4oKujNg%2Frest_create_order.png?alt=media\&token=540fb2bc-aeac-4331-9557-6e6d9e5ef3c1)

Replace get my order list in `MyOrderReducer.js`&#x20;

![](https://1401004667-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LfeX420KuhcT10nBM2K%2F-LmJFUwdpv1LRHA6a0WZ%2F-LmJJ9KIt17Dq_QQQL18%2Frest_get_my_order_list.png?alt=media\&token=d60cfe09-c4ab-48f0-97db-e43a1c821bfd)

Promoted list `PopularReducer.js` and Popular list `PopularReducer.js` are same.&#x20;

![](https://1401004667-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LfeX420KuhcT10nBM2K%2F-LmJFUwdpv1LRHA6a0WZ%2F-LmJJnjZFAsk-f4EO4_h%2Frest_popular.png?alt=media\&token=c32de70c-cb1e-4396-a877-05086efc0910)

![](https://1401004667-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LfeX420KuhcT10nBM2K%2F-LmJFUwdpv1LRHA6a0WZ%2F-LmJJqFmX_i3mv4FM7YY%2Frest_promoted.png?alt=media\&token=0197b5e0-07ea-4e73-b9c2-8f5ae8940c74)

Please note that you shoud return customer object on resister `RegisterScreen.js` and login `LoginScreen.js`

![](https://1401004667-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LfeX420KuhcT10nBM2K%2F-LmJFUwdpv1LRHA6a0WZ%2F-LmJKcDQ7Jfn9YVqxJox%2Frest_register.png?alt=media\&token=fe43dc3d-30af-4d1b-bdc3-a059eaa7db9f)

<div align="left"><img src="https://1401004667-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LfeX420KuhcT10nBM2K%2F-LmJFUwdpv1LRHA6a0WZ%2F-LmJKf5GxSM8A6CKci_1%2Frest_login.png?alt=media&amp;token=de3605fb-105c-4689-9c0f-f2812c2b9f8e" alt=""></div>

User managment without WordPress requred update `WPUserAPI.js` . Please replace these methods with your REST API calls:

![](https://1401004667-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LfeX420KuhcT10nBM2K%2F-LmJFUwdpv1LRHA6a0WZ%2F-LmJM4CsdivLsvTDiEuV%2Freset_wp_api.png?alt=media\&token=458404d8-04ab-4ba6-8fa2-ca748ae35226)

Done!

![](https://1401004667-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LfeX420KuhcT10nBM2K%2F-LmJOEXjOlyLLmJRuoIX%2F-LmJOK6H55ir69RVU-Vc%2Fdone.gif?alt=media\&token=f92a526e-740c-4a93-b46c-0ea71efcae4e)
