Skip to end of banner
Go to start of banner

Magento Integration

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 3 Next »

This document has details of all the functionalities and the APIs integrated with MAGENTO.

The current version of Magento supported is 2.4 and above

https://magento.redoc.ly/

Magento APIs

Below tables shows all the APIs used to develop this integration provided by Magento Portal.

Increff Omni Flow

Channel API endpoints

Magento API's Understanding

1

Get List of Orders

/rest/default/V1/orders

Lists orders that match specified search criteria.(based on filters for status and created_at time)

2

Get an Order

/rest/default/V1/orders/{orderId}

Get order details for an order id

3

Get Order status

/rest/default/V1/orders/{id}/statuses

Get status of a specific order

4

Get Canceled orders List

/rest/default/V1/orders

Lists orders that match specified search criteria.(based on filters for status and updated_at time

5

Order Acknowledgment

rest/default/V1/orders/orders/{orderId}/comments

Change order status to processing as an acknowledgement of order received

6

Cancel order

/rest/default/V1/orders/{orderId}/cancel

Cancels a specified order.

7

Create Shipment

/rest/default/V1/shipment/

Performs persist operations for a specified shipment.

8

Create Invoice

/rest/default/V1/order/{orderId}/invoice

Create invoice on magento

9

Get Invoice

/rest/default/V1/invoices

Get invoice details from magento based on the filter of order id

10

Get Shipment

/rest/default/V1/shipment/{shipmentId}

Get shipping label

11

Create Manifest

NA

No call to channel. Increff Omni internally creates the Manifest

12

Get Manifest

NA

No call to channel. Increff Omni internally generates the Manifest

13

Update Inventory

/rest/default/V1/products/{productSku}/stockItems/{itemId}

Update the inventory of a specific sku

14

Credential Api

/rest/V1/integration/admin/token

Get access token

15

Return Orders

NA

No call to channel

16

Handover Orders

/rest/default/V1/order/{orderId}/ship

The order is handed over to the delivery partner marking the order complete at magento panel

API Flow

Fetch Order

Magento API Endpoint - /rest/default/V1/orders

Http Method - GET

Description

Lists orders that match specified search criteria. This call returns an array of objects.

Order fetch is done based on search criteria with filters on fields, status and created_at time.These statuses are the order status when the order is created.

  • The items to be synced should have the product_type as simple.

  • The field method under payment should be cashondelivery for COD orders.

  • The increament_id will be used as the parent order id(will be displayed on invoice and shipping label) whereas, the internal order id(used to fetch order) will be used as the channel order id.

Request Params

Name

Type

Mandatory

Comments

searchCriteria[filterGroups][0][filters][0][conditionType]

String

yes

The type of condition on the filter on which we fetch the ordersPossible value: eq,gt

searchCriteria[filterGroups][0][filters][0][field]

String

yes

The filter field on which we fetch ordersPossible value: status,created_at

searchCriteria[filterGroups][0][filters][0][value]

String

yes

The value of the filter on the condition type upon which we filter the ordersPossible values: pending,processing,cod_pending,2021-10-11 00:25:48

Response

{
  "items": [
    {
      "base_currency_code": "INR",
      "base_discount_amount": 10.0,
      "base_shipping_amount": 50.0,
      "created_at": "2022-02-17 07:24:49",
      "discount_amount": 0,
      "entity_id": 11254,
      "grand_total": 25980.0,
      "discount_tax_compensation_amount": 0,
      "increment_id": "M000013856",
      "shipping_amount": 0,
      "status": "string",
      "subtotal": 0,
      "subtotal_canceled": 0,
      "subtotal_incl_tax": 0,
      "subtotal_invoiced": 0,
      "subtotal_refunded": 0,
      "tax_amount": 0,
      "tax_canceled": 0,
      "tax_invoiced": 0,
      "tax_refunded": 0,
      "total_canceled": 0,
      "total_due": 0,
      "total_invoiced": 0,
      "total_item_count": 0,
      "total_offline_refunded": 0,
      "total_online_refunded": 0,
      "total_paid": 0,
      "total_qty_ordered": 0,
      "total_refunded": 0,
      "updated_at": "string",
      "items": [
        {
          "base_original_price": 0,
          "base_price": 0,
          "base_price_incl_tax": 0,
          "base_row_total": 0,
          "base_row_total_incl_tax": 0,
          "base_tax_amount": 0,
          "discount_amount": 0,
          "item_id": 0,
          "name": "string",
          "order_id": 0,
          "original_price": 0,
          "parent_item_id": 0,
          "price": 0,
          "price_incl_tax": 0,
          "product_type": "string",
          "qty_canceled": 0,
          "qty_ordered": 0,
          "qty_refunded": 0,
          "row_total": 0,
          "row_total_incl_tax": 0,
          "sku": "string",
          "tax_amount": 0,
          "updated_at": "string",
          "parent_item": {},
          "product_option": {
            "extension_attributes": {
              "giftcard_item_option": {},
             }
          }
        }
      ],
      "billing_address": {
        "city": "string",
        "country_id": "string",
        "email": "string",
         "firstname": "string",
        "lastname": "string",
        "middlename": "string",
        "postcode": "string",
        "region": "string",
        "street": [
          "string"
        ],
        "telephone": "string"
      },
      "payment": {
        "method": "string",
      },
      "extension_attributes": {
        "shipping_assignments": [
          {
            "shipping": {
              "address": {
                "city": "string",
                "country_id": "string",
                "email": "string",
                "firstname": "string",
                "lastname": "string",
                "middlename": "string",
                "postcode": "string",
                 "region": "string",
                 "street": [
                "string"
                ],
                 "telephone": "string"
               }            
              }
            }
        ], 
        "cash_on_delivery_fee":50.0,
        "base_cash_on_delivery_fee":60.0,
        "amstorecredit_base_amount":100.0,
        "amstorecredit_amount":120.0,
        "applied_taxes": [
      {
        "code": "GST-18",
        "title": "GST-18",
        "percent": 18,
        "amount": 3963.05,
        "base_amount": 3963.05
      }
    ],
    "item_applied_taxes": [
      {
        "type": "product",
        "item_id": 11593,
        "applied_taxes": [
          {
            "code": "GST-18",
            "title": "GST-18",
            "percent": 18,
            "amount": 3963.05,
            "base_amount": 3963.05
          }
        ]
      }
    ]      
      }
    }
  ],
  "search_criteria": {
    "filter_groups": [
      {
        "filters": [
          {
            "field": "string",
            "value": "string",
            "condition_type": "string"
          }
        ]
      }
    ],
  },
  "total_count": 0
}

Get Order Status

Magento API Endpoint - /rest/default/V1/orders/{id}/statuses

URL - https://magento.redoc.ly/2.4.5-admin/tag/ordersidstatuses

Flow - Increff Omni fetches the order status by their scheduled jobs.

Description - Gets the status for a specified order.

Request Params

Name

Type

Mandatory

Comments

id

Integer

yes

Order Id

Response

String

Order status

Order Acknowledgment / Status Update

Magento Endpoint - rest/default/V1/orders/orders/{id}/comments

URL - https://magento.redoc.ly/2.4.5-admin/tag/ordersidcomments#operation/PostV1OrdersIdComments

Flow

Increff Omni makes a API call to Magento portal.

Description

This call is made to update the status of that order is received in Increff Omni system. The status of the order gets updated to processing.

Request Param

Name

Type

Mandatory

Comments

id

Integer

yes

Order Id

Response

true

  • No labels