Ucommerce
  • Ucommerce Next Gen
    • Getting Started
      • Prerequisites
      • Licensing
      • Ucommerce Templates
      • Headless Template
      • MVC Template
    • Headless
      • Postman Collection
      • Headless API Authentication
        • Token endpoint - Authorization Header
        • Authorization Scopes
        • Refreshing the Access Token
      • Reference
        • Cart
        • Cart / Order Line Items
        • Shipment
        • Billing
        • Promotion Codes
        • Price Groups
        • Payment Methods
        • Countries
        • Shipping Methods
        • Catalogs
        • Cart Custom Properties
        • Line Item Custom Properties
        • Orders
        • Views for Cart modifying operations
      • Custom Headless APIs
      • Error Handling
      • Pagination
      • Deprecation
    • Backoffice Authentication
      • Microsoft Entra ID Example
      • Auth0 Authentication Example
    • Definitions
      • What is a Definition
    • Search and indexing
      • Configuration
      • Indexing
        • Index Definitions
        • Facets
        • Indexing Prices
        • Suggestions
        • Custom Data
      • Searching
    • Payment Providers
      • Stripe Provider Integration
      • Implementing a custom payment provider
    • Data Import
    • Miscellaneous
      • Media
      • Price Group Inheritance
      • Price Group Criteria
      • Soft Deletion Of Entities
      • Logging
      • OpenTelemetry
    • Extensions
      • Extending Pipelines
        • Order Processing Pipelines
        • Checkout Pipelines
      • Changing Service Behavior
        • Images
        • Content
      • Custom Headless APIs
      • Extend the Backoffice
        • Custom UI Components
      • Custom Editor UI
      • Custom Promotion Criteria
      • Custom Price Group Criteria
    • How-To
      • Migrate from Classic
        • Common database issues
      • Entities from code
        • Bootstrapping data on startup
        • Product Definitions & Fields
      • Discover pipelines and their tasks
      • Executing a pipeline
    • Integrations
      • Umbraco Media Delivery API
      • App Slices
        • Product Picker
  • Release Notes
  • Contact Us
Powered by GitBook
On this page
  • Prerequisites
  • Get Shipping Methods
  • Optional Parameters
  • Request
  • Response
  • Error Handling
  • Related Articles

Was this helpful?

  1. Ucommerce Next Gen
  2. Headless
  3. Reference

Shipping Methods

Prerequisites

  • access_token from Headless API Authentication

  • cultureCode, e.g. en-US (string)

  • countryId from Countries

  • priceGroupId from the cart or from Price Groups

Get Shipping Methods

Optional Parameters

  • maxItems, limits the number of results returned. in Pagination

  • nextPagingToken, required to fetch the next page. Read more in Pagination

Request

curl -D- -X GET <base_url>/api/v1/shipping-methods?cultureCode=<cultureCode>&countryId=<countryId>&priceGroupId=<priceGroupId> \
    -H 'Authorization: Bearer <ACCESS_TOKEN>'
    -H 'Content-Type: application/json' \

Response

{
   "nextPagingToken": null,
   "shippingMethods": [
        {
           "description": "{description}",
           "displayName": "{displayName}",
           "id": "{id}",
           "imageUrl": "{imageUrl}",
           "name": "{name}",
           "price": {
           "amount": "{amount}",
           "currency": "{currency}"
           }
        },
        {
           "description": "{description}",
           "displayName": "{displayName}",
           "id": "{id}",
           "imageUrl": "{imageUrl}",
           "name": "{name}",
           "price": {
           "amount": "{amount}",
           "currency": "{currency}"
           }
        },
        {
           "description": "{description}",
           "displayName": "{displayName}",
           "id": "{id}",
           "imageUrl": "{imageUrl}",
           "name": "{name}",
           "price": {
           "amount": "{amount}",
           "currency": "{currency}"
           }
        }
       ]
}

Error Handling

Error
Description

BadRequest (400)

No shipping methods are found for the given price group or country.

Unauthorized (401)

The token is expired.

Forbidden (403)

The token does not have access to this endpoint.

Error Response Example

{
"errors":
    [
        {
            "error-description": "Shipping methods not found on the given context.",
            "error": "BadRequest"
        }
    ]
}

Related Articles

PreviousCountriesNextCatalogs

Last updated 1 year ago

Was this helpful?

Error Handling