/
ERP Integration via REST APIs

ERP Integration via REST APIs

What is the purpose of this documentation?

The ERP Integration is being done by updates sent via FTP file posting (sale order exports). We are creating this documentation to provide a REST API solution to client which can opt to integrate using REST APIs.

Internal working of the API.

  • HTTP Method: GET

  • API Path: https://{{workspace}}.{{envBasedDomain}}/api/v1/orders/erp

  • AUTHORIZATION: Bearer type JWT.

  • PARAMS (regulation that the params must follow UTF-8 URL Encoding standards).

    • fields: {{Comma separated list of attributes to retrieve}}.

    • search: Search by keyword.

    • filters: Data fetched based on filters.

    • page: Integer value denoting the batch count.

    • per_page: Integer value denoting batch size of items to be retrieved.

  • FILTERS SUGGESTED

    • ready to ship on

    • return item condition and return completed on.

Steps to fetch orders.

The order fetch data source for the REST API will be Algolia.

Block logic.

Based on the input params of the GET request, we will be using the Algolia Browse API to fetch the data based on ‘search' and 'filters’. Algolia send the response of browser API based on iterator concept (gets a single object matching the request, as long as we iterate in loop).

NOTE: Java Algolia libraries have a limitation on the Browse API, where page and per_page doesn't work as it does in Search API.
NOTE: Algolia Browse API is used here instead of Search API because the later has a cost implementation.

Based on page, per_page logic, the API will iterate one loop ahead to check whether there are objects of the matching params. If so, the 'hasNext' key will be set as true, else false.

Add label

Related content