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": "4b4353a4-a4d3-4718-b59f-1d8edfad4c32",
  "hasMappedShippingService": true,
  "Channels": [
    {
      "pkPostalServiceId": "1baa5d4e-3afe-4d3b-94a5-c6573dfe1a4f",
      "PostalServiceName": "sample string 2",
      "Source": "sample string 3",
      "SubSource": "sample string 4"
    },
    {
      "pkPostalServiceId": "1baa5d4e-3afe-4d3b-94a5-c6573dfe1a4f",
      "PostalServiceName": "sample string 2",
      "Source": "sample string 3",
      "SubSource": "sample string 4"
    }
  ],
  "ShippingServices": [
    {
      "pkPostalServiceId": "afb4b8c2-c58f-4982-99cb-18dba861764d",
      "PostalServiceName": "sample string 2",
      "vendor": "sample string 3",
      "accountid": "sample string 4"
    },
    {
      "pkPostalServiceId": "afb4b8c2-c58f-4982-99cb-18dba861764d",
      "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": "4b4353a4-a4d3-4718-b59f-1d8edfad4c32",
  "TrackingNumberRequired": true,
  "WeightRequired": true,
  "IgnorePackagingGroup": true,
  "fkShippingAPIConfigId": 13,
  "IntegratedServiceId": "ff1a2935-89e5-42ce-9a76-72f994ebaf00"
}

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": "aab3e1d8-95cd-4fe6-a841-46dbbd205a52",
  "TrackingNumberRequired": true,
  "WeightRequired": true,
  "IgnorePackagingGroup": true,
  "fkShippingAPIConfigId": 12,
  "IntegratedServiceId": "edb9cd76-3bd9-4fa8-9d40-1d7b2e95168d"
}