Advertisement
Guest User

interlinkflow

a guest
Jan 27th, 2017
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 19.80 KB | None | 0 0
  1. {
  2.   "swagger": "2.0",
  3.   "info": {
  4.     "title": "Interlink Express API",
  5.     "description": "API Documentation Shipping Interlink Express",
  6.     "version": "1.0.0"
  7.   },
  8.   "host": "api.interlinkexpress.com",
  9.   "schemes": [
  10.     "https"
  11.   ],
  12.   "basePath": "/",
  13.   "produces": [
  14.     "application/json"
  15.   ],
  16.   "securityDefinitions": {
  17.     "Authorization": {
  18.       "type": "basic"
  19.     },
  20.     "GeoSession": {
  21.       "type": "apiKey",
  22.       "in": "header",
  23.       "name": "GeoSession"
  24.     }
  25.   },
  26.   "security": [],
  27.   "paths": {
  28.     "/user": {
  29.       "post": {
  30.         "summary": "Login API.",
  31.         "description": "The Login API is different to all other APIs as it returns a GeoSession. The other APIs require the GeoSession to be passed in as a security validation. Calling this API also sets up a session on the Interlink servers. This server session allows all future interactions to be validated without the need to present login credentials. The API requires the username and password to be encrypted using base64 encryption and then passed as an Authorization header in the HTTP request,\n\nExample\n\nusername = DSmith\n\n\npassword = MYPassWd66\n\nConcatenate the username and password with a colon in between and encrypt to base64 as a single string:\n\ne.g: DSmith:MYPassWd66\n\nThis would result in a string of: RFNtaXRoOk1ZUGFzc1dkNjY=\n\nThis can be applied to the http request as a header of:\n\nAuthorization: Basic RFNtaXRoOk1ZUGFzc1dkNjY=\n\nA returning http response code of 401 means the username or password are incorrect  ",
  32.         "operationId": "login",
  33.         "produces": [
  34.           "application/json"
  35.         ],
  36.         "consumes": [
  37.           "application/json"
  38.         ],
  39.         "parameters": [
  40.           {
  41.             "name": "action",
  42.             "in": "query",
  43.             "description": "",
  44.             "required": true,
  45.             "default": "login",
  46.             "type": "string"
  47.           }
  48.         ],
  49.         "security": [
  50.           {
  51.             "Authorization": []
  52.           }
  53.         ],
  54.         "tags": [
  55.           "Login"
  56.         ],
  57.         "responses": {
  58.           "200": {
  59.             "description": "Response object.",
  60.             "schema": {
  61.               "type": "array",
  62.               "items": {
  63.                 "$ref": "#/definitions/LoginResponse"
  64.               }
  65.             }
  66.           },
  67.           "default": {
  68.             "description": "Unexpected error",
  69.             "schema": {
  70.               "$ref": "#/definitions/Error"
  71.             }
  72.           }
  73.         },
  74.         "x-ms-visibility": "advanced"
  75.       }
  76.     },
  77.     "/shipping/shipment": {
  78.       "post": {
  79.         "summary": "Create shipment.",
  80.         "description": "The Login API is different to all other APIs as it returns a GeoSession. The other APIs require the GeoSession to be passed in as a security validation. Calling this API also sets up a session on the Interlink servers. This server session allows all future interactions to be validated without the need to present login credentials. The API requires the username and password to be encrypted using base64 encryption and then passed as an Authorization header in the HTTP request, Example username = DSmith password = MYPassWd66 Concatenate the username and password with a colon in between and encrypt to base64 as a single string: e.g: DSmith:MYPassWd66 This would result in a string of: RFNtaXRoOk1ZUGFzc1dkNjY= This can be applied to the http request as a header of:\nAuthorization: Basic RFNtaXRoOk1ZUGFzc1dkNjY=\nA returning http response code of 401 means the username or password are incorrect  ",
  81.         "operationId": "createshipment",
  82.         "produces": [
  83.           "application/json"
  84.         ],
  85.         "consumes": [
  86.           "application/json"
  87.         ],
  88.         "security": [
  89.           {
  90.             "GeoSession": [
  91.             ]
  92.           }
  93.         ],
  94.         "parameters": [
  95.           {
  96.             "name": "body",
  97.             "in": "body",
  98.             "schema": {
  99.               "$ref": "#/definitions/Shipping"
  100.             }
  101.           }
  102.         ],
  103.         "tags": [
  104.           "Shipping"
  105.         ],
  106.         "responses": {
  107.           "200": {
  108.             "description": "Response object.",
  109.             "schema": {
  110.               "items": {
  111.                 "$ref": "#/definitions/ShippingResponse"
  112.               }
  113.             }
  114.           },
  115.           "default": {
  116.             "description": "Unexpected error",
  117.             "schema": {
  118.               "$ref": "#/definitions/Error"
  119.             }
  120.           }
  121.         },
  122.         "x-ms-visibility": "advanced"
  123.       }
  124.     },
  125.     "/shipping/shipment/{shipmentId}/label": {
  126.       "get": {
  127.         "summary": "Generate label.",
  128.         "operationId": "getlabels",
  129.         "description": "Once a shipment has been created this API is available to pass the shipmentId returned from the insert shipment API to return label output. \nThe label can be returned in different formats by setting the appropriate accept type header. Please see available options below:   \n\ntext/vnd.citizen-clp; - For use with Citizen Thermal Printers (Please refer to prerequisites for label dimension information.) \n\ntext/vnd.eltron-epl; = Intended for use with Eltron Printer / Or certain printer models that support EPL emulation. (Please refer to prerequisites for label dimension information.) \n\ntext/html = Plain text HTML output, intended for printing to A4 laser Printer on A4 stationary. \n\nWARNING: Printing HTML output provided via API to Thermal printer may cause label outpit to be scaled under minumum requirenments and fail verification once label is received by ourselves and analysed.\n",
  130.         "security": [
  131.           {
  132.             "GeoSession": []
  133.           }
  134.         ],
  135.         "consumes": [
  136.           "text/and.citizen-clp",
  137.           "text/vnd.eltron-epl",
  138.           "text/html"
  139.         ],
  140.         "parameters": [
  141.           {
  142.             "name": "shipmentId",
  143.             "in": "path",
  144.             "description": "Id of shipment.",
  145.             "required": true,
  146.             "type": "number",
  147.             "format": "double"
  148.           }
  149.         ],
  150.         "tags": [
  151.           "Lables"
  152.         ],
  153.         "responses": {
  154.           "200": {
  155.             "description": "The actual print string to be sent to the printer This is not an attribute but just a string",
  156.             "schema": {
  157.               "type": "string"
  158.             }
  159.           }
  160.         },
  161.         "x-ms-visibility": "advanced"
  162.       }
  163.     }
  164.   },
  165.   "definitions": {
  166.     "ShippingResponse": {
  167.       "type": "object",
  168.       "properties": {
  169.         "error": {
  170.           "type": "object",
  171.           "description": "An object which encapsulates errors thrown by the API ",
  172.           "items": {
  173.             "$ref": "#/definitions/Error"
  174.           }
  175.         },
  176.         "data": {
  177.           "type": "object",
  178.           "description": "An object returned from the API which encapsulates the returning data ",
  179.           "properties": {
  180.             "shipmentId": {
  181.               "type": "number"
  182.             }
  183.           }
  184.         }
  185.       }
  186.     },
  187.     "LoginResponse": {
  188.       "type": "object",
  189.       "properties": {
  190.         "error": {
  191.           "type": "object",
  192.           "description": "An object which encapsulates errors thrown by the API ",
  193.           "items": {
  194.             "$ref": "#/definitions/Error"
  195.           }
  196.         },
  197.         "data": {
  198.           "type": "object",
  199.           "description": "An object returned from the API which encapsulates the returning data",
  200.           "properties": {
  201.             "geoSession": {
  202.               "type": "string"
  203.             }
  204.           }
  205.         }
  206.       }
  207.     },
  208.     "Error": {
  209.       "type": "object",
  210.       "properties": {
  211.         "errorAction": {
  212.           "type": "string",
  213.           "description": "The action associated with the errorMessage, this can be null if no action was required "
  214.         },
  215.         "errorCode": {
  216.           "type": "string",
  217.           "description": "The errorCode associated with the errorMessage "
  218.         },
  219.         "errorMessage": {
  220.           "type": "string",
  221.           "description": "An error message given for an action which was not successful "
  222.         },
  223.         "errorObj": {
  224.           "type": "string",
  225.           "description": "The object within the past in criteria which caused this exception "
  226.         },
  227.         "errorType": {
  228.           "type": "string",
  229.           "description": "The error type assigned to a error"
  230.         }
  231.       }
  232.     },
  233.     "Shipping": {
  234.       "type": "object",
  235.       "required": [
  236.         "job_id",
  237.         "collectionOnDelivery",
  238.         "invoice",
  239.         "collectionDate",
  240.         "consignment"
  241.       ],
  242.       "properties": {
  243.         "job_id": {
  244.           "type": "number",
  245.           "description": "The id associated with a collection of objects"
  246.         },
  247.         "collectionOnDelivery": {
  248.           "type": "boolean",
  249.           "description": ""
  250.         },
  251.         "invoice": {
  252.           "$ref": "#/definitions/Invoice"
  253.         },
  254.         "collectionDate": {
  255.           "type": "string",
  256.           "description": "The date the Van is due to arrive to collect the parcels "
  257.         },
  258.         "consignment": {
  259.           "type": "array",
  260.           "items": {
  261.             "$ref": "#/definitions/Consignment"
  262.           }
  263.         }
  264.       }
  265.     },
  266.     "Consignment": {
  267.       "type": "object",
  268.       "required": [
  269.         "collectionDetails",
  270.         "deliveryDetails",
  271.         "numberOfParcels",
  272.         "totalWeight",
  273.         "shippingRef1",
  274.         "shippingRef2"
  275.       ],
  276.       "properties": {
  277.         "consignmentNumber": {
  278.           "type": "string",
  279.           "description": "The identifier number for the delivery to the address "
  280.         },
  281.         "consignmentRef": {
  282.           "type": "string",
  283.           "description": "A link to the parent consignment number "
  284.         },
  285.         "parcel": {
  286.           "$ref": "#/definitions/Parcel"
  287.         },
  288.         "collectionDetails": {
  289.           "$ref": "#/definitions/CollectionDetails"
  290.         },
  291.         "deliveryDetails": {
  292.           "$ref": "#/definitions/DeliveryDetails"
  293.         },
  294.         "networkCode": {
  295.           "type": "string",
  296.           "description": "The network code associated with the package"
  297.         },
  298.         "numberOfParcels": {
  299.           "type": "number",
  300.           "description": "The number of packages"
  301.         },
  302.         "totalWeight": {
  303.           "type": "number",
  304.           "description": "The total weight",
  305.           "format": "double"
  306.         },
  307.         "shippingRef1": {
  308.           "type": "string",
  309.           "description": "The first reference associated with the shipment "
  310.         },
  311.         "shippingRef2": {
  312.           "type": "string",
  313.           "description": "The second reference associated with the shipment "
  314.         },
  315.         "shippingRef3": {
  316.           "type": "string",
  317.           "description": "The third reference associated with the shipment "
  318.         },
  319.         "customsValue": {
  320.           "type": "number",
  321.           "description": "The customs value"
  322.         },
  323.         "deliveryInstructions": {
  324.           "type": "string",
  325.           "description": "The delivery instructions associated with delivering a parcel "
  326.         },
  327.         "parcelDescription": {
  328.           "type": "number",
  329.           "description": "A small human readable description of the product "
  330.         },
  331.         "liabilityValue": {
  332.           "type": "number",
  333.           "description": "The value the product should be insured "
  334.         },
  335.         "liability": {
  336.           "type": "boolean",
  337.           "description": "Is liability required"
  338.         }
  339.       }
  340.     },
  341.     "CollectionDetails": {
  342.       "type": "object",
  343.       "required": [
  344.         "contactDetails",
  345.         "address"
  346.       ],
  347.       "properties": {
  348.         "contactDetails": {
  349.           "$ref": "#/definitions/ContactDetails"
  350.         },
  351.         "address": {
  352.           "$ref": "#/definitions/Address"
  353.         }
  354.       }
  355.     },
  356.     "DeliveryDetails": {
  357.       "type": "object",
  358.       "required": [
  359.         "contactDetails",
  360.         "address",
  361.         "notificationDetails"
  362.       ],
  363.       "properties": {
  364.         "contactDetails": {
  365.           "$ref": "#/definitions/ContactDetails"
  366.         },
  367.         "address": {
  368.           "$ref": "#/definitions/Address"
  369.         },
  370.         "notificationDetails": {
  371.           "$ref": "#/definitions/NotificationDetails"
  372.         }
  373.       }
  374.     },
  375.     "ContactDetails": {
  376.       "type": "object",
  377.       "description": "An object encapsulating contact information ",
  378.       "properties": {
  379.         "contactName": {
  380.           "type": "string",
  381.           "description": "The contact name "
  382.         },
  383.         "telephone": {
  384.           "type": "string",
  385.           "description": "A telephone number"
  386.         }
  387.       }
  388.     },
  389.     "Address": {
  390.       "type": "object",
  391.       "properties": {
  392.         "organisation": {
  393.           "type": "string",
  394.           "description": "The organisational name assigned to a company"
  395.         },
  396.         "countryCode": {
  397.           "type": "string",
  398.           "description": "The IATA code for a country"
  399.         },
  400.         "addressId": {
  401.           "type": "string",
  402.           "description": "The identifier for a specific address"
  403.         },
  404.         "postcode": {
  405.           "type": "string",
  406.           "description": "The assigned identity aligned to the property given by the post office"
  407.         },
  408.         "locality": {
  409.           "type": "string",
  410.           "description": "A particular area"
  411.         },
  412.         "town": {
  413.           "type": "string",
  414.           "description": "The town section of an address"
  415.         },
  416.         "county": {
  417.           "type": "string",
  418.           "description": "The county section of an address"
  419.         }
  420.       }
  421.     },
  422.     "NotificationDetails": {
  423.       "type": "object",
  424.       "description": "An object encapsulating a recipient/customer notification ",
  425.       "properties": {
  426.         "email": {
  427.           "type": "string",
  428.           "description": "An email address"
  429.         },
  430.         "mobile": {
  431.           "type": "string",
  432.           "description": "A mobile telephone number"
  433.         }
  434.       }
  435.     },
  436.     "Invoice": {
  437.       "type": "object",
  438.       "description": "An object which encapsulates the international invoice details ",
  439.       "properties": {
  440.         "auditInfo": {
  441.           "type": "string",
  442.           "description": "An email address"
  443.         },
  444.         "countryOfOrigin": {
  445.           "type": "string",
  446.           "description": "A mobile telephone number"
  447.         },
  448.         "invoiceBillingDetails": {
  449.           "$ref": "#/definitions/InvoiceBillingDetails"
  450.         },
  451.         "invoiceCustomsNumber": {
  452.           "type": "string",
  453.           "description": "The customs number"
  454.         },
  455.         "invoiceExportReason": {
  456.           "type": "string",
  457.           "description": "The invoice export reason"
  458.         },
  459.         "invoiceIsDeclared": {
  460.           "type": "boolean",
  461.           "description": "An indicator that an invoice is declared "
  462.         },
  463.         "invoiceItem": {
  464.           "$ref": "#/definitions/InvoiceItem"
  465.         },
  466.         "invoiceTermsOfDelivery": {
  467.           "type": "string",
  468.           "description": "The international invoice terms of delivery"
  469.         },
  470.         "invoiceType": {
  471.           "type": "number",
  472.           "description": "The type of international invoice"
  473.         },
  474.         "totalItems": {
  475.           "type": "string",
  476.           "description": "The total items"
  477.         },
  478.         "totalValue": {
  479.           "type": "number",
  480.           "description": "The total value"
  481.         },
  482.         "totalWeight": {
  483.           "type": "number",
  484.           "description": "The total weight"
  485.         }
  486.       }
  487.     },
  488.     "InvoiceBillingDetails": {
  489.       "type": "object",
  490.       "description": "An object which encapsulates the international invoice details ",
  491.       "properties": {
  492.         "address": {
  493.           "$ref": "#/definitions/Address"
  494.         },
  495.         "contactDetails": {
  496.           "$ref": "#/definitions/ContactDetails"
  497.         },
  498.         "vatNumber": {
  499.           "type": "string",
  500.           "description": "A VAT number"
  501.         }
  502.       }
  503.     },
  504.     "InvoiceItem": {
  505.       "type": "object",
  506.       "description": "An object which encapsulates the international invoice details ",
  507.       "properties": {
  508.         "auditInfo": {
  509.           "type": "object",
  510.           "description": "An object encapsulating the records audit information\n"
  511.         },
  512.         "countryOfOrigin": {
  513.           "type": "string",
  514.           "description": "The IATA code for the country where the product originates "
  515.         },
  516.         "itemCode": {
  517.           "type": "string",
  518.           "description": "The items code"
  519.         },
  520.         "itemDescription": {
  521.           "type": "string",
  522.           "description": "The items description"
  523.         },
  524.         "numberOfItems": {
  525.           "type": "number",
  526.           "description": "The number of items"
  527.         },
  528.         "unitValue": {
  529.           "type": "number",
  530.           "description": "The unit value"
  531.         }
  532.       }
  533.     },
  534.     "Parcel": {
  535.       "description": "An object which encapsulates all the parcels details",
  536.       "properties": {
  537.         "auditInfo": {
  538.           "type": "object",
  539.           "description": "An object encapsulating the records audit information"
  540.         },
  541.         "isVoided": {
  542.           "type": "boolean",
  543.           "description": "Used to set or find out if an object has been voided "
  544.         },
  545.         "labelNumber": {
  546.           "type": "string",
  547.           "description": "A parcel label nunber"
  548.         },
  549.         "packageNumber": {
  550.           "type": "string",
  551.           "description": "The package number within the shipment, for a 1 parcel shipment the parcels package number is 1 "
  552.         },
  553.         "parcelNumber": {
  554.           "type": "number",
  555.           "description": "The 10/11 or 14/15 digit number used to track the parcel "
  556.         },
  557.         "parcelProduct": {
  558.           "$ref": "#/definitions/ParcelProduct"
  559.         },
  560.         "parcelnetBarcode": {
  561.           "type": "string",
  562.           "description": "The Hermes barcode data "
  563.         },
  564.         "parcelnetData": {
  565.           "type": "number",
  566.           "description": "Additional Hermes data associated with the barcode"
  567.         },
  568.         "parcelnetLabelNumber": {
  569.           "type": "string",
  570.           "description": "A human readable Hermes barcode reference "
  571.         }
  572.       }
  573.     },
  574.     "ParcelProduct": {
  575.       "description": "An object which encapsulates all the parcels details",
  576.       "properties": {
  577.         "countryOfOrigin": {
  578.           "type": "string",
  579.           "description": "The IATA code for the country where the product originates "
  580.         },
  581.         "numberOfItems": {
  582.           "type": "integer",
  583.           "description": "The number of items"
  584.         },
  585.         "productCode": {
  586.           "type": "string",
  587.           "description": "An indicator identifying a DPD Group product "
  588.         },
  589.         "productFabricContent": {
  590.           "type": "number",
  591.           "description": "The fabric content associated with the product"
  592.         },
  593.         "productHarmonisedCode ": {
  594.           "type": "string",
  595.           "description": "The harmonised code associated with the product"
  596.         },
  597.         "productItemsDescription": {
  598.           "type": "string",
  599.           "description": "The human readable description of the product irems"
  600.         },
  601.         "productTypeDescription": {
  602.           "type": "string",
  603.           "description": "The human readable product type description"
  604.         },
  605.         "unitValue": {
  606.           "type": "number",
  607.           "format": "double",
  608.           "description": "The unit value "
  609.         },
  610.         "unitWeight": {
  611.           "type": "number",
  612.           "description": "The unit weight"
  613.         }
  614.       }
  615.     }
  616.   }
  617. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement