Home » API Documentations » OMS APIs » Orders » Orders API RESTful v2

Orders API RESTful v2

Please note:

It is your responsibility to properly set up all translation features, perform testing, and request support from ShipEdge in a timely manner. It is your responsibility to test and verify the integration between ShipEdge and any 3rd party selling channel. We strongly recommend frequent testing of any integration, specially when changes occur on your selling channel (e.g. SKU renaming, shipping method variations, permissions and credentials). ShipEdge is not responsible for translation issues, omitted orders, or any other issues related to communication with any 3rd party selling channel. Support for channel automation requires at least 24 hours for investigation before any action can be taken (hourly development charges may apply). The warehouse is not responsible for any omission, duplication or error in your orders coming through this system, and you agree not to get the warehouse involved in integration issues, nor will they make any exception or procedure changes due to the use of this feature.

Base

  • http://<integration>.shipedge.com/API/Rest/v2/Orders

 

Ping

Ping to check the system status.

  • POST /ping

 

Parameters

ParemeterTypeDescription
account_id (*)intYour account ID
key (*)varchar Your API Key
warehouse (*)varcharThis will be found in your ShipEdge account. Preferences > API Integration > Warehouse.

 

Example request

{
    "key": "123abc",
    "warehouse": "whx",
    "account_id": 1
}

 

Example response

{
    "status": "successful",
    "result": "pong!"
}

Get orders

Gets the collection of orders.

  • POST /get_orders

 

Parameters

ParemeterTypeDescription
account_id (*)intYour account ID
key (*)varchar Your API Key
warehouse (*)varcharThis will be found in your ShipEdge account. Preferences > API Integration > Warehouse.
page (*)intPagination, number of page.
status (*)varcharall, cancel, pending, processing, incomplete, divided, backorder, shipped, error, return by carrier, packing error, low balance, hold, dropship, editing, sent to shipedge, shipped by shipedge, pending to cotim, sent to cotim, shipped by cotim
from_datedatetimeFormat yyyy-mm-dd hh:mm:ss
to_datedatetimeFormat yyyy-mm-dd hh:mm:ss

 

Example request

{
    "key": "123abc",
    "warehouse": "whx",
    "account_id": 1,
    "page": 1,
    "status": "all"
}

 

Example response

{
    "status": "successful",
    "total_orders": "109",
    "total_pages": 5,
    "orders": [{
        "order_id": "1",
        "order_number": "1",
        "reference_number": "",
        "date": "2019-10-18 00:00:00",
        "status": {
            "id": "9",
            "description": "shipped"
        },
        "pending_date": "2019-10-18 15:58:03",
        "shipping_date": "2019-10-18 16:50:07",
        "last_update": "2019-10-21 14:04:53",
        "order_comments": "",
        "customer": {
            "first_name": "bruce",
            "last_name": "wayne",
            "address1": "464 South Alston Avenue",
            "address2": "#120",
            "city": "Durham",
            "state": "NC",
            "zip": "27713",
            "country": "United States"
        },
        "billing": {
            "first_name": "bruce",
            "last_name": "wayne",
            "address1": "464 South Alston Avenue",
            "address2": "#120",
            "city": "Durham",
            "state": "NC",
            "zip": "27713",
            "country": "United States"
        },
        "shipping": {
            "method": "FCD",
            "description": "USPS First Class Mail (2-6)",
            "tracking_number": "1234567"
        },
        "items": [{
            "item_id": "1",
            "sku": "S00063",
            "quantity": "1",
            "sold_price": "0.00",
            "description": "",
            "attributes": [],
            "product": {
                "product_id": "1",
                "account_id": "1",
                "sku": "S00063",
                "upc": null,
                "description": "test",
                "harmonization_code": "",
                "quantity_in_warehouse": "69",
                "quantity_available": "74",
                "quantity_hurt": "0",
                "quantity_shipped": "24",
                "cost": "4.00",
                "retail": "5.00",
                "discontinued": "N",
                "discontinued_date": null,
                "created_date": "2018-09-04 20:58:47",
                "updated_date": "2019-10-22 17:00:19",
                "weight": "0.3000",
                "width": "0.400",
                "height": "0.300",
                "length": "0.200",
                "distribution_center": {
                    "id": "1",
                    "name": "WH0"
                },
                "supplier": {
                    "id": null,
                    "name": null
                },
                "package_type": {
                    "id": null,
                    "name": null
                },
                "attributes": []
            }
        }],
        "attributes": [{
            "id": "2739",
            "attributte_name": "total",
            "attribute_value": "NaN",
            "description": "_total_"
        }, {
            "id": "2738",
            "attributte_name": "subtotal",
            "attribute_value": "NaN",
            "description": "_subtotal_"
        }, {
            "id": "2741",
            "attributte_name": "shipping cost",
            "attribute_value": "0",
            "description": "_shipping_"
        }, {
            "id": "2740",
            "attributte_name": "handling estimate",
            "attribute_value": "3.00",
            "description": "_handling_"
        }],
        "account": {
            "account_id": "1",
            "account_name": "shipedge",
            "company_name": "shipedge",
            "contact_name": "Peter Parker",
            "address1": "106 Capitola Dr",
            "address2": null,
            "city": "Durham",
            "state": "NC",
            "postal_code": "27713",
            "country": "USA",
            "phone": "9192930940",
            "email": "integrations@shipedge.com",
            "activated": "true",
            "attributes": [{
                "id": "3571",
                "attributte_name": "attr1",
                "attribute_value": "11",
                "description": "desc"
            }]
        }
    }]
}

Get order

Gets the detail information about an order.

  • POST /get_order

 

Parameters

ParemeterTypeDescription
account_id (*)intYour account ID
key (*)varchar Your API Key
warehouse (*)varcharThis will be found in your ShipEdge account. Preferences > API Integration > Warehouse.
id (*)varcharSpecify an order_id to get details about an order.

 

Example request

{
    "key": "123abc",
    "warehouse": "whx",
    "account_id": 1,
    "id": "1"
}

Example response

{
    "status": "successful",
    "total_orders": "109",
    "total_pages": 5,
    "order": {
        "order_id": "1",
        "order_number": "1",
        "reference_number": "",
        "date": "2019-10-18 00:00:00",
        "status": {
            "id": "9",
            "description": "shipped"
        },
        "pending_date": "2019-10-18 15:58:03",
        "shipping_date": "2019-10-18 16:50:07",
        "last_update": "2019-10-21 14:04:53",
        "order_comments": "",
        "customer": {
            "first_name": "bruce",
            "last_name": "wayne",
            "address1": "464 South Alston Avenue",
            "address2": "#120",
            "city": "Durham",
            "state": "NC",
            "zip": "27713",
            "country": "United States"
        },
        "billing": {
            "first_name": "bruce",
            "last_name": "wayne",
            "address1": "464 South Alston Avenue",
            "address2": "#120",
            "city": "Durham",
            "state": "NC",
            "zip": "27713",
            "country": "United States"
        },
        "shipping": {
            "method": "FCD",
            "description": "USPS First Class Mail (2-6)",
            "tracking_number": "1234567"
        },
        "items": [{
            "item_id": "1",
            "sku": "S00063",
            "quantity": "1",
            "sold_price": "0.00",
            "description": "",
            "attributes": [],
            "product": {
                "product_id": "1",
                "account_id": "1",
                "sku": "S00063",
                "upc": null,
                "description": "test",
                "harmonization_code": "",
                "quantity_in_warehouse": "69",
                "quantity_available": "74",
                "quantity_hurt": "0",
                "quantity_shipped": "24",
                "cost": "4.00",
                "retail": "5.00",
                "discontinued": "N",
                "discontinued_date": null,
                "created_date": "2018-09-04 20:58:47",
                "updated_date": "2019-10-22 17:00:19",
                "weight": "0.3000",
                "width": "0.400",
                "height": "0.300",
                "length": "0.200",
                "distribution_center": {
                    "id": "1",
                    "name": "WH0"
                },
                "supplier": {
                    "id": null,
                    "name": null
                },
                "package_type": {
                    "id": null,
                    "name": null
                },
                "attributes": []
            }
        }],
        "attributes": [{
            "id": "2739",
            "attributte_name": "total",
            "attribute_value": "NaN",
            "description": "_total_"
        }, {
            "id": "2738",
            "attributte_name": "subtotal",
            "attribute_value": "NaN",
            "description": "_subtotal_"
        }, {
            "id": "2741",
            "attributte_name": "shipping cost",
            "attribute_value": "0",
            "description": "_shipping_"
        }, {
            "id": "2740",
            "attributte_name": "handling estimate",
            "attribute_value": "3.00",
            "description": "_handling_"
        }],
        "account": {
            "account_id": "1",
            "account_name": "shipedge",
            "company_name": "shipedge",
            "contact_name": "Peter Parker",
            "address1": "106 Capitola Dr",
            "address2": null,
            "city": "Durham",
            "state": "NC",
            "postal_code": "27713",
            "country": "USA",
            "phone": "9192930940",
            "email": "integrations@shipedge.com",
            "activated": "true",
            "attributes": [{
                "id": "3571",
                "attributte_name": "attr1",
                "attribute_value": "11",
                "description": "desc"
            }]
        }
    }
}

Get total orders

Gets the total of orders.

  • POST /get_total_orders

 

Parameters

ParemeterTypeDescription
account_id (*)intYour account ID
key (*)varchar Your API Key
warehouse (*)varcharThis will be found in your ShipEdge account. Preferences > API Integration > Warehouse.
status (*)varcharall, cancel, pending, processing, incomplete, divided, backorder, shipped, error, return by carrier, packing error, low balance, hold, dropship, editing, sent to shipedge, shipped by shipedge, pending to cotim, sent to cotim, shipped by cotim
from_datedatetimeFormat yyyy-mm-dd hh:mm:ss
to_datedatetimeFormat yyyy-mm-dd hh:mm:ss

 

Example request

{
    "key": "abc123",
    "warehouse": "wh0",
    "account_id": 1,
    "status": "all"
}

Example response

{
    "status": "successful",
    "orders": {
        "total": "109"
    }
}

 

Cancel order

Cancel an order.

  • POST /cancel_order

 

Parameters

ParemeterTypeDescription
account_id (*)intYour account ID
key (*)varchar Your API Key
warehouse (*)varcharThis will be found in your ShipEdge account. Preferences > API Integration > Warehouse.
order_id (*)varcharSpecify a shipping number to cancel it

 

Example request

{
    "order_id": "279434",
    "key": "bf3XXXXXXXXXXXXXXXXXXXXXXXXXXXXX8ec",
    "warehouse": "wh1",
    "account_id": 13
}

Example response

{
    "status": "successful",
    "result": "Shippment 279434 was cancelled"
}

Add orders

  • POST /add_orders

 

Parameters

ParemeterTypeDescription
key (*)varcharFound in your ShipEdge account. Preferences>API Integration> Key. (Required)
account_id (*)intFound in your ShipEdge account. Preferences>API Integration>AccountID. (Required)
warehouse (*)varcharThis will be found in your Shipege account. Preferences>API Integration> Warehouse. (Required)
order_number (*)varcharorder_number must be unique. You may use a shopping-cart or order processing software ID. It is recommended to use incremental consecutive numbers. If an Order# is repeated, the system will not import that row. (Required)
reference_numbervarcharOrder reference number
shipping.carriervarcharShipping carrier
shipping.method (*)varcharplease refer to ship method codes table. (Required)
customer.emailvarcharwe can send order status updates to this email on your behalf.
customer.phonevarcharYour customer’s delivery phone# is required on all international orders and express shipments. You may use your own phone number if you don’t have the buyer's contact phone#.
customer.first_name (*)varcharUse as first name or as complete name.(Required)
customer.last_namevarcharLast name after first name.
customer.companyvarcharIf buyer is a company or organization.
customer.address1 (*)varcharstreet delivery address. (Required)
customer.address2varcharapartment or unit number. International order may use this field for zone or area.
customer.city (*)varchardelivery city name. (Required)
customer.state (*)varcharstate or province. (Required)
customer.country (*)varchardelivery country name. (Required)
customer.commentsvarcharcomments to customer
billing.first_namevarcharBuyer first or complete name. Used for customer services purposes and order management. If left blank we will repeat the delivery address. If left blank we will repeat the delivery address.
billing.companyvarcharIf left blank we will repeat the delivery address.
billing.address1varcharIf left blank we will repeat the delivery address.
billing.address2varcharIf left blank we will repeat the delivery address.
billing.cityvarcharIf left blank we will repeat the delivery address.
billing.statevarcharIf left blank we will repeat the delivery address.
billing.zipvarcharIf left blank we will repeat the delivery address.
billing.countryvarcharIf left blank we will repeat the delivery address.
cod_amountvarcharAmount to be picked up when shipment is delivered (only available through UPS – additional service fees apply).
insurance_amountvarcharIf insurance is required, please include the insurance amount otherwise leave blank (additional charges apply). UPS and FedEx automatically include insurance up to $100 at no additional charge.
signature_requiredEnum (YES, NO)YES or NO (blank or nill)
release_datedateRelease date
shipping.shiment_subtotalvarcharTotal amount charged for merchandise not including shipping & handling charges.
shipping.shipping_chargevarcharShipping and Handling charges.
shipping.total_chargevarcharTotal amount charged for merchandise plus shipping & handling charges.
residentialEnum(YES,NO)YES / NO. Used to attain different service levels by UPS or FedEx. We can fill this for you if you are subscribed to automatic address verification and residence status (this service will detect the status of the delivery and automatically select the correct service: Commercial or Residential)
order_commentsvarcharOrder comments
store_idint
items.sku (*)varcharThe SKU we need to place in the package. (Required)
items.quantity (*)intThe number of products for its respective.(Required)
items.sold_pricefloat
items.descriptionvarcharDescription of the Sku.

 

Example request

{
    "key": "abc123",
    "warehouse": "wh0",
    "account_id": 1,
    "orders": [{
        "order_number": "20",
        "reference_number": "123",
        "order_comments": "Comments",
        "shipping": {
            "method": "DROPSHIP"
        },
        "customer": {
            "email": "test@mail.com",
            "phone": "123345",
            "first_name": "Luis1",
            "last_name": "cust Name",
            "company": "cust Company",
            "address1": "123 Campbellton",
            "address2": "cust Address2",
            "city": "Montague – PE",
            "state": "PE",
            "zip": "C0A 1R0",
            "country": "Canada"
        },
        "billing": {
            "first_name": "Bill FName",
            "last_name": "Bill LName",
            "company": "Bill Company",
            "address1": "Bill Address1",
            "address2": "Bill Address2",
            "city": "Los angeles",
            "state": "CA",
            "zip": "60915",
            "country": "USA"
        },
        "cod_amount": "",
        "insurance_amount": "NO",
        "signature_required": "NO",
        "residential": "YES",
        "store_id": "",
        "release_date": "",
        "items": [{
            "sku": "111-01950",
            "quantity": 1,
            "sold_price": "2.2200",
            "description": "sell by user example"
        }, {
            "sku": "111-12301",
            "quantity": 2,
            "sold_price": "3.3333",
            "description": "sell by user example 3333"
        }]
    }, {
        "order_number": "21",
        "reference_number": "456",
        "order_comments": "Comments",
        "shipping": {
            "method": "DROPSHIP"
        },
        "customer": {
            "email": "test@mail.com",
            "phone": "6789000",
            "first_name": "Bruce",
            "last_name": "cust Name",
            "company": "cust Company",
            "address1": "123 Campbellton",
            "address2": "cust Address2",
            "city": "Montague – PE",
            "state": "PE",
            "zip": "C0A 1R0",
            "country": "Canada",
            "comments": ""
        },
        "billing": {
            "first_name": "Bill FName",
            "last_name": "Bill LName",
            "company": "Bill Company",
            "address1": "Bill Address1",
            "address2": "Bill Address2",
            "city": "Los angeles",
            "state": "CA",
            "zip": "60915",
            "country": "USA"
        },
        "cod_amount": "",
        "insurance_amount": "",
        "signature_required": "NO",
        "residential": "YES",
        "store_id": "",
        "release_date": "",
        "items": [{
            "sku": "AC-F2-F15",
            "quantity": 1,
            "sold_price": "2.2200",
            "description": "sell by user example"
        }, {
            "sku": "AC-F3-F14",
            "quantity": 2,
            "sold_price": "3.3333",
            "description": "sell by user example 3333"
        }]
    }]
}

Example response

{
    "access": {
        "account_id": "1",
        "access": "Allow: add_orders",
        "warehouse": "wh0",
        "total_orders": 2,
        "message": "All orders in system",
        "batch_id": 1
    },
    "orders": {
        "allow": [{
            "order_number": "20",
            "OrderID": "1"
        }],
        "denied": [{
            "order_number": "21",
            "CommentAPI": "Check Field:SKU",
            "OrderID": "false"
        }]
    }
}

Add Attributes

Add Attributes to an Oder or item respectively, if the attribute already exists; it is only modified, If no more attributes are added. In case OrderItemID is 0 or empty, it’s assigned for all orders.

  • POST /add_attributes

 

Request

{
    "account_id": "210",
    "key": "13439852318c7988c8774f02bad0b1d5",
    "warehouse": "dev",
    "order_id": "123654",
    "order_item_id": "2453",
    "attribute": "color",
    "attrval": "Blue",
    "description": "Color of items 2453"
}

Parameters

ParameterTypeDescription
account_id (*)intYour account ID
Key (*)varcharYour API Key
Warehouse (*)varcharThis will be found in your ShipEdge account. Preferences > API Integration > Warehouse.
order_idvarcharSpecify an id of order to add attributes
order_item_idvarcharSpecify an id associated with a order
attributevarcharAttribute associated with an order or item (color, weight, etc)
attrvalvarcharValue of the attribute to register
descriptionvarcharDescription of the attributes to register or update

Note:

  • Check that the order_item_id variable could be sent or omitted, since the end user would define whether it´s added to an order or an item, or check if the item exists and not proceed.

 

Response

{
    "success": true,
    "message": "You updated it successfully."
}

Get Attributes

Gets the listed of an order or item respectively, they are for the purpose of obtaining attributes.

  • POST /get_attributes

 

Request 

{
    "AccountID": "210",
    "Key": "13439852318c7988c8774f02bad0b1d5",
    "Warehouse": "dev",
    "order_id": "123654",
    "order_item_id": "2453",
    "attribute": "color"
}
 

Parameters

ParameterTypeDescription
account_id (*)intYour account ID
Key (*)varcharYour API Key
Warehouse (*)varcharThis will be found in your ShipEdge account. Preferences > API Integration > Warehouse.
order_idvarcharSpecify an id of order to add attributes
order_item_idvarcharSpecify an id associated with a order
attributevarcharAttribute associated with an order or item (color, weight, etc)

Notes:

  • The same case of addAttribute, ordre_item_id, could be sent or omitted. Since it could exist as neither.
  • Attribute could also be omitted, so you can get all existing attributes of an order or item respectively.

 

Delete Attributes

Deletes the existing attribute o fan order or ítem respectively.

  • POST /delete_attributes

 

Request

{
    "AccountID": "210",
    "Key": "13439852318c7988c8774f02bad0b1d5",
    "Warehouse": "dev",
    "order_id": "123654",
    "order_item_id": "2453",
    "attribute": "color"
}

Parameters

ParameterTypeDescription
account_id (*)intYour account ID
Key (*)varcharYour API Key
Warehouse (*)varcharThis will be found in your ShipEdge account. Preferences > API Integration > Warehouse.
order_idvarcharSpecify an id of order to add attributes
order_item_idvarcharSpecify an id associated with a order
attributevarcharAttribute associated with an order or item (color, weight, etc)

Note:

  • Here you could also omit order_item_id, as well as attribute (if you send an attribute it is deleted; if you do not send an attribute, all the attributes assigned to an order or item would be deleted).