Skip to content

Vendor Fulfilment

Rest APIs to update product inventory, order fulfillment and to export orders

Authorization

To access the ecomNow API and make requests to the various endpoints, you will need to include a valid and unique username and password in the request header. This username and password combination will be used to authenticate your request and ensure that only authorized users are able to access the ecomNow API.

If you do not have valid username and password credentials, please refer to the introduction section of the relevant module for instructions on how to obtain them. Once you have obtained your credentials.

Return Codes

Status Code Explanation
200 OK Successful return code
400 Bad Request Check you error message return and the body for errors.
401 Unauthorized Provided username and password is incorrect
500 Internal Server Error Server unable to process the request

/basic/vendor/inventory

This endpoint allows vendors to update their inventory levels on the eComNow platform. You can use this API to update existing products.

Definitions of the body attributes

Attribute Name Sample Value Explanation
sku MedicalMary01 Product SKU
vendorEdiSku MedicalMary01 Product Vendor EDI SKU
itemName Rapid Cooling Hemp Derived Cannabidiol Topical Cream (1oz) Product Item Name
brandName Hemp & Heal Product Brand Name
modelName Imbue Em-body Product Model Name
shortDescription IM·BUE™ K9COMFORT SALVE 200MG - 2 OZ. Product Short Description
itemCost 52.25 Product Item Cost
tags tag Product Tags
quantityAvailable 999 Product Available Quantity
image1 tshirt_colors.jpg Product Image
infiniteQuantity 0 Product Infinite Quantity
ukTaxRate 0 Product UK Tax Rate

Example Body

[
  {
    "sku": "MedicalMary01",
    "vendorEdiSku": "MedicalMary01",
    "itemName": "Rapid Cooling Hemp Derived Cannabidiol Topical Cream (1oz)",
    "brandName": "Hemp & Heal",
    "modelName": "Imbue Em-body",
    "shortDescription": "IM·BUE™ K9COMFORT SALVE 200MG - 2 OZ.",
    "itemCost": 52.25,
    "tags": "heavy weight|cotton|tee",
    "quantityAvailable": 999,
    "image1": "tshirt_colors.jpg",
    "infiniteQuantity": 0,
    "ukTaxRate": 0
  }
]

/basic/vendor/get-order

The ecomNow platform provides an endpoint that allows you to request order information.

Definitions of the request attributes

Attribute Name Explanation
start_date The start date in UTC time. Format: MM/dd/yyyy HH:mm (24 hour notation).
For example: 03/23/2012 21:09
end_date The end date in UTC time. Same format as start_date.
page Page no

Sample Response

<?xml version='1.0' encoding='UTF-8'?>
<Orders pages="1">
    <Order>
        <OrderID>
            <![CDATA[64889156520319739ea059a9]]>
        </OrderID>
        <OrderNumber>
            <![CDATA[1010-488]]>
        </OrderNumber>
        <OrderDate>06/13/2023 15:55</OrderDate>
        <OrderStatus>
            <![CDATA[2]]>
        </OrderStatus>
        <LastModified>06/13/2023 15:55</LastModified>
        <ShippingMethod>3</ShippingMethod>
        <PaymentMethod>
            <![CDATA[Credit Card]]>
        </PaymentMethod>
        <OrderTotal>50.15</OrderTotal>
        <TaxAmount>2.84</TaxAmount>
        <ShippingAmount>7.31</ShippingAmount>
        <CustomerNotes>
            <![CDATA[]]>
        </CustomerNotes>
        <InternalNotes>
            <![CDATA[]]>
        </InternalNotes>
        <Gift>false</Gift>
        <GiftMessage>
            <![CDATA[]]>
        </GiftMessage>
        <CustomField1>
            <![CDATA[]]>
        </CustomField1>
        <CustomField2>
            <![CDATA[]]>
        </CustomField2>
        <CustomField3>
            <![CDATA[]]>
        </CustomField3>
        <Customer>
            <CustomerCode/>
            <BillTo>
                <Name>
                    <![CDATA[Vince Mazzurco]]>
                </Name>
                <Company>
                    <![CDATA[abc]]>
                </Company>
                <Phone>
                    <![CDATA[6785929804]]>
                </Phone>
                <Email>
                    <![CDATA[vm@commercescience.com]]>
                </Email>
            </BillTo>
            <ShipTo>
                <Name>
                    <![CDATA[Vince Mazzurco]]>
                </Name>
                <Company/>
                <Address1>
                    <![CDATA[3170 Wendwood Drive]]>
                </Address1>
                <Address2>
                    <![CDATA[]]>
                </Address2>
                <City>
                    <![CDATA[Marietta]]>
                </City>
                <State>
                    <![CDATA[GA]]>
                </State>
                <PostalCode>
                    <![CDATA[30062]]>
                </PostalCode>
                <Country>
                    <![CDATA[US]]>
                </Country>
                <Phone>
                    <![CDATA[6785929804]]>
                </Phone>
            </ShipTo>
        </Customer>
        <Items>
            <Item>
                <SKU>
                    <![CDATA[AFES01]]>
                </SKU>
                <Name>
                    <![CDATA[Elentee Soy Wig & Weave Shine Spray 4 oz]]>
                </Name>
                <ImageUrl>
                    <![CDATA[https://edwebteam.com/images_1500/AFES01.jpg]]>
                </ImageUrl>
                <Weight>0.6</Weight>
                <WeightUnits>lb</WeightUnits>
                <Quantity>1</Quantity>
                <UnitPrice>40.00</UnitPrice>
                <Location/>
            </Item>
        </Items>
    </Order>
</Orders>

/basic/vendor/order-notification

The ecomNow platform provides an API that allows you to create order notifications. In order to create an order notification, you will need to use this endpoint.

Definitions of the request attributes

Attribute Name Explanation
action Notification action i.e shipnotify
order_number This is the order's unique identifier. i.e. 1010-15
carrier Carrier Service i.e upswhatever
service This will be the name of the shipping service that was used to ship the order. i.e upswhatever
tracking_number This is the tracking number for the package. i.e 9999999999

Sample Request Body

<?xml version="1.0" encoding="UTF-8"?>
<ShipNotice>
    <OrderNumber>1010-15</OrderNumber>
    <OrderID>5d14c77374ad8b000105a184</OrderID>
    <CustomerCode>vm@commercescience.com</CustomerCode>
    <CustomerNotes></CustomerNotes>
    <InternalNotes></InternalNotes>
    <NotesToCustomer></NotesToCustomer>
    <NotifyCustomer></NotifyCustomer>
    <LabelCreateDate>6/29/2019 12:56</LabelCreateDate>
    <ShipDate>6/29/2019 12:56</ShipDate>
    <Carrier>USPS</Carrier>
    <Service>Priority Mail</Service>
    <TrackingNumber>1Z909084330298430820</TrackingNumber>
    <ShippingCost>0</ShippingCost>
    <CustomField1></CustomField1>
    <CustomField2></CustomField2>
    <CustomField3></CustomField3>
    <recipient>
        <Name>The President</Name>
        <Company>US Govt</Company>
        <Address1>1600 Pennsylvania Ave</Address1>
        <Address2>Address 2</Address2>
        <City>Washington</City>
        <State>DC</State>
        <PostalCode>20500</PostalCode>
        <US>1245324534</US>
    </recipient>
    <Items>
        <Items>
            <SKU>MedicalMary01</SKU>
            <Name>CBD Intensive Relief Rub</Name>
            <Quantity>1</Quantity>
            <LineItemID>25590</LineItemID>
        </Items>
    </Items>
</ShipNotice>

Creating Vendor Bill(s) using API

To facilitate the upload of a vendor bill via the API, it is necessary to perform two distinct API (mentioned below) executions to complete the workflow.
1. Upload invoices using /basic/vendor/upload-bills 2. Create vendor Bill /vendor/create-single-bill

Please take note that both APIs employ distinct authentication methods. For details, please refer to the authentication section within each respective API section.

/basic/vendor/upload-bills

Authorization:

For this Api you have to use you assigned vendor username and password as mentioned in Authorization part of this Api. Bearer Token Authentication is not required for this API.

Details:

you can upload one of more invoices using this endpoint, and it will generates response like this:

[
  {
    "fileName": "sample-invoice-bill.pdf",
    "contentType": "application/octet-stream",
    "url": "https://ecomnow-images.s3.amazonaws.com/csc/3/QuickBooks/bills/1694600219049_sample-invoice-bill.pdf"
  }
]

Save that response somewhere as its required into next section.

/vendor/create-single-bill

Authorization:

For this Api, you have to use your username and password that you used to login on Admin. A details workflow is described Authenticate the API user and get auth token to obtain JWT token.
You can use below string as api-key

testJtWOGTLP82rhy9DWTwXseCvZzs2xJVTWf5AoNjVzoyoXbP81tuYau6h6nsBD9U3b

Details:

You have to post following details in the request body:

Attribute Name Sample Value Explanation
ecomNowOrderNo 1 ecom Order Number
billNo 123 Vendor Bill Number
billDate 2023-09-13T10:17:25.686Z When bill was created
dueDate 2023-09-13T10:17:25.686Z Due date of Bill
tags tag1,tag3 comma separated tag/s
attachment get from upload-bills API get from upload-bills API and use content stating from
items.type PRODUCT or SHIPPING type must be either PRODUCT or SHIPPING
items.description a bag Short description of item in order
items.quantity 999 Order item quantity
items.tax 44 Order item tax
item.sku ABC-123 Order item Sku, Only required when shipping type is PRODUCT
items.unitPrice 1 Order item unit price, Only required when shipping type is PRODUCT
items.amount 100 Order item amount, Only required when shipping type is PRODUCT

Sample Body for PRODUCT type

{
  "ecomNowOrderNo": 1,
  "billNo": "string",
  "billDate": "2023-09-13T10:17:25.686Z",
  "dueDate": "2023-09-13T10:17:25.686Z",
  "tags": "string",
  "attachment": {
    "fileName": "1 feb logs",
    "contentType": "application/octet-stream",
    "url": "https://ecomnow-images.s3.amazonaws.com/csc/3/QuickBooks/bills/1694600219049_1_feb_logs"
  },
  "items": [
    {
      "type": "string",
      "description": "string",
      "sku": "string",
      "quantity": 0,
      "unitPrice": 0,
      "amount": 0,
      "tax": 0
    }
  ]
}

Sample body for SHIPPING type:

{
  "ecomNowOrderNo": 1,
  "billNo": "string",
  "billDate": "2023-09-13T10:17:25.686Z",
  "dueDate": "2023-09-13T10:17:25.686Z",
  "tags": "string",
  "attachment": {
    "fileName": "1 feb logs",
    "contentType": "application/octet-stream",
    "url": "https://ecomnow-images.s3.amazonaws.com/csc/3/QuickBooks/bills/1694600219049_1_feb_logs"
  },
  "items": [
    {
      "type": "string",
      "description": "string",
      "quantity": 0,
      "unitPrice": 0
    }
  ]
}