Create a shipping rate

Request

Creates a shipping rate.

Security
SecretApiKey or JWT
Bodyapplication/jsonrequired

Shipping rate resource.

namestringrequired

Name of the shipping rate.

descriptionstring or null

Description of the shipping rate.

pricenumber, (double)required

Price of the shipping rate. If price is 0, shipping is free.

currencystring, = 3 characters(CurrencyCode)required

Currency code in ISO 4217 format.

Example:"USD"
filterstring

Filter based on invoice properties that is used to determine when the rate is applicable. If no filters are used, the rate is always applicable.

Default:""
Example:"deliveryAddress.country:US,CA,RU;amount:100..1000"
statusstring

Status of the shipping rate. If status is inactive the shipping rate is not applied.

Default:"active"
Enum:"active""inactive"
curl -i -X POST \
  https://www.rebilly.com/_mock/catalog/all/shipping-rates \
  -H 'Content-Type: application/json' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE' \
  -d '{
    "name": "string",
    "description": "string",
    "price": 0.1,
    "currency": "USD",
    "filter": "deliveryAddress.country:US,CA,RU;amount:100..1000",
    "status": "active"
  }'

Responses

Shipping rate created.

Headers
Locationstring, (uri)

Location of the related resource.

Example:"https://api.rebilly.com/example"
X-RateLimit-Limitinteger

Total number of rate limit tokens for this request within a rate limit period. For more information, see Rate limits.

Example:3600
X-RateLimit-Remaininginteger

Remaining number of rate limit tokens for this request within the rate limit period. For example, in the sandbox environment, rate limits for non-GET endpoints are set at 3000 requests per 10 minutes.

Example:3600
Bodyapplication/json
idstring, <= 50 charactersread-only

ID of the shipping rate.

Example:"ship_rate_0YVDN408G4DQE9G1RV1QCFHJ3P"
namestringrequired

Name of the shipping rate.

descriptionstring or null

Description of the shipping rate.

pricenumber, (double)required

Price of the shipping rate. If price is 0, shipping is free.

currencystring, = 3 characters(CurrencyCode)required

Currency code in ISO 4217 format.

Example:"USD"
filterstring

Filter based on invoice properties that is used to determine when the rate is applicable. If no filters are used, the rate is always applicable.

Default:""
Example:"deliveryAddress.country:US,CA,RU;amount:100..1000"
statusstring

Status of the shipping rate. If status is inactive the shipping rate is not applied.

Default:"active"
Enum:"active""inactive"
createdTimestring, (date-time)(CreatedTime)read-only

Date and time when the resource is created. This value is set automatically when the resource is created.

updatedTimestring, (date-time)(UpdatedTime)read-only

Date and time when the resource is updated. This value is set automatically when the resource is updated.

Response
{ "id": "ship_rate_0YVDN408G4DQE9G1RV1QCFHJ3P", "name": "string", "description": "string", "price": 0.1, "currency": "USD", "filter": "deliveryAddress.country:US,CA,RU;amount:100..1000", "status": "active", "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z", "_links": [ {} ] }