Documentation / API / Operations on Orders

GET and COUNT operations available on orders.

Orders Operations

GET

URL

POST https://your-secured-store-url:443/api/v1/orders/get

Filters

Filter Type
id Array of GUID
customerid Array of GUID (Customers)
number Array of Integer (max 11 digits)
status Array of String (Predefined values)
totalprice_min Array of Decimal (max 8 digits and 2 decimals)
totalprice_max Array of Decimal (max 8 digits and 2 decimals)
taxid Array of GUID (Taxes)
shippingid Array of GUID (Shipping methods)
shippingoption Array of String (max 255 chars)
couponid Array of GUID (Coupons)
billingsame Boolean
discount_min Array of Decimal (max 8 digits and 2 decimals)
discount_max Array of Decimal (max 8 digits and 2 decimals)
billingfirstname Array of String (max 255 chars)
billinglastname Array of String (max 255 chars)
billingemail Array of String (max 255 chars)
billingphone Array of String (max 255 chars)
billingcompany Array of String (max 255 chars)
billingcountryid Array of GUID (Countries)
billingstateid Array of GUID (States)
billingcity Array of String (max 255 chars)
billingpostalcode Array of String (max 255 chars)
shippingfirstname Array of String (max 255 chars)
shippinglastname Array of String (max 255 chars)
shippingemail Array of String (max 255 chars)
shippingphone Array of String (max 255 chars)
shippingcompany Array of String (max 255 chars)
shippingcountryid Array of GUID (Countries)
shippingstateid Array of GUID (States)
shippingcity Array of String (max 255 chars)
shippingpostalcode Array of String (max 255 chars)
createdon_min DateTime
createdon_max DateTime

Request

Retrieve all the items (max 1000)

{
        'authentication' : {
            'apiKey' : 'jjns7519v1v3ns6xU162'
        }
    }

Retrieve specific items by ID

{
        'authentication' : {
            'apiKey' : 'jjns7519v1v3ns6xU162'
        },
        'filters' : {
            'id' : ['00000000-0000-0000-0000-000000000000', '12345678-1234-1234-1234-123456781234']
        }
    }

Most complete request (just to give you the format of each parameter)

{
        'authentication' : {
            'apiKey' : 'jjns7519v1v3ns6xU162'
        },
        'filters' : {
		'id' : ['33e6620e-3cec-48c7-ab2f-85e08ff89345'],
		'customerid' : ['3bd55c5a-eac2-4dae-8016-61bd72161422'],
		'number' : ['1002'],
		'status' : ['COMPLETED'],
		'totalprice_min' : '30.55',
		'totalprice_max' : '40',
		'taxid' : ['e66f27c0-d73f-42d4-a527-3d159433e537'],
		'shippingid' : ['7bf80e69-b0e6-41a2-a621-6e595eb6d27a'],
		'shippingoption' : ['NA'],
		'couponid' : ['2c663eed-6322-42d5-91b3-a5da9563e68d'],
		'billingsame' : 'true',
		'discount_min' : '0.00',
		'discount_max' : '999.99',
		'billingfirstname' : ['Mr'],
		'billinglastname' : ['Example'],
		'billingemail' : ['example@example.com'],
		'billingphone' : ['4181234567'],
		'billingcompany' : ['commerscale'],
		'billingcountryid' : ['75b36fa9-4eb5-4a2f-8bd2-2baafd81cfe9'],
		'billingstateid' : ['ea150089-6c9f-4c00-81f3-e64e67270fe9'],
		'billingcity' : ['Quebec'],
		'billingpostalcode' : ['G1G1G1'],
		'shippingfirstname' : ['Mr'],
		'shippinglastname' : ['Example'],
		'shippingemail' : ['example@example.com'],
		'shippingphone' : ['4181234567'],
		'shippingcompany' : ['commerscale'],
		'shippingcountryid' : ['75b36fa9-4eb5-4a2f-8bd2-2baafd81cfe9'],
		'shippingstateid' : ['ea150089-6c9f-4c00-81f3-e64e67270fe9'],
		'shippingcity' : ['Quebec'],
		'shippingpostalcode' : ['G1G1G1'],
		'createdon_min' : '2015-01-01',
		'createdon_max' : '2042-01-01'
        },
        'pagination' : {
            'pageNumber' : '1',
            'pageSize' : '1000'
        }
    }

Response

If no error occured, you will receive a response like this one (object type: Order). Please refer to error messages to learn more about the possible error responses.

[
   {
      "id": "33e6620e-3cec-48c7-ab2f-85e08ff89345",
      "customerid": "3bd55c5a-eac2-4dae-8016-61bd72161422",
      "fullname": "Mr Example",
      "number": "1002",
      "status": "COMPLETED",
      "total": "36.50",
      "totalprice": "40.00",
      "totaltaxes": "0.00",
      "totalshipping": "2.50",
      "totalshippingtaxes": "0.00",
      "totaldiscount": "6.00",
      "taxid": "e66f27c0-d73f-42d4-a527-3d159433e537",
      "shippingid": "7bf80e69-b0e6-41a2-a621-6e595eb6d27a",
      "shippingname": "Fedex",
      "shippingoption": "NA",
      "shippingoptionname": "",
      "couponid": "2c663eed-6322-42d5-91b3-a5da9563e68d",
      "couponcode": "FBF98AC349A9",
      "billingsame": "true",
      "customernotes": "nothing to say",
      "discount": "5.00",
      "billingfirstname": "Mr",
      "billinglastname": "Example",
      "billingemail": "example@example.com",
      "billingphone": "4181234567",
      "billingcompany": "commerscale",
      "billingaddressline1": "123 street",
      "billingaddressline2": "",
      "billingcountryid": "75b36fa9-4eb5-4a2f-8bd2-2baafd81cfe9",
      "billingcountrycode": "CA",
      "billingcountryname": "Canada",
      "billingstateid": "ea150089-6c9f-4c00-81f3-e64e67270fe9",
      "billingstatecode": "QC",
      "billingstatename": "Quebec",
      "billingcity": "Quebec",
      "billingpostalcode": "G1G1G1",
      "shippingsame": "true",
      "shippingfirstname": "Mr",
      "shippinglastname": "Example",
      "shippingemail": "example@example.com",
      "shippingphone": "4181234567",
      "shippingcompany": "commerscale",
      "shippingaddressline1": "123 street",
      "shippingaddressline2": "",
      "shippingcountryid": "75b36fa9-4eb5-4a2f-8bd2-2baafd81cfe9",
      "shippingcountrycode": "CA",
      "shippingcountryname": "Canada",
      "shippingstateid": "ea150089-6c9f-4c00-81f3-e64e67270fe9",
      "shippingstatecode": "QC",
      "shippingstatename": "Quebec",
      "shippingcity": "Quebec",
      "shippingpostalcode": "G1G1G1",
      "paymentmethodid":"381f23e5-1a3a-4912-8ec1-4e0a8d212618",
      "paymentmethodname":"PAYPAL",
      "items": [
         {
            "id": "97e96cd3-22e7-4f93-960c-8f9a2f721b30",
            "productid": "93cacc6d-fe4a-455c-a080-49c251413918",
            "productvariantid": "00000000-0000-0000-0000-000000000000",
            "itemname": "Item 1",
            "unitprice": "12.00",
            "sku": "AAAAAA",
            "quantity": "2"
         },
         {
            "id": "4702fd8e-37ae-4283-93dc-228d9303a0d4",
            "productid": "72ac3b42-65e8-435c-bc79-8020375b49f5",
            "productvariantid": "00000000-0000-0000-0000-000000000000",
            "itemname": "Item 2",
            "unitprice": "7,00",
            "sku": "BBBBBB",
            "quantity": "1"
         },
         {
            "id": "895fc256-3743-4578-bafa-d25f530cb77e",
            "productid": "2aa783cf-2708-45ed-85a1-3767d6a13535",
            "productvariantid": "00000000-0000-0000-0000-000000000000",
            "itemname": "Item 3",
            "unitprice": "5.00",
            "sku": "CCCCCC",
            "quantity": "1"
         }
      ],
      "histories": [],
      "payments": [
         {
            "id": "6ca97fe3-708d-4f48-9e6d-fa0e9399300f",
            "customerid": "3bd55c5a-eac2-4dae-8016-61bd72161422",
            "type": "PAYPAL",
            "amount": "32.50",
            "trxid": "FSDF548LAL",
            "methodid": "",
            "createdon": "2015-12-15 12:57:11"
         }
      ],
      "trackings": [
         {
            "id": "26be0604-ebf9-487e-9ec0-ae892de3bb6f",
            "trackingnumber": "12345",
            "trackingurl": "http://www.canadapost.ca/cpotools/apps/track/personal/findByTrackNumber?trackingNumber=",
            "providertype": "CANADAPOST",
            "providername": "Example",
            "createdon": "2015-12-17 06:13:56"
         }
      ],
      "author": "Mr Example",
      "createdon": "2015-12-15 12:56:22"
   }
]

COUNT

URL

POST https://your-secured-store-url:443/api/v1/orders/count

Filters

Filter Type
id Array of GUID
customerid Array of GUID (Customers)
number Array of Integer (max 11 digits)
status Array of String (Predefined values)
totalprice_min Array of Decimal (max 8 digits and 2 decimals)
totalprice_max Array of Decimal (max 8 digits and 2 decimals)
taxid Array of GUID (Taxes)
shippingid Array of GUID (Shipping methods)
shippingoption Array of String (max 255 chars)
couponid Array of GUID (Coupons)
billingsame Boolean
discount_min Array of Decimal (max 8 digits and 2 decimals)
discount_max Array of Decimal (max 8 digits and 2 decimals)
billingfirstname Array of String (max 255 chars)
billinglastname Array of String (max 255 chars)
billingemail Array of String (max 255 chars)
billingphone Array of String (max 255 chars)
billingcompany Array of String (max 255 chars)
billingcountryid Array of GUID (Countries)
billingstateid Array of GUID (States)
billingcity Array of String (max 255 chars)
billingpostalcode Array of String (max 255 chars)
shippingfirstname Array of String (max 255 chars)
shippinglastname Array of String (max 255 chars)
shippingemail Array of String (max 255 chars)
shippingphone Array of String (max 255 chars)
shippingcompany Array of String (max 255 chars)
shippingcountryid Array of GUID
shippingstateid Array of GUID
shippingcity Array of String (max 255 chars)
shippingpostalcode Array of String (max 255 chars)
createdon_min DateTime
createdon_max DateTime

Request

Count the items

{
        'authentication' : {
            'apiKey' : 'jjns7519v1v3ns6xU162'
        }
    }

Count specific items by status

{
        'authentication' : {
            'apiKey' : 'jjns7519v1v3ns6xU162'
        },
        'filters' : {
            'status' : ['COMPLETED']
        }
    }

Most complete request (just to give you the format of each parameter)

{
        'authentication' : {
            'apiKey' : 'jjns7519v1v3ns6xU162'
        },
        'filters' : {
		'id' : ['33e6620e-3cec-48c7-ab2f-85e08ff89345'],
		'customerid' : ['3bd55c5a-eac2-4dae-8016-61bd72161422'],
		'number' : ['1002'],
		'status' : ['COMPLETED'],
		'totalprice_min' : '30.55',
		'totalprice_max' : '40',
		'taxid' : ['e66f27c0-d73f-42d4-a527-3d159433e537'],
		'shippingid' : ['7bf80e69-b0e6-41a2-a621-6e595eb6d27a'],
		'shippingoption' : ['NA'],
		'couponid' : ['2c663eed-6322-42d5-91b3-a5da9563e68d'],
		'billingsame' : 'true',
		'discount_min' : '0.00',
		'discount_max' : '999.99',
		'billingfirstname' : ['Mr'],
		'billinglastname' : ['Example'],
		'billingemail' : ['example@example.com'],
		'billingphone' : ['4181234567'],
		'billingcompany' : ['commerscale'],
		'billingcountryid' : ['75b36fa9-4eb5-4a2f-8bd2-2baafd81cfe9'],
		'billingstateid' : ['ea150089-6c9f-4c00-81f3-e64e67270fe9'],
		'billingcity' : ['Quebec'],
		'billingpostalcode' : ['G1G1G1'],
		'shippingfirstname' : ['Mr'],
		'shippinglastname' : ['Example'],
		'shippingemail' : ['example@example.com'],
		'shippingphone' : ['4181234567'],
		'shippingcompany' : ['commerscale'],
		'shippingcountryid' : ['75b36fa9-4eb5-4a2f-8bd2-2baafd81cfe9'],
		'shippingstateid' : ['ea150089-6c9f-4c00-81f3-e64e67270fe9'],
		'shippingcity' : ['Quebec'],
		'shippingpostalcode' : ['G1G1G1'],
		'createdon_min' : '2015-01-01',
		'createdon_max' : '2042-01-01'
        }
    }

Response

If no error occured, you will receive a response like this one. Please refer to error messages to learn more about the possible error responses.

{
   "count": "1"
}