Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

Code Block
languagejson
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

Code Block
languagexml
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

Code Block
languagejson
{
  "NSResponse": {
    "Timestamp": "2018-09-20T15:21:23.425",
    "Success": "true",
    "ResponseContent": {
      "SessionToken": "00000000-0000-0000-0000-000000000000"
    }
  }
}

GenerateSessionToken Response: XML Example

Code Block
languagexml
<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

Code Block
languagejson
{
  "NSResponse": {
    "Timestamp": "2018-09-20T14:57:51.830",
    "Success": "false",
    "Error": "The login information that was provided was invalid."
  }
}

Example: Validation failure in XML

Code Block
languagexml
<NSResponse>
  <Timestamp>2018-09-20T14:57:51.830</Timestamp>
  <Success>false</Success>
  <Error>The login information that was provided was invalid.</Error>
</NSResponse>

...

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

Code Block
{
  "NSResponse": {
    "Timestamp": "2018-09-20T14:57:51.830",
    "Success": "false",
    "Error": "The login information that was provided was invalid."
  }
}

Example: Validation failure in XML

Code Block
languagexml
<NSResponse>
  <Timestamp>2018-09-20T14:57:51.830</Timestamp>
  <Success>false</Success>
  <Error>The login information that was provided was invalid.</Error>
</NSResponse>

...

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

Code Block
languagejson
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

Code Block
languagexml
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>

...

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

Code Block
languagexml
<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

Code Block
languagexml
<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

 

 provides a way to leverage NorthScope’s existing mechanism for 3rd party integrations. Using the InsertInboundIntegration web request, data can be inserted into a NorthScope instance’s inbound queue.

Everything in the <Integ> </Integ> section is what will be placed into the inbound queue. For more information on the inbound queue and what to send there, see IM Adjustment (XML) for details. The example sends a fake transaction ‘TransactionABC’ of type ‘IMTransferXYZ’. To send a different kind of transaction to the inbound queue, simply replace the XML inside the <Integ> </Integ> section. For building XML to place inside the <Integ> </Integ> section, see IM Adjustment (XML).

Request Example

Code Block
languagexml
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>InsertInboundIntegration</RequestName>
    <RequestContent>
        <InboundIntegration>
            <Created>2019-12-2</Created>
            <SourceSystem>NS Test</SourceSystem>
            <SourceTransactionID>TransactionABC</SourceTransactionID>
            <TransactionType>IMTransferXYZ</TransactionType>
            <Data>
                <TransactionHeader>
                    <TransactionType>Adjustment</TransactionType>
                    <TransactionClassID>Default</TransactionClassID>
                    <TransactionID>A123456</TransactionID>
                    <TransactionStatusName>Ready To Post</TransactionStatusName>
                    <SiteID>ABC</SiteID>
                    <TransactionDate>2017-12-19</TransactionDate>
                    <ReasonCode />
                    <UserID>Integrated</UserID>
                    <CompanyID>XYZ</CompanyID>
                    <TransactionDetail>
                        <ItemSort />
                        <ItemID>1234321</ItemID>
                        <TransactionUnits>5.00000</TransactionUnits>
                        <UnitsUOMID>CASE</UnitsUOMID>
                        <TransactionWeight>150.5500</TransactionWeight>
                        <WeightUOMID>LB</WeightUOMID>
                        <Lot>18001</Lot>
                        <Owner>NLP</Owner>
                    </TransactionDetail>
                </TransactionHeader>
            </Data>
        </InboundIntegration>
    </RequestContent>
</NSRequest>

Example Response

Code Block
languagexml
<NSResponse>
  <Timestamp>2019-12-02T14:15:11.539</Timestamp>
  <Success>true</Success>
</NSResponse>

ListUOMSchedules

This request will retrieve a list of UOM schedules.

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 UOM schedule properties can be referenced.

Where Clause Columns

Column Name

????

Example Request

Code Block
<NSRequest>
  <RequestName>NorthPacificUOMScheduleMaster</RequestName>
  <RequestContent>
    <DataEntityCompanySK>1</DataEntityCompanySK>
  </RequestContent>
</NSRequest>

Example Response

Code Block
languagexml
<NSResponse>
  <Timestamp>2019-12-02T14:15:10.148</Timestamp>
  <Success>true</Success>
  <ScheduleList>
    <Schedule>
      <ScheduleSK>1</ScheduleSK>
      <FromUOMID>Each</FromUOMID>
      <ToUOMID>Each</ToUOMID>
      <ConversionValue>1.00000</ConversionValue>
    </Schedule>
    <Schedule>
      <ScheduleSK>2</ScheduleSK>
      <FromUOMID>Each</FromUOMID>
      <ToUOMID>Bag</ToUOMID>
      <ConversionValue>1.00000</ConversionValue>
    </Schedule>
    <Schedule>
      <ScheduleSK>3</ScheduleSK>
      <FromUOMID>Bag</FromUOMID>
      <ToUOMID>kg</ToUOMID>
      <ConversionValue>18.14369</ConversionValue>
    </Schedule>
  </ScheduleList>
</NSResponse>

ListSites

This request will retrieve a list of sites.

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

Code Block
languagexml
<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

Code Block
languagexml
<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

This request will retrieve a list of sales orders and sales order details.

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 sales order (not detail) properties can be referenced.

Where Clause Columns

Column Name

????

Example Request

ListItems

This request will retrieve a list of items.

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 Item properties can be referenced.

Where Clause Columns

Column Name

????

Example Request

ListCustomerAddresses

This request will retrieve a list of customer addresses.

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 customer address properties can be referenced.

Where Clause Columns

Column Name

????

Example Request

Code Block
languagexml
<NSRequest>
  <RequestName>NorthPacificCustomer</RequestName>
  <RequestContent>
    <DataEntityCompanySK>1</DataEntityCompanySK>
  </RequestContent>
</NSRequest>

Note: JSON is not supported for this web request.

Example Response

Code Block
languagexml
<NSResponse>
    <Timestamp>2019-12-02T14:15:07.058</Timestamp>
    <Success>true</Success>
    <CustomerShipToList>
        <CustomerShipTo>
            <CustomerSK>8001</CustomerSK>
            <CustomerID>CustomerID1</CustomerID>
            <CustomerName>Acme Company</CustomerName>
            <AddressID>ACMEADDR1</AddressID>
            <AddressName>Acme Building A</AddressName>
            <AddressLine1>1234 SE StreetName BLD A</AddressLine1>
            <AddressLine2 />
            <City>Seattle</City>
            <State>WA</State>
            <Zip>98125</Zip>
            <Country>USA</Country>
            <AddressTypeEN>3</AddressTypeEN>
            <CompanyID>CompanyID</CompanyID>
        </CustomerShipTo>
        <CustomerShipTo>
            <CustomerSK>8001</CustomerSK>
            <CustomerID>CustomerID1</CustomerID>
            <CustomerName>Acme Company</CustomerName>
            <AddressID>ACMEADDR2</AddressID>
            <AddressName>Acme Building B</AddressName>
            <AddressLine1>1234 SE StreetName BLD A</AddressLine1>
            <AddressLine2 />
            <City>Seattle</City>
            <State>WA</State>
            <Zip>98125</Zip>
            <Country>USA</Country>
            <AddressTypeEN>4</AddressTypeEN>
            <CompanyID>CompanyID</CompanyID>
        </CustomerShipTo>
    </CustomerShipToList>
</NSResponse>