Overview
The NorthScope Web Services API exposes a single endpoint for developers to issue automated requests against the NorthScope system and receive information about the current state of the system. NorthScope exposes several Request Types (listed below), each accepting their own request information and returning their own request-specific response document. The endpoint is exposed at the same location as the NorthScope web application (will vary from environment to environment), in the services folder.
If your NorthScope installation is accessible at NorthScope.example.com, the endpoint would be located at: NorthScope.example.com/services/ActionCommand.svc/APIExecute
From a high level, the process flow is as follows:
Anatomy of a Request
NorthScope accepts requests in either JSON or XML formats. The Web Services API will respond to a request with a document in the same format as it was requested. For example, if you make a request with a JSON document you will receive a JSON response.
Independent of format, the HTTP POST body will contain the document outlining both which request is being called and any parameters being supplied for. All requests have a root element named NSRequest, which has two child elements: RequestName and RequestContent. The value of RequestName defines which action is being requested. The value of RequestContent will vary from request to request and will contain the request-specific parameters (if necessary). Some requests do not accept any parameters and in those cases RequestContent can either be omitted or left as an empty element.
All requests will return with a basic set of information and will include request-specific return information. Much like the request body, the response body will consist of a root element named NSResponse, which will always include two children elements: Timestamp and Success. Timestamp will indicate the time at which the NorthScope Web Services API responded to the request and Success will be a Boolean indicating whether the request itself succeed or not.
Obtaining a Token
Authentication to the NorthScope Data Service can be accomplished by one of two means: static or session-based tokens. By supporting these two methods, NorthScope can accommodate the authentication requirements for many integration partners.
Using a static token
To use a static token, you must have a user configured in NorthScope that contains the API Key (token). Go to System > Users & Security > Users and either add a new user or edit an existing user that will be used for the API. On the Properties tab of the user, set the ‘API Authentication Mode’ to “Static Token’ and click the Save icon in the toolbar. When the page refreshes a new ‘API Key’ property will be visible, click the ‘Generate API Key’ icon in the toolbar to generate the token id. Once this is set, pass this information along to the party you are integrating with so they can use this value when using the API.
Note: It is recommended that you add a unique user for this process rather than using an existing user as this process is session specific so more than one process cannot be using NorthScope at the same time.
Requesting a session token
The request to obtain a token is made using the GenerateSessionToken request. This is the only request in the NorthScope Web Services API that does not require authentication information in the HTTP headers. The purpose of this request it to accept authentication information to be used in subsequent API calls.
When calling the GenerateSessionToken process to create a new token for use in subsequent requests, these headers may be omitted (they will not be used if supplied).
The token created from the GenerateSessionToken process will be tied to both the specific user that generated it as well as the IP address of the machine that issued the request. One user can only be authenticated from one location at a time (including the website itself) which means if a user attempts to both authenticate via the NorthScope Web Services API and log in to NorthScope itself, the earlier authentication will be invalidated.
Parameter Name | Required | Value |
RequestName | Yes | GenerateSessionToken |
LoginEmail | Yes | The email address of the NorthScope User for whom the token is being generated. |
Password | Yes | The password to authenticate that user. |
GenerateSessionToken: JSON Example
POST /services/ActionCommand.svc/APIExecute HTTP/1.1 Host: NorthScope.example.com { "NSRequest": { "RequestName": "GenerateSessionToken", "RequestContent": { "LoginEmail": "TestAPIUser@NorthScope.example.com", "Password": "StrongPassword" } } }
GenerateSessionToken: XML Example
POST /services/ActionCommand.svc/APIExecute HTTP/1.1 Host: NorthScope.example.com <NSRequest> <RequestName>GenerateSessionToken</RequestName> <RequestContent> <LoginEmail>TestAPIUser@NorthScope.example.com</LoginEmail> <Password>StrongPassword</Password> </RequestContent> </NSRequest>
If the request was valid, a response will be sent as follows:
GenerateSessionToken Response: JSON Example
{ "NSResponse": { "Timestamp": "2018-09-20T15:21:23.425", "Success": "true", "ResponseContent": { "SessionToken": "00000000-0000-0000-0000-000000000000" } } }
GenerateSessionToken Response: XML Example
<NSResponse> <Timestamp>2018-09-20T15:21:23.425</Timestamp> <Success>true</Success> <ResponseContent> <SessionToken>00000000-0000-0000-0000-000000000000</SessionToken> </ResponseContent> </NSResponse>
If an invalid authentication request is made, the following result will be generated:
Example: Validation failure in JSON
{ "NSResponse": { "Timestamp": "2018-09-20T14:57:51.830", "Success": "false", "Error": "The login information that was provided was invalid." } }
Example: Validation failure in XML
<NSResponse> <Timestamp>2018-09-20T14:57:51.830</Timestamp> <Success>false</Success> <Error>The login information that was provided was invalid.</Error> </NSResponse>
Authenticating a Request
Except the request GenerateSessionToken, all other requests issued against the NorthScope Web Services API require authentication information. This information is supplied as headers in the HTTP request. The two headers required to be supplied are:
NSLogin: This will house the email address of the user being authenticated.
NSAPISession: This will house the token returned from a previous GenerateSessionToken request.
When calling the GenerateSessionToken process to create a new token for use in subsequent requests, these headers may be omitted (they will not be used if supplied).
The token created from the GenerateSessionToken process will be tied to both the specific user that generated it as well as the IP address of the machine that issued the request. One user can only be authenticated from one location at a time (including the website itself) which means if a user attempts to both authenticate via the NorthScope Web Services API and log in to NorthScope itself, the earlier authentication will be invalidated.
In the event the incorrect information is supplied, either when generating a new session token or when using a previously fetched token, you will receive an error from the web service of the following structure:
Example: Validation failure in JSON
{ "NSResponse": { "Timestamp": "2018-09-20T14:57:51.830", "Success": "false", "Error": "The login information that was provided was invalid." } }
Example: Validation failure in XML
<NSResponse> <Timestamp>2018-09-20T14:57:51.830</Timestamp> <Success>false</Success> <Error>The login information that was provided was invalid.</Error> </NSResponse>
Using a Static or Session token to make subsequent requests
Once you have generated an API Session Token or are assigned a static token, you can then supply it, along with the login email, in subsequent requests like so:
POST /services/ActionCommand.svc/APIExecute HTTP/1.1 Host: NorthScope.example.com NSLogin: TestAPIUser@NorthScope.example.com NSAPISession: 00000000-0000-0000-0000-000000000000 <NSRequest> <RequestName>ListCompanies</RequestName> </NSRequest>
Available Requests
The NorthScope Web Services API exposes the following requests to perform automated functionality within the NorthScope system.
ListCompanies
This request will provide a list of NorthScope companies your user has access to along with the numeric identifier, DataEntityCompanySK, which may be required by other API requests. This information is not likely to change so it usually would only need to be called once (to fetch and store known companies).
Accepted Information
This request accepts no parameters, the RequestContent node could be omitted entirely (or left empty).
Example Requests
POST /services/ActionCommand.svc/APIExecute HTTP/1.1 Host: NorthScope.example.com NSLogin: TestAPIUser@NorthScope.example.com NSAPISession: 00000000-0000-0000-0000-000000000000 { "NSRequest": { "RequestName": "ListCompanies" } }
POST /services/ActionCommand.svc/APIExecute HTTP/1.1 Host: NorthScope.example.com NSLogin: TestAPIUser@NorthScope.example.com NSAPISession: 00000000-0000-0000-0000-000000000000 <NSRequest> <RequestName>ListCompanies</RequestName> </NSRequest>
Example Responses
{ "NSResponse": { "Timestamp": "2018-09-20T15:58:07.367", "Success": "true", "Companies": { "Company": [ { "DataEntityCompanySK": "1", "CompanyID": "WESTTEST", "CompanyName": "West Coast Testing Company" }, { "DataEntityCompanySK": "2", "CompanyID": "EASTTEST", "CompanyName": "East Coast Testing Company" } ] } } } }
<NSResponse> <Timestamp>2018-09-20T15:58:07.367</Timestamp> <Success>true</Success> <Companies> <Company> <DataEntityCompanySK>1</DataEntityCompanySK> <CompanyID>WESTTEST</CompanyID> <CompanyName>West Coast Testing Company</CompanyName> </Company> <Company> <DataEntityCompanySK>2</DataEntityCompanySK> <CompanyID>EASTTEST</CompanyID> <CompanyName>East Coast Testing Company</CompanyName> </Company> </Companies> </NSResponse>
ListSalesOrders
This request will generate a list of Sales Orders in a given NorthScope company that match the supplied filtering criteria. Except for the DataEntityCompanySK, all criteria are not required, and you could provide multiple of any other criteria. The Sales Orders returned must match any of the provided criteria of a type. For instance, if you supply criteria of multiple sites and multiple order date ranges, any sales order that both matches one of the provided sites and one of the provided ranges will be returned.
Accepted Information
Parameter Name | Required | Comment |
DataEntityCompanySK | Yes | The identifier for the company from which to pull Sales Orders. |
Status | No | The desired status for returned Sales Orders. Available values are: New, Released, In Process, Staging, Loading, Shipped, Approved, Ready To Post, Posted, or Void. |
OrderDateFrom | No | The lower bound for an acceptable date range for Sales Orders’ Order Date, inclusive. |
OrderDateTo | No | The upper bound for an acceptable date range for Sales Orders’ Order Date, inclusive. |
ScheduledShipDateFrom | No | The lower bound for an acceptable date range for Sales Orders’ Scheduled Ship Date, inclusive. |
ScheduledShipDateTo | No | The upper bound for an acceptable date range for Sales Orders’ Scheduled Ship Date, inclusive. |
LineItemSite | No | The desired Site for any Sales Orders’ Line Items. If this is provided the returned Line Items may not reflect all items on a returned Sales Order, if it has items that span Sites. |
LineItemCarrier | No | The desired Carrier for any Sales Orders’ Line Items. If this is provided the returned Line Items may not reflect all items on a returned Sales Order, if it has items that span Carriers. |
LoadID | No | The desired LoadID’s for any Sales Orders’ Line Items. If this is provided the returned Line Items may not reflect all items on a returned Sales Order, if it has items that span Loads. |
Example Requests
POST /services/ActionCommand.svc/APIExecute HTTP/1.1 Host: NorthScope.example.com NSLogin: TestAPIUser@NorthScope.example.com NSAPISession: 00000000-0000-0000-0000-000000000000 { "NSRequest": { "RequestName": "ListSalesOrders", "RequestContent": { "DataEntityCompanySK": "1", "Statuses": { "Status": [ "New", "Released" ] }, "OrderDateRanges": { "OrderDateRange": [ { "OrderDateTo": "2016-01-01" }, { "OrderDateFrom": "2017-01-01", "OrderDateTo": "2018-01-01" }, { "OrderDateFrom": "2019-01-01" } ] }, "ScheduledShipDateRanges": { "ScheduledShipDateRange": [ { "ScheduledShipDateTo": "2016-01-01" }, { "ScheduledShipDateFrom": "2017-01-01", "ScheduledShipDateTo": "2018-01-01" }, { "ScheduledShipDateFrom": "2019-01-01" } ] }, "LineItemSites": { "LineItemSite": [ "PRIMARY", "SECONDARY" ] }, "LineItemCarriers": { "LineItemCarrier": [ "Our Truck", "3rd Party" ] }, "LoadIDs": { "LoadID": [ "12345", "54321" ] } } } }
POST /services/ActionCommand.svc/APIExecute HTTP/1.1 Host: NorthScope.example.com NSLogin: TestAPIUser@NorthScope.example.com NSAPISession: 00000000-0000-0000-0000-000000000000 <NSRequest> <RequestName>ListSalesOrders</RequestName> <RequestContent> <DataEntityCompanySK>1</DataEntityCompanySK> <Statuses> <Status>New</Status> <Status>Released</Status> </Statuses> <OrderDateRanges> <OrderDateRange> <OrderDateTo>2016-01-01</OrderDateTo> </OrderDateRange> <OrderDateRange> <OrderDateFrom>2017-01-01</OrderDateFrom> <OrderDateTo>2018-01-01</OrderDateTo> </OrderDateRange> <OrderDateRange> <OrderDateFrom>2019-01-01</OrderDateFrom> </OrderDateRange> </OrderDateRanges> <ScheduledShipDateRanges> <ScheduledShipDateRange> <ScheduledShipDateTo>2016-01-01</ScheduledShipDateTo> </ScheduledShipDateRange> <ScheduledShipDateRange> <ScheduledShipDateFrom>2017-01-01</ScheduledShipDateFrom> <ScheduledShipDateTo>2018-01-01</ScheduledShipDateTo> </ScheduledShipDateRange> <ScheduledShipDateRange> <ScheduledShipDateFrom>2019-01-01</ScheduledShipDateFrom> </ScheduledShipDateRange> </ScheduledShipDateRanges> <LineItemSites> <LineItemSite>PRIMARY</LineItemSite> <LineItemSite>SECONDARY</LineItemSite> </LineItemSites> <LineItemCarriers> <LineItemCarrier>Our Truck</LineItemCarrier> <LineItemCarrier>3rd Party</LineItemCarrier> </LineItemCarriers> <LoadIDs> <LoadID>12345</LoadID> <LoadID>54321</LoadID> </LoadIDs> </RequestContent> </NSRequest>
Example Responses
{ "NSResponse": { "Timestamp": "2018-09-21T09:30:35.137", "Success": "true", "SalesOrders": { "SalesOrder": [ { "OrderHeaderSK": "1", "OrderID": "ORD180920001", "OrderStatus": "New", "Customer": "TESTCUST", "OrderDate": "2018-09-21T00:00:00", "ScheduledShipDate": "2018-09-21T00:00:00", "ScheduledDeliveryDate": "2018-09-21T00:00:00", "LineItems": { "LineItem": { "OrderItemSK": "1", "Site": "PRIMARY", "ItemSort": "1", "ItemID": "ITEM1", "OrderedUnits": "5.00000", "AllocatedUnits": "0.00000", "UnitsUOM": "Case", "OrderedWeight": "113.40000", "AllocatedWeight": "0.00000", "WeightUOM": "kg", "PriceOption": "Units", "ItemPrice": "3.00000", "LoadID": "54321" } } }, { "OrderHeaderSK": "2", "OrderID": "ORD180920002", "OrderStatus": "New", "Customer": "TESTCUST", "OrderDate": "2018-09-21T00:00:00", "ScheduledShipDate": "2018-09-21T00:00:00", "ScheduledDeliveryDate": "2018-09-21T00:00:00", "LineItems": { "LineItem": [ { "OrderItemSK": "2", "Site": "SECONDARY", "ItemSort": "1", "ItemID": "ITEM1", "OrderedUnits": "5.00000", "AllocatedUnits": "0.00000", "UnitsUOM": "Case", "OrderedWeight": "113.40000", "AllocatedWeight": "0.00000", "WeightUOM": "kg", "PriceOption": "Units", "ItemPrice": "2.00000", "Carrier": "Our Truck", "LoadID": "12345" }, { "OrderItemSK": "3", "Site": "SECONDARY", "ItemSort": "2", "ItemID": "ITEM2", "OrderedUnits": "5.00000", "AllocatedUnits": "0.00000", "UnitsUOM": "Case", "OrderedWeight": "113.40000", "AllocatedWeight": "0.00000", "WeightUOM": "kg", "PriceOption": "Units", "ItemPrice": "3.00000", "Carrier": "Our Truck", "LoadID": "12345" } ] } } ] } } }
<NSResponse> <Timestamp>2018-09-21T09:30:35.137</Timestamp> <Success>true</Success> <SalesOrders> <SalesOrder> <OrderHeaderSK>1</OrderHeaderSK> <OrderID>ORD180920001</OrderID> <OrderStatus>New</OrderStatus> <Customer>TESTCUST</Customer> <OrderDate>2018-09-21T00:00:00</OrderDate> <ScheduledShipDate>2018-09-21T00:00:00</ScheduledShipDate> <ScheduledDeliveryDate>2018-09-21T00:00:00</ScheduledDeliveryDate> <LineItems> <LineItem> <OrderItemSK>1</OrderItemSK> <Site>PRIMARY</Site> <ItemSort>1</ItemSort> <ItemID>ITEM1</ItemID> <OrderedUnits>5.00000</OrderedUnits> <AllocatedUnits>0.00000</AllocatedUnits> <UnitsUOM>Case</UnitsUOM> <OrderedWeight>113.40000</OrderedWeight> <AllocatedWeight>0.00000</AllocatedWeight> <WeightUOM>kg</WeightUOM> <PriceOption>Units</PriceOption> <ItemPrice>3.00000</ItemPrice> <LoadID>54321</LoadID> </LineItem> </LineItems> </SalesOrder> <SalesOrder> <OrderHeaderSK>2</OrderHeaderSK> <OrderID>ORD180920002</OrderID> <OrderStatus>New</OrderStatus> <Customer>TESTCUST</Customer> <OrderDate>2018-09-21T00:00:00</OrderDate> <ScheduledShipDate>2018-09-21T00:00:00</ScheduledShipDate> <ScheduledDeliveryDate>2018-09-21T00:00:00</ScheduledDeliveryDate> <LineItems> <LineItem> <OrderItemSK>2</OrderItemSK> <Site>SECONDARY</Site> <ItemSort>1</ItemSort> <ItemID>ITEM1</ItemID> <OrderedUnits>5.00000</OrderedUnits> <AllocatedUnits>0.00000</AllocatedUnits> <UnitsUOM>Case</UnitsUOM> <OrderedWeight>113.40000</OrderedWeight> <AllocatedWeight>0.00000</AllocatedWeight> <WeightUOM>kg</WeightUOM> <PriceOption>Units</PriceOption> <ItemPrice>2.00000</ItemPrice> <Carrier>Our Truck</Carrier> <LoadID>12345</LoadID> </LineItem> <LineItem> <OrderItemSK>3</OrderItemSK> <Site>SECONDARY</Site> <ItemSort>2</ItemSort> <ItemID>ITEM2</ItemID> <OrderedUnits>5.00000</OrderedUnits> <AllocatedUnits>0.00000</AllocatedUnits> <UnitsUOM>Case</UnitsUOM> <OrderedWeight>113.40000</OrderedWeight> <AllocatedWeight>0.00000</AllocatedWeight> <WeightUOM>kg</WeightUOM> <PriceOption>Units</PriceOption> <ItemPrice>3.00000</ItemPrice> <Carrier>Our Truck</Carrier> <LoadID>12345</LoadID> </LineItem> </LineItems> </SalesOrder> </SalesOrders> </NSResponse>
ListInventoryLots
This request will generate a list of Inventory Lots in a given NorthScope company that match the supplied filtering criteria. Except for the DataEntityCompanySK, all criteria are not required, and you could provide multiple of any other criteria. The Lots returned must match any of the provided criteria of a type. For instance, if you supply criteria of multiple sites and multiple items, any Lot that both matches one of the provided sites and one of the provided items will be returned. Any empty element can be included to indicate filtering on a value being not set.
Accepted Information
Parameter Name | Required | Comment |
DataEntityCompanySK | Yes | The identifier for the company from which to pull Inventory Lots. |
Item | No | The desired ItemID for the Inventory Lot. |
Site | No | The site in which the Inventory Lot resides. |
ProductionLot | No | The Production Lot ID for the desired Inventory Lot. Can supply an empty value to indicate filtering for lots where this is not defined. |
WarehouseLot | No | The Warehouse Lot ID for the desired Inventory Lot. Can supply an empty value to indicate filtering for lots where this is not defined. |
Owner | No | The Owner Name of the desired Lot. |
Example Requests
POST /services/ActionCommand.svc/APIExecute HTTP/1.1 Host: NorthScope.example.com NSLogin: TestAPIUser@NorthScope.example.com NSAPISession: 00000000-0000-0000-0000-000000000000 { "NSRequest": { "RequestName": "ListInventoryLots", "RequestContent": { "DataEntityCompanySK": "1", "Items": { "Item": [ "ITEM1", "ITEM2" ] }, "Sites": { "Site": [ "PRIMARY", "SECONDARY" ] }, "ProductionLots": { "ProductionLot": [ "", "LOT1" ] }, "WarehouseLots": { "WarehouseLot": [ "", "WHLOT1" ] }, "Owners": { "Owner": "Default Owner" } } } }
POST /services/ActionCommand.svc/APIExecute HTTP/1.1 Host: NorthScope.example.com NSLogin: TestAPIUser@NorthScope.example.com NSAPISession: 00000000-0000-0000-0000-000000000000 <NSRequest> <RequestName>ListInventoryLots</RequestName> <RequestContent> <DataEntityCompanySK>1</DataEntityCompanySK> <Items> <Item>ITEM1</Item> <Item>ITEM2</Item> </Items> <Sites> <Site>PRIMARY</Site> <Site>SECONDARY</Site> </Sites> <ProductionLots> <ProductionLot /> <ProductionLot>LOT1</ProductionLot> </ProductionLots> <WarehouseLots> <WarehouseLot /> <WarehouseLot>WHLOT1</WarehouseLot> </WarehouseLots> <Owners> <Owner>Default Owner</Owner> </Owners> </RequestContent> </NSRequest>
Example Responses
{ "NSResponse": { "Timestamp": "2018-09-21T10:20:41.636", "Success": "true", "InventoryLots": { "InventoryLot": [ { "LotSK": "1", "LotStatus": "Open", "ItemID": "ITEM1", "Site": "PRIMARY", "ProductionLot": "LOT1", "WarehouseLot": "WHLOT1", "Owner": "Default Owner", "OnHandUnits": "1000.00000", "AllocatedUnits": "0.00000", "HoldUnits": "0.00000", "AvailableUnits": "1000.00000", "UnitsUOM": "Case", "OnHandWeight": "22680.00000", "AllocatedWeight": "0.00000", "HoldWeight": "0.00000", "AvailableWeight": "22680.00000", "WeightUOM": "kg", "ActualCost": "0.00000", "MarketCost": "0.00000", "StandardCost": "0.00000" }, { "LotSK": "2", "LotStatus": "Open", "ItemID": "ITEM2", "Site": "SECONDARY", "Owner": "Default Owner", "OnHandUnits": "1000.00000", "AllocatedUnits": "0.00000", "HoldUnits": "0.00000", "AvailableUnits": "1000.00000", "UnitsUOM": "Case", "OnHandWeight": "22680.00000", "AllocatedWeight": "0.00000", "HoldWeight": "0.00000", "AvailableWeight": "22680.00000", "WeightUOM": "kg", "ActualCost": "0.00000", "MarketCost": "0.00000", "StandardCost": "0.00000" } ] } } }
<NSResponse> <Timestamp>2018-09-21T10:20:41.636</Timestamp> <Success>true</Success> <InventoryLots> <InventoryLot> <LotSK>1</LotSK> <LotStatus>Open</LotStatus> <ItemID>ITEM1</ItemID> <Site>PRIMARY</Site> <ProductionLot>LOT1</ProductionLot> <WarehouseLot>WHLOT1</WarehouseLot> <Owner>Default Owner</Owner> <OnHandUnits>1000.00000</OnHandUnits> <AllocatedUnits>0.00000</AllocatedUnits> <HoldUnits>0.00000</HoldUnits> <AvailableUnits>1000.00000</AvailableUnits> <UnitsUOM>Case</UnitsUOM> <OnHandWeight>22680.00000</OnHandWeight> <AllocatedWeight>0.00000</AllocatedWeight> <HoldWeight>0.00000</HoldWeight> <AvailableWeight>22680.00000</AvailableWeight> <WeightUOM>kg</WeightUOM> <ActualCost>0.00000</ActualCost> <MarketCost>0.00000</MarketCost> <StandardCost>0.00000</StandardCost> </InventoryLot> <InventoryLot> <LotSK>2</LotSK> <LotStatus>Open</LotStatus> <ItemID>ITEM2</ItemID> <Site>SECONDARY</Site> <Owner>Default Owner</Owner> <OnHandUnits>1000.00000</OnHandUnits> <AllocatedUnits>0.00000</AllocatedUnits> <HoldUnits>0.00000</HoldUnits> <AvailableUnits>1000.00000</AvailableUnits> <UnitsUOM>Case</UnitsUOM> <OnHandWeight>22680.00000</OnHandWeight> <AllocatedWeight>0.00000</AllocatedWeight> <HoldWeight>0.00000</HoldWeight> <AvailableWeight>22680.00000</AvailableWeight> <WeightUOM>kg</WeightUOM> <ActualCost>0.00000</ActualCost> <MarketCost>0.00000</MarketCost> <StandardCost>0.00000</StandardCost> </InventoryLot> </InventoryLots> </NSResponse>
AllocateSalesOrders
This request will accept a list of allocations to perform, verify they are valid and then allocate the inventory from a given LotSK to a given OrderItemSK. Both LotSK and OrderItemSK can be retrieved from the ListInventoryLots and ListSalesOrders requests, respectively.
Accepted Information
Parameter Name | Required | Comment |
OrderItemSK | Yes | The identifier for the Sales Order Line Item being allocated. |
LotSK | Yes | The identifier for the Inventory Lot from which the inventory will be drawn. |
AllocateUnits | No | The number of Units (in the supplied Unit of Measure) to allocate. Not required if the item is managed by Weight only. |
UnitsUOM | No | The Unit of Measure ID for the units in which the inventory is being allocated. |
AllocateWeight | No | The amount of Weight (in the supplied Unit of Measure) to allocate. Not required if the item is managed by Units only. |
WeightUOM | No | The Unit of Measure ID for the weight in which the inventory is being allocated. |
JSON Example
POST /services/ActionCommand.svc/APIExecute HTTP/1.1 Host: NorthScope.example.com NSLogin: TestAPIUser@NorthScope.example.com NSAPISession: 00000000-0000-0000-0000-000000000000 { "NSRequest": { "RequestName": "AllocateSalesOrders", "RequestContent": { "Allocation": [ { "OrderItemSK": "100", "LotSK": "1", "AllocateUnits": "5", "UnitsUOM": "Case", "AllocateWeight": "113.4", "WeightUOM": "kg" }, { "OrderItemSK": "101", "LotSK": "1", "AllocateUnits": "5", "UnitsUOM": "Case", "AllocateWeight": "113.4", "WeightUOM": "kg" } ] } } }
XML Example
POST /services/ActionCommand.svc/APIExecute HTTP/1.1 Host: NorthScope.example.com NSLogin: TestAPIUser@NorthScope.example.com NSAPISession: 00000000-0000-0000-0000-000000000000 <NSRequest> <RequestName>AllocateSalesOrders</RequestName> <RequestContent> <Allocation> <OrderItemSK>100</OrderItemSK> <LotSK>1</LotSK> <AllocateUnits>5</AllocateUnits> <UnitsUOM>Case</UnitsUOM> <AllocateWeight>113.4</AllocateWeight> <WeightUOM>kg</WeightUOM> </Allocation> <Allocation> <OrderItemSK>101</OrderItemSK> <LotSK>1</LotSK> <AllocateUnits>5</AllocateUnits> <UnitsUOM>Case</UnitsUOM> <AllocateWeight>113.4</AllocateWeight> <WeightUOM>kg</WeightUOM> </Allocation> </RequestContent> </NSRequest>
Example Response
This request has no specific response, instead you would receive a generic success or failure with a timestamp and error (assuming the request failed).
InsertInboundIntegration
Add here
ListUOMSchedules
This request will accept a list of allocations to perform, verify they are valid and then allocate the inventory from a given LotSK to a given OrderItemSK. Both LotSK and OrderItemSK can be retrieved from the ListInventoryLots and ListSalesOrders requests, respectively.
Accepted Information
Parameter Name | Required | Comment |
OrderItemSK | Yes | The identifier for the Sales Order Line Item being allocated. |
LotSK | Yes | The identifier for the Inventory Lot from which the inventory will be drawn. |
AllocateUnits | No | The number of Units (in the supplied Unit of Measure) to allocate. Not required if the item is managed by Weight only. |
UnitsUOM | No | The Unit of Measure ID for the units in which the inventory is being allocated. |
AllocateWeight | No | The amount of Weight (in the supplied Unit of Measure) to allocate. Not required if the item is managed by Units only. |
WeightUOM | No | The Unit of Measure ID for the weight in which the inventory is being allocated. |
ListSites
This request will generate a list of sites. Except for the DataEntityCompanySK, all criteria are not required. The Sites returned must match any of the provided criteria of a type. Any empty element can be included to indicate filtering on a value being not set.
Accepted Information
Parameter Name | Required | Comment |
DataEntityCompanySK | Yes | The identifier for the company from which to pull sites. |
WhereClause | No | Filtering parameter for returned data. |
The WhereClause parameter enables only a selection of data to be sent back in the reply, based on filter criteria written with SQL syntax. Any of the site properties can be referenced.
Where Clause Columns
Column Name |
SiteSK |
SiteID |
SiteName |
CompanyID |
DataEntityCompanySK |
AddressLine1 |
AddressLine2 |
City |
State |
Zip |
Country |
Phone1 |
Fax |
Example Request
<NSRequest> <RequestName>ListSites</RequestName> <RequestContent> <DataEntityCompanySK>1</DataEntityCompanySK> <WhereClause>State = 'WA' OR SiteName LIKE '%a%'</WhereClause> </RequestContent> </NSRequest>
Note: JSON is not supported for this command.
Example Response
<NSResponse> <Timestamp>2019-12-02T10:00:10.405</Timestamp> <Success>true</Success> <SiteList> <Site> <SiteSK>1</SiteSK> <SiteID>ABC</SiteID> <SiteName>Site Name 1</SiteName> <CompanyID>Company ID 1</CompanyID> <DataEntityCompanySK>1</DataEntityCompanySK> <AddressLine1>1234 NE Street</AddressLine1> <AddressLine2 /> <City>Seattle</City> <State>WA</State> <Zip>99999</Zip> <Country>USA</Country> <Phone1>123-456-7890</Phone1> <Fax>123-456-7891</Fax> </Site> <Site> <SiteSK>2</SiteSK> <SiteID>ABD</SiteID> <SiteName>Site Name 2</SiteName> <CompanyID>Company ID 1</CompanyID> <DataEntityCompanySK>1</DataEntityCompanySK> <AddressLine1>1234 SE Street</AddressLine1> <AddressLine2 /> <City>Houston</City> <State>TX</State> <Zip>99999</Zip> <Country>USA</Country> <Phone1>123-000-7890</Phone1> <Fax>123-000-7891</Fax> </Site> </SiteList> </NSResponse>
ListSalesOrders
ListItems
ListCustomerAddresses
This request will accept a list of allocations to perform