Shipping Fees
Header parameters
Acceptstring · enumRequiredDefault:
application/jsonExample: application/jsonPossible values: X-Avangate-AuthenticationstringRequiredExample:
Authentication header
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"Responses
200
List all shipping fees
application/json
NamestringOptional
CodestringOptional
AmountstringOptional
CurrencystringOptional
ApplyTostringOptional
TypestringOptional
400
Shipping feature not enabled.
application/json
401
Authentication failure
application/json
get/shippingfees/
GET /rest/6.0/shippingfees/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
[
{
"Name": "shipping fee name #1",
"Code": "4236A227D2",
"Amount": "1.00",
"Currency": "USD",
"ApplyTo": "PRODUCT",
"Type": "FIXED"
},
{
"Name": "shipping fee name #2",
"Code": "9366C227E7",
"Amount": "0.00",
"Currency": "EUR",
"ApplyTo": "ORDER",
"Type": "FIXED"
}
]Path parameters
ShippingFeeCodestringRequiredExample:
Unique code which represents a shipping fee
9366C227E7Header parameters
Acceptstring · enumRequiredDefault:
application/jsonExample: application/jsonPossible values: X-Avangate-AuthenticationstringRequiredExample:
Authentication header
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"Responses
200
Get shipping fee
application/json
NamestringOptional
CodestringOptional
AmountstringOptional
CurrencystringOptional
ApplyTostringOptional
TypestringOptional
400
Shipping fee code not found.
application/json
401
Authentication failure
application/json
get/shippingfees/{ShippingFeeCode}/
GET /rest/6.0/shippingfees/{ShippingFeeCode}/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
[
{
"Name": "shipping fee name #2",
"Code": "9366C227E7",
"Amount": "0.00",
"Currency": "EUR",
"ApplyTo": "ORDER",
"Type": "FIXED"
}
]Query parameters
NamestringOptionalExample:
Shipping method name
ShippingMethodNameCodesstring[]OptionalExample:
Shipping methods codes
["8902DDC4C3","3D4DD3B4A3"]Countriesstring[]OptionalExample:
Shipping methods countries
["US","UK","AU"]ActivebooleanOptionalExample:
Shipping method status
truePageintegerOptionalExample:
Page number
3LimitintegerOptionalExample:
Number of results on a page
25Header parameters
Acceptstring · enumRequiredDefault:
application/jsonExample: application/jsonPossible values: X-Avangate-AuthenticationstringRequiredExample:
Authentication header
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"Responses
200
Shipping methods object
application/json
400
Bad request
application/json
get/shippingmethods
GET /rest/6.0/shippingmethods HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
{
"Items": [
{
"Name": "Shipping56",
"Code": "3D4DD3B4A3",
"TrackingUrl": "https://www.9230-kasdjx-a-z.com",
"BasePrice": 23,
"Currency": "USD",
"Active": true,
"Availability": "ALL",
"Countries": [
{
"CountryCode": "AE",
"Surcharge": "0"
}
],
"Surcharge": [
{
"Type": "WEIGHT",
"From": 1.5,
"To": -1,
"Amount": 1,
"ApplyTo": "unit"
}
]
}
],
"Pagination": {
"Page": 1,
"Limit": 10,
"Count": 12
}
}Header parameters
X-Avangate-AuthenticationstringRequiredExample:
Authentication header
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"Acceptstring · enumRequiredExample:
application/jsonPossible values: Body
CurrencystringOptional
Responses
200
OK
application/json
500
OK
application/json
put/orders/0/shipping/
PUT /rest/6.0/orders/0/shipping/ HTTP/1.1
Host: api.2checkout.com
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Accept: application/json
Content-Type: application/json
Content-Length: 164
{
"BillingDetails": {
"CountryCode": "US"
},
"CouponCodes": [
null
],
"Currency": "USD",
"DeliveryDetails": {
"CountryCode": "US"
},
"Items": [
{
"Code": "tangible_code",
"Quantity": 2
}
]
}[
{
"Code": "8A3AA7B463",
"Currency": "USD",
"Name": "US_Shipping_Method",
"PriceDetails": {
"Gross": {
"BasePrice": 4,
"CountrySurcharge": 2,
"OrderSurcharge": 0,
"OverweightAmount": 320,
"TotalAmount": 336,
"WeightSurcharge": 10
},
"Net": {
"BasePrice": 4,
"CountrySurcharge": 2,
"OrderSurcharge": 0,
"OverweightAmount": 320,
"TotalAmount": 336,
"WeightSurcharge": 10
}
},
"TrackingUrl": ""
}
]Last updated
Was this helpful?