Documentation / API / Operations on Shipping Methods

GET and COUNT operations available on shipping methods.

Shipping Methods Operations

GET

URL

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

Filters

Filter Type
id Array of GUID
name Array of String (max 255 chars)
type Array of String (Predefined values)
handlingfee_min Decimal (max 8 digits and 2 decimals)
handlingfee_max Decimal (max 8 digits and 2 decimals)
fixedtype Array of String (Predefined values)
fixedamount_min Decimal (max 8 digits and 2 decimals)
fixedamount_max Decimal (max 8 digits and 2 decimals)
appliesto Array of String (Predefined values)
appliestocountryid Array of GUID (Countries)
taxable Boolean
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' : ['7bf80e69-b0e6-41a2-a621-6e595eb6d27a','8c870e43-ab92-4d67-9e95-b7aba322225e']
        }
    }

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

{
        'authentication' : {
            'apiKey' : 'jjns7519v1v3ns6xU162'
        },
        'filters' : {
		    'id' : ['7bf80e69-b0e6-41a2-a621-6e595eb6d27a','8c870e43-ab92-4d67-9e95-b7aba322225e'],
		    'name' : ['Fedex','Pickup'],
		    'type' : ['REALTIME','PICKUP'],
	        'handlingfee_min' : '4.99',
	        'handlingfee_max' : '9.99',
	        'fixedtype' : ['FLAT_ORDER'],
	        'fixedamount_min' : '0.00',
	        'fixedamount_max' : '999.99',
		    'appliesto' : ['STATE','COUNTRY'],
		    'appliestocountryid' : ['75b36fa9-4eb5-4a2f-8bd2-2baafd81cfe9'],
		    'taxable' : 'false',
		    '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: Shipping Method). Please refer to error messages to learn more about the possible error responses.

[
   {
      "id": "7bf80e69-b0e6-41a2-a621-6e595eb6d27a",
      "name": "Fedex",
      "type": "REALTIME",
      "handlingfee": "5.50",
      "fixedtype": "FLAT_ORDER",
      "fixedamount": "0.00",
      "appliesto": "STATE",
      "appliestocountryid": "75b36fa9-4eb5-4a2f-8bd2-2baafd81cfe9",
      "appliestocountrycode": "CA",
      "appliestocountryname": "Canada",
      "appliestolist": [
         "75b36fa9-4eb5-4a2f-8bd2-2baafd81cfe9"
      ],
      "taxable": "false",
      "realtime": {
         "provider": "fedex",
         "key": "example",
         "keyPassword": "example",
         "accountNumber": "example",
         "meterNumber": "example",
         "serverType": "PROD"
      },
      "logourl": "http://www.commerscale.com/static/includes/shipping-providers/fedex.png",
      "logourlsecure": "https://local-secure-cdn.commerscale.com/static/includes/shipping-providers/fedex.png",
      "author": "Mr Example",
      "createdon": "2015-11-17 21:31:39"
   },
   {
      "id": "8c870e43-ab92-4d67-9e95-b7aba322225e",
      "name": "Pickup",
      "type": "PICKUP",
      "handlingfee": "9,99",
      "fixedtype": "FLAT_ORDER",
      "fixedamount": "0,00",
      "appliesto": "COUNTRY",
      "appliestocountryid": "75b36fa9-4eb5-4a2f-8bd2-2baafd81cfe9",
      "appliestocountrycode": "CA",
      "appliestocountryname": "Canada",
      "appliestolist": [
         "75b36fa9-4eb5-4a2f-8bd2-2baafd81cfe9",
         "ea6268d6-55dd-4674-86ef-d5b166097b3c",
         "4e713edd-a030-433c-86ce-fbeb9af7e6c7"
      ],
      "taxable": "false",
      "realtime": {},
      "logourl": "",
      "logourlsecure": "",
      "author": "Mr Example",
      "createdon": "2015-11-17 21:40:28"
   }
]

COUNT

URL

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

Filters

Filter Type
id Array of GUID
name Array of String (max 255 chars)
type Array of String (Predefined values)
handlingfee_min Decimal (max 8 digits and 2 decimals)
handlingfee_max Decimal (max 8 digits and 2 decimals)
fixedtype Array of String (Predefined values)
fixedamount_min Decimal (max 8 digits and 2 decimals)
fixedamount_max Decimal (max 8 digits and 2 decimals)
appliesto Array of String (Predefined values)
appliestocountryid Array of GUID (Countries)
taxable Boolean
createdon_min DateTime
createdon_max DateTime

Request

Count the items

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

Count specific items by type

{
        'authentication' : {
            'apiKey' : 'jjns7519v1v3ns6xU162'
        },
        'filters' : {
            'type' : ['REALTIME','PICKUP']
        }
    }

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

{
        'authentication' : {
            'apiKey' : 'jjns7519v1v3ns6xU162'
        },
        'filters' : {
		    'id' : ['7bf80e69-b0e6-41a2-a621-6e595eb6d27a','8c870e43-ab92-4d67-9e95-b7aba322225e'],
		    'name' : ['Fedex','Pickup'],
		    'type' : ['REALTIME','PICKUP'],
	        'handlingfee_min' : '4.99',
	        'handlingfee_max' : '9.99',
	        'fixedtype' : ['FLAT_ORDER'],
	        'fixedamount_min' : '0.00',
	        'fixedamount_max' : '999.99',
		    'appliesto' : ['STATE','COUNTRY'],
		    'appliestocountryid' : ['75b36fa9-4eb5-4a2f-8bd2-2baafd81cfe9'],
		    'taxable' : 'false',
		    '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": "2"
}