Get all shipping methods - Fabric

Documentation Index

Fetch the complete documentation index at: /llms.txt

Use this file to discover all available pages before exploring further.

Get all shipping methods

cURL

curl --request GET \
  --url https://prod01-apigw.yourcompany.fabric.zone/api-shipping/shipping/all \
  --header 'x-site-context: <x-site-context>'

Python

import requests

url = "https://prod01-apigw.yourcompany.fabric.zone/api-shipping/shipping/all"

headers = {"x-site-context": "<x-site-context>"}

response = requests.get(url, headers=headers)

print(response.text)

JavaScript (Fetch)

const options = {method: 'GET', headers: {'x-site-context': '<x-site-context>'}};

fetch('https://prod01-apigw.yourcompany.fabric.zone/api-shipping/shipping/all', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));

PHP

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://prod01-apigw.yourcompany.fabric.zone/api-shipping/shipping/all",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "x-site-context: <x-site-context>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

Go

package main

import (
    "fmt"
    "net/http"
    "io"
)

func main() {

url := "https://prod01-apigw.yourcompany.fabric.zone/api-shipping/shipping/all"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("x-site-context", "<x-site-context>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
    body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))
}

Java (Unirest)

HttpResponse<String> response = Unirest.get("https://prod01-apigw.yourcompany.fabric.zone/api-shipping/shipping/all")
  .header("x-site-context", "<x-site-context>")
  .asString();

Ruby

require 'uri'
require 'net/http'

url = URI("https://prod01-apigw.yourcompany.fabric.zone/api-shipping/shipping/all")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-site-context"] = '<x-site-context>'

response = http.request(request)
puts response.read_body

Response Codes

Example Response

[
  {
    "addressType": [
      "PO",
      "Business",
      "Residence",
      "APO",
      "MPO"
    ],
    "channel": [
      12
    ],
    "name": "2 Day",
    "description": "2 Day - guaranteed 2 day delivery by 9pm",
    "taxCode": "FR020000",
    "minimumDays": 1,
    "maximumDays": 2,
    "cutOffTime": 2100,
    "cost": 11.99,
    "regoin": "USA",
    "createdBy": "41224d776a326fb40f000001",
    "shippingMethodId": 10002,
    "__v": 0,
    "_id": "5fee9d59f2f08a1b3cbdea08",
    "createdAt": "2020-12-31T02:09:53.914Z",
    "updatedAt": "2020-12-31T02:09:53.914Z"
  }
]

Error Response

{
  "code": "<string>",
  "message": "<string>"
}

Headers

"{"date": "2023-01-01T00:00:00.000Z", "channel": 12, "account": "1234abcd5678efgh9ijklmno","stage":"production"}"


### Query Parameters

- **addressType** (string): Shipping method address type.
- **channel** (string): Shipping method channel.
- **region** (string): Shipping method region.
- **deleted** (boolean): Shipping method deleted.

### Response Schema
- **200** application/json: Shipping Methods
- **addressType** (string[]) Example:
```json
["PO", "Business", "Residence", "APO", "MPO"]