Fulfillment Manager API · rates

Replace a sales channel's checkout rate rules, whole

PUT /channels/{channelId}/rate-rules

The channel must be one of the organization's (404 ChannelNotFound) and every carrier account a rule names the organization's (404 CarrierAccountNotFound); free shipping on listed services must list some and transit days name each service once (400 RateRulesInvalid). Appends fulfillment.rate-rules-saved. Idempotent by content: the rules as they already stand append nothing.

Access

Requires settings:write.

How scopes come from roles: Scopes and roles. Getting a token: Authentication and app tokens.

Retries

Idempotent by content: the rules as they already stand append nothing.

Why every write carries a key: Idempotency and retries.

Facts appended

  • fulfillment.rate-rules-saved

What a fact is: Facts and the journal.

AI agent tool

Agents call this as fulfillment_save_rate_rules (Fulfillment: Save rate rules), in the parcels toolset.

Connecting an agent: AI agents.

Example

curl
curl -X PUT 'https://fulfillment.getmanifold.io/channels/chn_01a0f6b5-5030-7cc1-8e46-4e5f60718293/rate-rules' \
  -H "Authorization: Bearer $MANIFOLD_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
  "adjust": {
    "percentBp": 1000,
    "rounding": "up-to-99"
  },
  "allow": [
    {
      "carrierAccountId": "car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d",
      "serviceCode": "7E55"
    },
    {
      "carrierAccountId": "car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d",
      "serviceCode": "7J55"
    }
  ],
  "collapse": "none",
  "renames": [
    {
      "ref": {
        "carrierAccountId": "car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d",
        "serviceCode": "7E55"
      },
      "title": "Standard shipping"
    },
    {
      "ref": {
        "carrierAccountId": "car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d",
        "serviceCode": "7J55"
      },
      "title": "Express shipping"
    }
  ],
  "free": {
    "overCents": 15000,
    "applies": "cheapest"
  },
  "fallback": {
    "title": "Standard shipping",
    "priceCents": 1500
  },
  "dispatch": {
    "handlingDays": 1,
    "cutoff": "14:00",
    "timeZone": "Australia/Perth"
  }
}'
JavaScript (fetch)
const response = await fetch("https://fulfillment.getmanifold.io/channels/chn_01a0f6b5-5030-7cc1-8e46-4e5f60718293/rate-rules", {
  method: "PUT",
  headers: { Authorization: `Bearer ${process.env.MANIFOLD_TOKEN}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "adjust": {
      "percentBp": 1000,
      "rounding": "up-to-99"
    },
    "allow": [
      {
        "carrierAccountId": "car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d",
        "serviceCode": "7E55"
      },
      {
        "carrierAccountId": "car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d",
        "serviceCode": "7J55"
      }
    ],
    "collapse": "none",
    "renames": [
      {
        "ref": {
          "carrierAccountId": "car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d",
          "serviceCode": "7E55"
        },
        "title": "Standard shipping"
      },
      {
        "ref": {
          "carrierAccountId": "car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d",
          "serviceCode": "7J55"
        },
        "title": "Express shipping"
      }
    ],
    "free": {
      "overCents": 15000,
      "applies": "cheapest"
    },
    "fallback": {
      "title": "Standard shipping",
      "priceCents": 1500
    },
    "dispatch": {
      "handlingDays": 1,
      "cutoff": "14:00",
      "timeZone": "Australia/Perth"
    }
  }),
});
if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);
const answer = await response.json();
Request body · application/json
{
  "adjust": {
    "percentBp": 1000,
    "rounding": "up-to-99"
  },
  "allow": [
    {
      "carrierAccountId": "car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d",
      "serviceCode": "7E55"
    },
    {
      "carrierAccountId": "car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d",
      "serviceCode": "7J55"
    }
  ],
  "collapse": "none",
  "renames": [
    {
      "ref": {
        "carrierAccountId": "car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d",
        "serviceCode": "7E55"
      },
      "title": "Standard shipping"
    },
    {
      "ref": {
        "carrierAccountId": "car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d",
        "serviceCode": "7J55"
      },
      "title": "Express shipping"
    }
  ],
  "free": {
    "overCents": 15000,
    "applies": "cheapest"
  },
  "fallback": {
    "title": "Standard shipping",
    "priceCents": 1500
  },
  "dispatch": {
    "handlingDays": 1,
    "cutoff": "14:00",
    "timeZone": "Australia/Perth"
  }
}
Response · 200 · application/json
{
  "channelId": "chn_01a0f6b5-5030-7cc1-8e46-4e5f60718293",
  "adjust": {
    "percentBp": 1000,
    "rounding": "up-to-99",
    "fixedCents": 0
  },
  "allow": [
    {
      "carrierAccountId": "car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d",
      "serviceCode": "7E55"
    },
    {
      "carrierAccountId": "car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d",
      "serviceCode": "7J55"
    }
  ],
  "collapse": "none",
  "renames": [
    {
      "ref": {
        "carrierAccountId": "car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d",
        "serviceCode": "7E55"
      },
      "title": "Standard shipping"
    },
    {
      "ref": {
        "carrierAccountId": "car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d",
        "serviceCode": "7J55"
      },
      "title": "Express shipping"
    }
  ],
  "free": {
    "overCents": 15000,
    "applies": "cheapest"
  },
  "fallback": {
    "title": "Standard shipping",
    "priceCents": 1500
  },
  "dispatch": {
    "handlingDays": 1,
    "cutoff": "14:00",
    "timeZone": "Australia/Perth"
  },
  "transit": []
}

The panel writes this call in other languages. It does not send it: Manifold's APIs do not take calls from a web page on another site, so run the call from your own code or terminal. The whole API as OpenAPI: fulfillment-manager.openapi.json. Base URL https://fulfillment.getmanifold.io.

Errors

Every refusal is a status and a JSON body whose _tag names it. A refused call changes nothing.

400

RefusalWhat it meansWhat to do
RateRulesInvalid reason The rate rules do not fit together. reason says how.Fix the rules and send them again.

401

RefusalWhat it meansWhat to do
Unauthorized reason The token is missing, expired or not one Manifold issued.Get a fresh token and send the call again.
TokenAlreadyUsed tokenId A single-use app token was already spent.Mint a new token for this call.

402

RefusalWhat it meansWhat to do
SubscriptionRequired status The organization's subscription has lapsed, so writes are refused.An owner settles billing. Reads still work meanwhile.

403

RefusalWhat it meansWhat to do
TenantRequired userId The token names no organization.Choose the organization, then get a new token.
ScopeRequired required The token's roles do not grant the scope this call needs.Ask an owner or admin for a role that grants it.

404

RefusalWhat it meansWhat to do
ChannelNotFound channelId No such record in this organization.Check the id in the path or the body.
CarrierAccountNotFound carrierAccountId No such record in this organization.Check the id in the path or the body.

409

RefusalWhat it meansWhat to do
MirroredFromSource source This area is fed by your source system until the organization goes live.Make the change in the source system, or go live first.

502

RefusalWhat it meansWhat to do
InventoryUnavailable reason The inventory service did not answer, so nothing changed.Send the same request again shortly.

503

RefusalWhat it meansWhat to do
RequestLogUnavailable tokenId, reason The service could not record the request, so it did nothing.Send the same request again shortly.

How refusals work everywhere: Errors.