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": "d2c5e284-3c66-480d-8dac-01003f0a41a0",
  "hasMappedShippingService": true,
  "Channels": [
    {
      "pkPostalServiceId": "259cb920-01da-4a16-a41a-e5b7e50377e3",
      "PostalServiceName": "sample string 2",
      "Source": "sample string 3",
      "SubSource": "sample string 4"
    },
    {
      "pkPostalServiceId": "259cb920-01da-4a16-a41a-e5b7e50377e3",
      "PostalServiceName": "sample string 2",
      "Source": "sample string 3",
      "SubSource": "sample string 4"
    }
  ],
  "ShippingServices": [
    {
      "pkPostalServiceId": "2ce382dd-78b9-4685-bad0-3761daf692fb",
      "PostalServiceName": "sample string 2",
      "vendor": "sample string 3",
      "accountid": "sample string 4",
      "vendorFriendlyName": "sample string 5"
    },
    {
      "pkPostalServiceId": "2ce382dd-78b9-4685-bad0-3761daf692fb",
      "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": "d2c5e284-3c66-480d-8dac-01003f0a41a0",
  "TrackingNumberRequired": true,
  "WeightRequired": true,
  "IgnorePackagingGroup": true,
  "fkShippingAPIConfigId": 13,
  "IntegratedServiceId": "3cd13ec7-d9aa-4f8e-a916-ec41853ef987"
}

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": "bab02abb-a684-49e0-8416-aaa0be69d963",
  "TrackingNumberRequired": true,
  "WeightRequired": true,
  "IgnorePackagingGroup": true,
  "fkShippingAPIConfigId": 12,
  "IntegratedServiceId": "0df87cf2-5340-43ff-ab1b-e9a7b25688f7"
}