Create a shipping rate
const url = 'https://acme.mykreezalid.com/api/v1/shipping-rates/add';const options = { method: 'POST', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"title":"Standard","description":"example","cart_info":"example","price":6.95,"step_price":1.45,"always_selected":false,"is_online":true,"pickup_delivery":false,"shipping_fees_paid_out_to_supplier":false,"apply_to_all_countries":true,"restricted_countries":["FR","BE"],"carrier_alias":"example","tracking_number_pattern":"example","tracking_url":"example","sort_priority":0,"external_id":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://acme.mykreezalid.com/api/v1/shipping-rates/add \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "title": "Standard", "description": "example", "cart_info": "example", "price": 6.95, "step_price": 1.45, "always_selected": false, "is_online": true, "pickup_delivery": false, "shipping_fees_paid_out_to_supplier": false, "apply_to_all_countries": true, "restricted_countries": [ "FR", "BE" ], "carrier_alias": "example", "tracking_number_pattern": "example", "tracking_url": "example", "sort_priority": 0, "external_id": "example" }'Creates a shipping rate. The answer always has the HTTP status 200: check success.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Name shown to customers
Example
StandardDetails shown in the cart, returned as details_in_cart
Example
6.95Price added for each additional item
Example
1.45The customer collects the order in person: no shipping address is asked
Example
[ "FR", "BE"]Responses
Section titled “Responses”Whether the shipping rate has been created
object
Identifier of the new rate; null when it was not created
A shipping rate customers can choose at checkout.
object
Shipping rate’s unique identifier
Name shown to customers
Short description
Details shown in the cart
Price of the shipping
Price added for each additional item
Whether the rate is selected by default
Whether the rate is offered
Whether the customer collects the order in person, so that no shipping address is needed
Whether the shipping fees are paid out to the vendor (otherwise they go to the marketplace)
Whether the rate applies to every country
Countries the rate is restricted to, when it does not apply to every country
Identifier of the carrier
Expected format of the tracking numbers
Tracking URL of the carrier
Position of the rate in lists, lowest first
Your own identifier for this rate
Example
{ "id": 432424, "success": true, "message": "Shipping rate created", "content": { "id": 432424, "object": "ShippingRate", "title": "Standard", "price": 6.95, "step_price": 1.45, "restricted_countries": [ "FR", "BE" ], "sort_priority": 0, "external_id": "ABC123" }}