xclade
Admin APIShipping options

Get a Shipping Option

Retrieve a shipping option by its ID. You can expand the shipping option's relations or select the fields that should be returned.

GET
/admin/shipping-options/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

The shipping option's ID.

Query Parameters

fields?string

Comma-separated fields that should be included in the returned data. if a field is prefixed with + it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.

Response Body

application/json

application/json

text/plain

application/json

application/json

application/json

application/json

curl -X GET "https://{tenant}.api.myxclade.com/admin/shipping-options/string"
{
  "shipping_option": {
    "id": "string",
    "name": "string",
    "price_type": "calculated",
    "service_zone_id": "string",
    "service_zone": {},
    "provider_id": "string",
    "provider": {
      "id": "string",
      "is_enabled": true
    },
    "shipping_option_type_id": "string",
    "type": {
      "id": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z",
      "deleted_at": "2019-08-24T14:15:22Z",
      "label": "string",
      "description": "string",
      "code": "string",
      "shipping_option_id": "string"
    },
    "shipping_profile_id": "string",
    "shipping_profile": {
      "id": "string",
      "name": "string",
      "type": "string",
      "metadata": {},
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z",
      "deleted_at": "2019-08-24T14:15:22Z"
    },
    "rules": [
      {
        "id": "string",
        "attribute": "is_return",
        "operator": "gt",
        "value": "true",
        "shipping_option_id": "string",
        "created_at": "2019-08-24T14:15:22Z",
        "updated_at": "2019-08-24T14:15:22Z",
        "deleted_at": "2019-08-24T14:15:22Z"
      }
    ],
    "prices": [
      {
        "price_rules": [
          {
            "id": "string",
            "value": "string",
            "operator": "gt",
            "attribute": "string",
            "price_id": "string",
            "priority": 0,
            "created_at": "2019-08-24T14:15:22Z",
            "updated_at": "2019-08-24T14:15:22Z",
            "deleted_at": "2019-08-24T14:15:22Z"
          }
        ],
        "rules_count": 0,
        "id": "string",
        "title": "string",
        "currency_code": "usd",
        "amount": 0,
        "raw_amount": {},
        "min_quantity": 0,
        "max_quantity": 0,
        "price_set_id": "string",
        "created_at": "2019-08-24T14:15:22Z",
        "updated_at": "2019-08-24T14:15:22Z",
        "deleted_at": "2019-08-24T14:15:22Z"
      }
    ],
    "data": {},
    "metadata": {},
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "deleted_at": "2019-08-24T14:15:22Z"
  }
}

{
  "message": "Discount must be set to dynamic",
  "type": "not_allowed"
}

"Unauthorized"
{
  "message": "Entity with id 1 was not found",
  "type": "not_found"
}
{
  "code": "unknown_error",
  "message": "The request conflicted with another request. You may retry the request with the provided Idempotency-Key.",
  "type": "QueryRunnerAlreadyReleasedError"
}
{
  "code": "invalid_request_error",
  "message": "Discount with code TEST already exists.",
  "type": "duplicate_error"
}

{
  "code": "api_error",
  "message": "An error occured while hashing password",
  "type": "database_error"
}