Back

Search

Search

Methods

Inventory

Orders

PostalServices /CreatePostalService

Response: PostalService



Adds a new postal service to the database

Parameters

NameTypeDescription
PostalServiceDetailsPostalService_WithChannelAndShippingLinksInformation about postal service

HTTP Endpoint

Server /PostalServices / CreatePostalService

Permissions

GlobalPermissions.ShippingService.PostalServices.PostalServicesNode

Example Code

Example Request

The following request format is required for this method.

POST https://eu-ext.linnworks.net//api/PostalServices/CreatePostalService HTTP/1.1
Host: eu-ext.linnworks.net
Connection: keep-alive
Accept: application/json, text/javascript, */*; q=0.01
Origin: https://www.linnworks.net
Accept-Language: en
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: https://www.linnworks.net/
Accept-Encoding: gzip, deflate
Authorization: INSERT_YOUR_TOKEN_HERE

PostalServiceDetails={
  "id": "d2cd1130-20b3-4436-9028-3005992c2838",
  "hasMappedShippingService": true,
  "Channels": [
    {
      "pkPostalServiceId": "cbb88c89-384c-449a-8cfe-7b4160047003",
      "PostalServiceName": "sample string 2",
      "Source": "sample string 3",
      "SubSource": "sample string 4"
    },
    {
      "pkPostalServiceId": "cbb88c89-384c-449a-8cfe-7b4160047003",
      "PostalServiceName": "sample string 2",
      "Source": "sample string 3",
      "SubSource": "sample string 4"
    }
  ],
  "ShippingServices": [
    {
      "pkPostalServiceId": "1aae0f9a-bbdd-414d-b3ae-44465cdd5c95",
      "PostalServiceName": "sample string 2",
      "vendor": "sample string 3",
      "accountid": "sample string 4"
    },
    {
      "pkPostalServiceId": "1aae0f9a-bbdd-414d-b3ae-44465cdd5c95",
      "PostalServiceName": "sample string 2",
      "vendor": "sample string 3",
      "accountid": "sample string 4"
    }
  ],
  "PostalServiceName": "sample string 2",
  "PostalServiceTag": "sample string 3",
  "ServiceCountry": "sample string 4",
  "PostalServiceCode": "sample string 5",
  "Vendor": "sample string 6",
  "PrintModule": "sample string 7",
  "PrintModuleTitle": "sample string 8",
  "pkPostalServiceId": "d2cd1130-20b3-4436-9028-3005992c2838",
  "TrackingNumberRequired": true,
  "WeightRequired": true,
  "IgnorePackagingGroup": true,
  "fkShippingAPIConfigId": 13,
  "IntegratedServiceId": "ab12d469-3d13-4b6d-8991-86f8145657bc"
}

Response

This is an example response. Results may vary depending on your data.

{
  "PostalServiceName": "sample string 1",
  "PostalServiceTag": "sample string 2",
  "ServiceCountry": "sample string 3",
  "PostalServiceCode": "sample string 4",
  "Vendor": "sample string 5",
  "PrintModule": "sample string 6",
  "PrintModuleTitle": "sample string 7",
  "pkPostalServiceId": "8b00c964-fb78-4c23-9378-4bd81e579e3a",
  "TrackingNumberRequired": true,
  "WeightRequired": true,
  "IgnorePackagingGroup": true,
  "fkShippingAPIConfigId": 12,
  "IntegratedServiceId": "b0bca424-6435-49e5-9b92-a9ffc48c3e30"
}