Close
logo

Shipping Service Levels Pipe

Git RepositoryEdit on Github
Last update: 2 years ago by luigi mangaReading time: 2 min

When setting up vendor shipping rates, Onport allows you to dynamically filter the service levels via an API pipeline. For example, it possible to change the shipping price, omit certain service levels on specific weekdays, apply markups or change service level names.

The Service Levels API pipeline configuration is available in the Setup -> Vendor Shipping Rates settings page, under the Shipping Type section, after selecting the shipping rate.

After ticking the Filter service levels through an API pipeline, you will be able to enter the Service filtering endpoint URL.

Onport will send the following JSON payload containing the list of items as well as the rates.

{
"items": [
{
"price": 0,
"variant": {
"id": 26473,
"sku": "md6iodcaja7",
"name": "Default name",
"tags": null,
"grams": 1000,
"notes": null,
"hsCode": null,
"images": [
],
"levels": null,
"vendor": {
"id": 21847,
"email": "15238@test.com",
"orderEmail": null,
"warehouseId": null,
"warehouseRouting": "select",
"fulfillmentPolicy": "dropship",
"dropshipProcessing": "dropship_provider",
"specifyDropshipProviders": true
},
"barcode": null,
"taxable": true,
"leadTime": null,
"position": 0,
"vendorId": 21847,
"companyId": 16844,
"costPrice": 0,
"createdAt": "2021-06-11T11:42:55.866Z",
"productId": 15238,
"updatedAt": "2021-06-11T11:42:56.300Z",
"vendorSku": null,
"description": null,
"productType": null,
"distanceUnit": "in",
"imagesMapped": [
],
"packingDepth": 0,
"packingWidth": 0,
"serialPrefix": "PRE",
"serialSuffix": "SUF",
"denyThreshold": 0,
"inventorySync": "channel",
"inventoryType": "tracked",
"packingHeight": 0,
"accountingSync": "active",
"commissionRate": 0,
"inventoryFeeds": 0,
"orderSplitting": "default",
"totalSaleItems": 0,
"countryOfOrigin": null,
"inventoryPolicy": "track",
"serialReference": 0,
"inventoryRouting": "inventory_feed",
"requiresShipping": null,
"backorderQuantity": 0,
"fulfillmentPolicy": "dropship",
"inventoryQuantity": 0,
"noInventoryPolicy": "replenish",
"commissionRateType": "percentage",
"dropshipProviderId": null,
"inventoryAllocated": 0,
"resellerVisibility": "visible",
"totalPurchaseItems": 0,
"lowInventoryQuantity": true,
"minInventoryQuantity": 0,
"commissionRateRouting": "dropship_provider",
"automaticallyBackorder": "vendor_default",
"dynamicInventoryPolicy": null,
"defaultPurchaseQuantity": 1,
"dropshipProviderMapping": "brand_name",
"inventory_feed_variants": [
],
"dropshipProviderAddressId": null,
"dropshipProviderAddressMapping": "default"
},
"quantity": 1,
"variantParcels": [
],
"externalVariantId": 26473
}
],
"rates": [
{
"test": false,
"price": 10.55,
"quoteId": {
"id": 6863,
"externalId": "shipping-integration-one",
"integration": "shippingIntegration",
"shippingIntegrationId": 832
},
"provider": "shipping-integration-one",
"quoteHash": "e1184855fdcadbba1a7e7bae248a47b0c18cefbb9982bd90871a545764ee840b6742579343cde8055753382ec0812d71fe272cdcf597ee4139d12ccc1412c4be10c1f7a21f70ce38bb0b4b5be997c766a8dfb978e78e9fd8aa3d0637bbf338a454cb618029b321bf7370b7afe5d3dbc13dff96bbfc4395e407ecb5062f8762a6",
"providerId": "shipping-integration-one",
"integration": "shippingIntegration",
"serviceLevel": "shipping-integration-one",
"serviceLevelToken": "shipping-integration-one",
"shippingIntegrationId": 832
},
{
"test": false,
"price": 10.55,
"quoteId": {
"id": 6863,
"externalId": "shipping-integration-two",
"integration": "shippingIntegration",
"shippingIntegrationId": 832
},
"provider": "shipping-integration-two",
"quoteHash": "e1184855fdcadbba1a7e7bae248a47b0c18cefbb9982bd90871a545764ee840b6742579343cde8055753382ec0812d71fe272cdcf597ee4139d12ccc1412c4be8e6c0b5bab228d0985019c966fc166cef5d0b5cff19a43d493f025831fd377764e313c2039eb5fc99e75ae321c28b2c302fa20dd04780146eeaca22ca787ce09",
"providerId": "shipping-integration-two",
"integration": "shippingIntegration",
"serviceLevel": "shipping-integration-two",
"serviceLevelToken": "shipping-integration-two",
"shippingIntegrationId": 832
},
{
"test": false,
"price": 10.55,
"quoteId": {
"id": 6863,
"externalId": "shipping-integration-three",
"integration": "shippingIntegration",
"shippingIntegrationId": 832
},
"provider": "shipping-integration-three",
"quoteHash": "e1184855fdcadbba1a7e7bae248a47b0c18cefbb9982bd90871a545764ee840b6742579343cde8055753382ec0812d71fe272cdcf597ee4139d12ccc1412c4bec3c499301e68062065f6f7fbcf80f6ef1e3a6b5f0249ceb28b1836d09708b1b0c22550339a585cd04508b579a1fea6445178d3e09a9004454dc9507d72512669",
"providerId": "shipping-integration-three",
"integration": "shippingIntegration",
"serviceLevel": "shipping-integration-three",
"serviceLevelToken": "shipping-integration-three",
"shippingIntegrationId": 832
}
]
}

Onport expects to receive a response which needs to be valid according to the following JSON Schema:

{
"type": "object",
"required": [
"rates"
],
"properties": {
"rates": {
"type": "array",
"items": {
"type": "object",
"required": [
"price",
"provider",
"quoteId",
"serviceLevel",
"serviceLevelToken"
],
"properties": {
"iso": {
"type": [
"string",
"null"
],
"maxLength": 3,
"minLength": 3
},
"days": {
"type": [
"integer",
"null"
],
"minimum": 0
},
"test": {
"type": [
"boolean",
"null"
]
},
"price": {
"type": "number",
"minimum": 0
},
"quoteId": {
"type": "string"
},
"provider": {
"type": "string"
},
"providerId": {
"type": [
"string",
"null"
]
},
"providerCode": {
"type": [
"string",
"null"
]
},
"serviceLevel": {
"type": "string"
},
"serviceLevelTerms": {
"type": [
"string",
"null"
]
},
"serviceLevelToken": {
"type": "string"
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
}
๐Ÿ” API Pipeline โ€” Previous
Price Uplift Pipe
Next โ€” ๐Ÿ” API Pipeline
Vendor Order Data Pipe