For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create Fallback Shipping Method

Creates a new fallback shipping method for the merchant.

Create a Fallback Shipping Method

post

Creates a method. If handle is omitted it is generated from the label; if supplied it must be unique for the merchant (otherwise 409). label, price, and currency are required.

Path parameters
merchant_idinteger · int32Required
Header parameters
X-Violet-TokenstringRequired
X-Violet-App-SecretstringRequired
X-Violet-App-Idinteger · int32Required
Body
labelstringOptional

The name of the shipping method.

descriptionstringOptional

Description of the shipping method.

priceinteger · int32Optional

The price of the shipping method in cents.

currencystring · enumOptional

The currency of the shipping method.

Possible values:
handlestringOptional

The handle or external ID to use when utilizing this method.

calculation_typestring · enum · nullableOptional

Whether the price is calculated per the entire order or per item.

Possible values:
Responses
200

The created fallback shipping method, including its handle.

application/json
labelstringOptional

The name of the shipping method.

descriptionstringOptional

Description of the shipping method.

priceinteger · int32Optional

The price of the shipping method in cents.

currencystring · enumOptional

The currency of the shipping method.

Possible values:
handlestringOptional

The handle or external ID to use when utilizing this method.

calculation_typestring · enum · nullableOptional

Whether the price is calculated per the entire order or per item.

Possible values:
post/merchants/{merchant_id}/shipping-methods
POST /v1/merchants/{merchant_id}/shipping-methods HTTP/1.1
Host: sandbox-api.violet.io
X-Violet-Token: text
X-Violet-App-Secret: text
X-Violet-App-Id: 1
Content-Type: application/json
Accept: */*
Content-Length: 80

{
  "label": "Standard",
  "price": 500,
  "currency": "USD",
  "calculation_type": "PER_ORDER"
}
200

The created fallback shipping method, including its handle.

{
  "label": "Standard",
  "description": "5-7 business days",
  "price": 500,
  "currency": "USD",
  "handle": "standard",
  "calculation_type": "PER_ORDER"
}

Last updated

Was this helpful?