Shipping-method

Shipping methods are the services that customers can choose from at checkout. They're often based on the carriers you work with, and determine what shoppers pay for shipping and how quickly they'll receive their purchase. Shipping-method of various types like Active shipping method there are no parameter and collect store from the basket shipping method. Handled by a set of endpoints, This page covers Shipping method endpoints that are created to manage shipping operations programmatically

GET/api/v2/commerce/shipping-method?basketId={{bc_basket_id}}&shipToCountryIso={{bc_country_code}}&postCode={{bc_postcode}}

Get the active shipping methods. if no parameters passed, it gets all the active shipping methods

This endpoint allows to Get the active shipping methods. if no parameters passed, it gets all the active shipping methods, you must provide basket Id, ship To Country Iso and post Code required parameter.

Developers - API Operations:

OperationEndpointResponse
Shipping methods/api/v2/commerce/shipping-method?basketId={{bc_basket_id}}&shipToCountryIso={{bc_country_code}}&postCode={{bc_postcode}}Get the active shipping methods.

Required attributes

  • Name
    basketId
    Type
    string
    Description

    Unique basket Id for Shipping method.

  • Name
    shipToCountryIso
    Type
    string
    Description

    ISO check for shipping to country.

  • Name
    postCode
    Type
    string
    Description

    Postal code of the user.

Response Properties

  • Name
    statusCode
    Type
    number
    Description

    Status code of the response.

  • Name
    status
    Type
    string
    Description

    Status of the response.

  • Name
    errors
    Type
    array
    Description

    List of errors in the response.

  • Name
    success
    Type
    boolean
    Description

    Success status of the response.

  • Name
    message
    Type
    string
    Description

    Message of the response.

  • Name
    messageCode
    Type
    string
    Description

    Message code of the response.

  • Name
    result
    Type
    object
    Description

    Result of the response.

  • Name
    id
    Type
    string
    Description

    Unique ID for the guest ceckout.

  • Name
    enabled
    Type
    object
    Description

    The Result of enabled.

  • Name
    systemName
    Type
    object
    Description

    The Result of system Name.

  • Name
    shippingCode
    Type
    object
    Description

    The Result of shipping Code.

  • Name
    displayName
    Type
    object
    Description

    The Result of display Name.

  • Name
    description
    Type
    object
    Description

    The Result of description.

  • Name
    displayOrder
    Type
    object
    Description

    The result of display Order.

  • Name
    expectedDaysToDeliver
    Type
    object
    Description

    The Result of expected Days To Deliver.

  • Name
    expectedDeliveryDate
    Type
    object
    Description

    The Result of expected Delivery Date.

  • Name
    deliveryOnOrBefore
    Type
    object
    Description

    The Result of delivery On Or Before.

  • Name
    price
    Type
    object
    Description

    The result of Price.

  • Name
    minPrice
    Type
    number
    Description

    Price of the product.

  • Name
    minPriceWithoutTax
    Type
    number
    Description

    Minmum price without tax.

  • Name
    maxPrice
    Type
    number
    Description

    Maximum Price of the product.

  • Name
    maxPriceWithoutTax
    Type
    number
    Description

    Max price without Tax.

  • Name
    currencyDecimalSeparator
    Type
    string
    Description

    Currency Decimal separator.

  • Name
    currencyDigitsAfterDecimal
    Type
    number
    Description

    Currency digit after decimal.

  • Name
    currencySymbol
    Type
    string
    Description

    Symbol for the currency of the region

  • Name
    formatted
    Type
    string
    Description

    Price format without tax.

  • Name
    withTax
    Type
    string
    Description

    Price with tax.

  • Name
    withoutTax
    Type
    number
    Description

    Minmum price without tax.

  • Name
    tax
    Type
    number
    Description

    Minmum price without tax.

  • Name
    raw
    Type
    string
    Description

    Price with tax.

  • Name
    isDefault
    Type
    object
    Description

    The Result of isDefault.

  • Name
    isNominated
    Type
    object
    Description

    The Result of is Nominated.

  • Name
    type
    Type
    object
    Description

    The Result of type.

  • Name
    carrierCode
    Type
    object
    Description

    The Result of carrier Code.

  • Name
    countryCode
    Type
    object
    Description

    The Result of country Code.

  • Name
    isPriceOnRequest
    Type
    object
    Description

    The Result of is Price On Request.

  • Name
    showRecomendation
    Type
    object
    Description

    The Result of show Recomendation.

  • Name
    recomendation
    Type
    object
    Description

    The Result of recomendation.

  • Name
    isTaxable
    Type
    object
    Description

    The Result of is Taxable.

  • Name
    shippingCostMethod
    Type
    object
    Description

    The Result of shipping Cost Method.

  • Name
    cutOffTimes
    Type
    object
    Description

    The Result of cut Off Times.

  • Name
    day
    Type
    object
    Description

    The Result of the day.

  • Name
    value
    Type
    string
    Description

    Error message.

  • Name
    hour
    Type
    object
    Description

    The Result of the hour.

  • Name
    minute
    Type
    object
    Description

    The Result of the minute.

  • Name
    countryCsv
    Type
    object
    Description

    The Result of country Csv.

Request

GET
/api/v2/commerce/shipping-method?basketId={{bc_basket_id}}&shipToCountryIso={{bc_country_code}}&postCode={{bc_postcode}}
    curl --location 'https://api20.bettercommerce.io/api/v2/commerce/shipping-method?basketId=&shipToCountryIso=GB&postCode=W44HH'

Response

{
"statusCode": 301,
"status": "ut Duis tempor et commodo",
"errors": [
"enim est dolore",
"consectetur non ad"
],
"success": true,
"message": "et ullamco aliqua dolor consequat",
"messageCode": "ut Duis pariatur aliquip",
"result": [
{
"id": "00000000-0000-0000-0000-000000000000",
"enabled": false,
"systemName": "dolore ullamco ut eiusmod",
"shippingCode": "ullamco velit",
"displayName": "enim aliquip aute",
"description": "cupidatat sit exercitation",
"displayOrder": 20108497,
"expectedDaysToDeliver": -92117022,
"expectedDeliveryDate": "2006-06-16T03:21:42.685Z",
"deliveryOnOrBefore": "nostrud dolor consequat veniam",
"price": {
"minPrice": -88173145.70952046,
"minPriceWithoutTax": -48068783.058916196,
"maxPrice": -63067534.38714865,
"maxPriceWithoutTax": -88316860.94743691,
"currencyDecimalSeparator": "enim irure",
"currencyDigitsAfterDecimal": 95416193,
"currencySymbol": "commodo voluptate",
"formatted": {
 "withTax": "magna ut id anim",
 "withoutTax": "proident D",
 "tax": "voluptate est minim exercitation"
},
"raw": {
 "withTax": -31257863.25539024,
 "withoutTax": 25999184.28302321,
 "tax": -4748871.668304488
}
},
"isDefault": false,
"isNominated": false,
"type": 2,
"carrierCode": "sit Ut Duis eu",
"countryCode": "nostrud eiusmod in enim et",
"isPriceOnRequest": true,
"showRecomendation": true,
"recomendation": "proident irure do",
"isTaxable": true,
"shippingCostMethod": 1,
"cutOffTimes": [
{
 "day": {
  "value": "<Error: Too many levels of nesting to fake this schema>"
 },
 "hour": {
  "value": "<Error: Too many levels of nesting to fake this schema>"
 },
 "minute": {
  "value": "<Error: Too many levels of nesting to fake this schema>"
 }
},
{
 "day": {
  "value": "<Error: Too many levels of nesting to fake this schema>"
 },
 "hour": {
  "value": "<Error: Too many levels of nesting to fake this schema>"
 },
 "minute": {
  "value": "<Error: Too many levels of nesting to fake this schema>"
 }
}
],
"countryCsv": "irure reprehenderit est et"
},
{
"id": "00000000-0000-0000-0000-000000000000",
"enabled": true,
"systemName": "voluptate sed eu enim",
"shippingCode": "deserunt ",
"displayName": "eu ex in",
"description": "si",
"displayOrder": 20779173,
"expectedDaysToDeliver": 11673486,
"expectedDeliveryDate": "1997-05-07T01:29:49.538Z",
"deliveryOnOrBefore": "consequat tempor Duis cillum",
"price": {
"minPrice": 45377149.07154232,
"minPriceWithoutTax": -88061802.14763156,
"maxPrice": -23065595.104934692,
"maxPriceWithoutTax": -4223764.94254224,
"currencyDecimalSeparator": "aute non deserunt enim nulla",
"currencyDigitsAfterDecimal": 48689166,
"currencySymbol": "dolore magna c",
"formatted": {
 "withTax": "anim pariatur proident aliquip",
 "withoutTax": "ut Ut fugiat",
 "tax": "magna officia est"
},
"raw": {
 "withTax": 42213024.92291349,
 "withoutTax": 15516339.63442631,
 "tax": 78580474.5504731
}
},
"isDefault": true,
"isNominated": false,
"type": 3,
"carrierCode": "velit ea culpa et",
"countryCode": "cupidatat non Lorem",
"isPriceOnRequest": true,
"showRecomendation": true,
"recomendation": "adipisicing incididunt sunt",
"isTaxable": true,
"shippingCostMethod": 1,
"cutOffTimes": [
{
 "day": {
  "value": "<Error: Too many levels of nesting to fake this schema>"
 },
 "hour": {
  "value": "<Error: Too many levels of nesting to fake this schema>"
 },
 "minute": {
  "value": "<Error: Too many levels of nesting to fake this schema>"
 }
},
{
 "day": {
  "value": "<Error: Too many levels of nesting to fake this schema>"
 },
 "hour": {
  "value": "<Error: Too many levels of nesting to fake this schema>"
 },
 "minute": {
  "value": "<Error: Too many levels of nesting to fake this schema>"
 }
}
],
"countryCsv": "officia dolor esse anim"
}
]
}

GET/api/v2/commerce/shipping-method/click-collect-stores?basketId={{bc_basket_id}}&postCode={{bc_postcode}}

Get click and collect stores for the basket + postcode combination

This endpoint allows to Get click and collect stores for the basket + postcode combination, you must provide basket Id and post Code required parameter.

Developers - API Operations:

OperationEndpointResponse
Basket process/api/v2/commerce/shipping-method/click-collect-stores?basketId={{bc_basket_id}}&postCode={{bc_postcode}}collect stores for the basket.

Required attributes

  • Name
    basketId
    Type
    string
    Description

    Unique basket Id for the basket.

  • Name
    postCode
    Type
    string
    Description

    Postal code of the user.

Response Properties

  • Name
    statusCode
    Type
    number
    Description

    Status code of the response.

  • Name
    status
    Type
    string
    Description

    Status of the response.

  • Name
    errors
    Type
    array
    Description

    List of errors in the response.

  • Name
    success
    Type
    boolean
    Description

    Success status of the response.

  • Name
    message
    Type
    string
    Description

    Message of the response.

  • Name
    messageCode
    Type
    string
    Description

    Message code of the response.

  • Name
    result
    Type
    object
    Description

    Result of the response.

  • Name
    id
    Type
    string
    Description

    Unique ID for the guest ceckout.

  • Name
    name
    Type
    object
    Description

    The Result of Name.

  • Name
    address1
    Type
    string
    Description

    First address of the user.

  • Name
    address2
    Type
    string
    Description

    Second address of the user.

  • Name
    city
    Type
    string
    Description

    The City of the user.

  • Name
    state
    Type
    string
    Description

    The State of the user.

  • Name
    postCode
    Type
    string
    Description

    The Post code of the user.

  • Name
    yourId
    Type
    string
    Description

    ID of the user.

  • Name
    distanceFromPostCode
    Type
    number
    Description

    The distance From Post Code.

  • Name
    distanceUnit
    Type
    string
    Description

    Distance unit of product.

  • Name
    shippingPlanId
    Type
    string
    Description

    Product Shipping plan ID.

  • Name
    type
    Type
    string
    Description

    Type of product.

  • Name
    leadTimeUnit
    Type
    string
    Description

    Product lead Time Unit.

  • Name
    leadTimeMin
    Type
    number
    Description

    Product lead Time Minute.

  • Name
    leadTimeMax
    Type
    number
    Description

    The value of lead Time Max.

  • Name
    deliveryOption
    Type
    string
    Description

    Product option delivery plan.

  • Name
    shippingAddressId
    Type
    string
    Description

    Product shipping Address Id.

  • Name
    openingHours
    Type
    string
    Description

    Product opening Hours.

  • Name
    slots
    Type
    Array
    Description

    The result of slots.

  • Name
    slot
    Type
    string
    Description

    The value of slot.

  • Name
    slotMessage
    Type
    string
    Description

    Slot Message.

  • Name
    whyDelayMsg1
    Type
    string
    Description

    Why Delay message 1.

  • Name
    whyDelayMsg2
    Type
    string
    Description

    Why Delay message 2.

  • Name
    whyDelayMsg3
    Type
    string
    Description

    Why Delay message 3.

  • Name
    selectedSlot
    Type
    string
    Description

    The value of selected Slot.

  • Name
    phoneNo
    Type
    string
    Description

    The phone number of the user.

  • Name
    timeslotActual
    Type
    string
    Description

    Product times lot Actual.

  • Name
    latitude
    Type
    string
    Description

    latitude coordinate of the product.

  • Name
    longitude
    Type
    number
    Description

    longitude coordinate of the product.

  • Name
    image
    Type
    string
    Description

    Image of the product.

  • Name
    country
    Type
    string
    Description

    Country of the user.

  • Name
    hdnCode
    Type
    string
    Description

    Hidden code of the product.

  • Name
    enableClickCollect
    Type
    boolean
    Description

    Flag to check enable Click Collect.

Request

GET
/api/v2/commerce/shipping-method/click-collect-stores?basketId={{bc_basket_id}}&postCode={{bc_postcode}}
    curl --location 'https://api20.bettercommerce.io/api/v2/commerce/shipping-method/click-collect-stores?basketId=&postCode=W44HH'

Response

{
"statusCode": 503,
"status": "deserun",
"errors": [
"magna",
"reprehenderit labore consequa"
],
"success": false,
"message": "sed adipisicing aliquip",
"messageCode": "aliquip proident",
"result": [
{
"id": "do pariatur",
"name": "nisi pariatur",
"address1": "nostrud Excepteur",
"address2": "nulla irure commodo Excepteur aliqua",
"city": "veniam dolore ut esse dolore",
"state": "laboris ea",
"postCode": "nulla eiusmod ut",
"yourId": "consectetur",
"distanceFromPostCode": 45917479.197107404,
"distanceUnit": "magna d",
"shippingPlanId": "in sunt commodo velit ex",
"type": "velit consectetur sint",
"leadTimeUnit": "culpa Duis labore in",
"leadTimeMin": 45078788,
"leadTimeMax": 20970495,
"deliveryOption": "consequat officia voluptate",
"shippingAddressId": "proident reprehenderit irure",
"openingHours": "qui sed",
"slots": [
{
 "slot": "nisi veniam commodo ipsum",
 "slotMessage": "do dolor"
},
{
 "slot": "sint dolore Ut magna",
 "slotMessage": "dolor"
}
],
"whyDelayMsg1": "proident qui",
"whyDelayMsg2": "Duis qui veniam",
"whyDelayMsg3": "ut non id cupidatat",
"selectedSlot": "fugiat laboris exercitation culpa",
"phoneNo": "anim in",
"timeslotActual": "ex in mollit",
"latitude": "ullamco tempor commodo dese",
"longitude": "aliquip adipisicing",
"image": "non consequat Ut",
"country": "in",
"hdnCode": "esse in",
"enableClickCollect": true
},
{
"id": "am",
"name": "dolore anim minim",
"address1": "laboris ut",
"address2": "voluptate quis aute ",
"city": "dolor sit",
"state": "magna dolor",
"postCode": "tempor sed mollit labore",
"yourId": "culpa nostrud ame",
"distanceFromPostCode": 59271392.465248376,
"distanceUnit": "Ut",
"shippingPlanId": "veniam id in",
"type": "irure in Lorem nostrud",
"leadTimeUnit": "velit",
"leadTimeMin": 80340036,
"leadTimeMax": -28237985,
"deliveryOption": "ipsum adipisicing eu",
"shippingAddressId": "ea ad qui laborum in",
"openingHours": "consequat aliquip consecte",
"slots": [
{
 "slot": "labore in minim ut non",
 "slotMessage": "ex aliqua labore Lorem"
},
{
 "slot": "s",
 "slotMessage": "amet dolor non"
}
],
"whyDelayMsg1": "dolore eiusmod id aliqua",
"whyDelayMsg2": "ipsum quis incididunt sit Lorem",
"whyDelayMsg3": "exercitation",
"selectedSlot": "pariatur ipsum qui aliqu",
"phoneNo": "esse",
"timeslotActual": "fugiat incididunt id ea",
"latitude": "ullamco in",
"longitude": "Excepteur Lorem proident",
"image": "aliqua do",
"country": "dolor reprehenderit mollit",
"hdnCode": "elit enim",
"enableClickCollect": false
}
]
}