xclade
Admin APIFulfillment sets

Update the Service Zone of a Fulfillment Set

Update the details of a service zone in a fulfillment set.

POST
/admin/fulfillment-sets/{id}/service-zones/{zone_id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

The fulfillment set's ID.

zone_id*string

The service zone'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.

Request Body

application/json

name?string

The service zone's name.

geo_zones?

The service zone's associated geo zones.

Response Body

application/json

application/json

text/plain

application/json

application/json

application/json

application/json

curl -X POST "https://{tenant}.api.myxclade.com/admin/fulfillment-sets/string/service-zones/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "fulfillment_set": {
    "id": "string",
    "name": "string",
    "type": "string",
    "location": {
      "id": "string",
      "name": "string",
      "address_id": "string",
      "address": {
        "id": "string",
        "address_1": "string",
        "address_2": "string",
        "company": "string",
        "country_code": "us",
        "city": "string",
        "phone": "string",
        "postal_code": "string",
        "province": "us-ca"
      },
      "sales_channels": [
        {
          "id": "string",
          "name": "string",
          "description": "string",
          "is_disabled": true,
          "metadata": {},
          "created_at": "2019-08-24T14:15:22Z",
          "updated_at": "2019-08-24T14:15:22Z",
          "deleted_at": "2019-08-24T14:15:22Z"
        }
      ],
      "fulfillment_providers": [
        {
          "id": "string",
          "is_enabled": true
        }
      ],
      "fulfillment_sets": [
        {}
      ]
    },
    "service_zones": [
      {
        "id": "string",
        "name": "string",
        "fulfillment_set_id": "string",
        "fulfillment_set": {},
        "geo_zones": [
          {
            "id": "string",
            "type": "country",
            "country_code": "string",
            "province_code": "us-ca",
            "city": "string",
            "postal_expression": {},
            "created_at": "2019-08-24T14:15:22Z",
            "updated_at": "2019-08-24T14:15:22Z",
            "deleted_at": "2019-08-24T14:15:22Z"
          }
        ],
        "shipping_options": [
          {
            "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"
          }
        ],
        "created_at": "2019-08-24T14:15:22Z",
        "updated_at": "2019-08-24T14:15:22Z",
        "deleted_at": "2019-08-24T14:15:22Z"
      }
    ],
    "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"
}