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": "9d09c1e6-bdbc-4784-8193-3ac326e1a0d0",
  "hasMappedShippingService": true,
  "Channels": [
    {
      "pkPostalServiceId": "cd088ea5-3aa2-475d-941f-ea743ef84b4c",
      "PostalServiceName": "sample string 2",
      "Source": "sample string 3",
      "SubSource": "sample string 4"
    },
    {
      "pkPostalServiceId": "cd088ea5-3aa2-475d-941f-ea743ef84b4c",
      "PostalServiceName": "sample string 2",
      "Source": "sample string 3",
      "SubSource": "sample string 4"
    }
  ],
  "ShippingServices": [
    {
      "pkPostalServiceId": "dee486d6-b8d4-4831-99e2-f9520ca50918",
      "PostalServiceName": "sample string 2",
      "vendor": "sample string 3",
      "accountid": "sample string 4"
    },
    {
      "pkPostalServiceId": "dee486d6-b8d4-4831-99e2-f9520ca50918",
      "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": "9d09c1e6-bdbc-4784-8193-3ac326e1a0d0",
  "TrackingNumberRequired": true,
  "WeightRequired": true,
  "IgnorePackagingGroup": true,
  "fkShippingAPIConfigId": 13,
  "IntegratedServiceId": "d5025afc-22fc-4cc0-8d42-8d87c0f7cb33"
}

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": "0a31637e-9449-43e7-9078-be06591782f1",
  "TrackingNumberRequired": true,
  "WeightRequired": true,
  "IgnorePackagingGroup": true,
  "fkShippingAPIConfigId": 12,
  "IntegratedServiceId": "68350134-3a98-4717-8d8e-ebab93b8f33c"
}