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.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": "6f6faa56-5153-429e-acf6-140deac092d4",
  "hasMappedShippingService": true,
  "Channels": [
    {
      "pkPostalServiceId": "ea7f2b62-5e6a-4068-8c14-b0bf4a5c4bf4",
      "PostalServiceName": "sample string 2",
      "Source": "sample string 3",
      "SubSource": "sample string 4"
    },
    {
      "pkPostalServiceId": "ea7f2b62-5e6a-4068-8c14-b0bf4a5c4bf4",
      "PostalServiceName": "sample string 2",
      "Source": "sample string 3",
      "SubSource": "sample string 4"
    }
  ],
  "ShippingServices": [
    {
      "pkPostalServiceId": "5e1242c1-8b4f-4a70-b1a1-59233f6aede3",
      "PostalServiceName": "sample string 2",
      "vendor": "sample string 3",
      "accountid": "sample string 4",
      "vendorFriendlyName": "sample string 5"
    },
    {
      "pkPostalServiceId": "5e1242c1-8b4f-4a70-b1a1-59233f6aede3",
      "PostalServiceName": "sample string 2",
      "vendor": "sample string 3",
      "accountid": "sample string 4",
      "vendorFriendlyName": "sample string 5"
    }
  ],
  "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": "6f6faa56-5153-429e-acf6-140deac092d4",
  "TrackingNumberRequired": true,
  "WeightRequired": true,
  "IgnorePackagingGroup": true,
  "fkShippingAPIConfigId": 13,
  "IntegratedServiceId": "9ba60144-2f07-473f-81f4-6a24c19771b5"
}

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": "38eb2605-5beb-4f0d-8ea1-79434892d115",
  "TrackingNumberRequired": true,
  "WeightRequired": true,
  "IgnorePackagingGroup": true,
  "fkShippingAPIConfigId": 12,
  "IntegratedServiceId": "c60bc800-534b-4ced-aed6-c6508c9ed5e5"
}