Distributor Stock


Goal

Distributors can use this API to notify Expert about their stock.

Request Details

Name Required Type Length Description
SourceGlnCode long 13 The Global Location Number (GLN) of the sender of the message
FullCatalog boolean Indicates if all products with stock are being sent.

true
All products that have stock are being sent.
Difference detection will be applied: all products that were not sent will get a stock status Unavailable and can’t be ordered by our stores.

Products can be sent in a single file or in batches.
If products are sent in batches:
  • The Page and TotalPages fields are required
  • The number of products per page must be limited to 500

false (default)
A subset of products is being sent.
Difference detection will not be applied: only the subset of products that is being sent will be altered, other products will not.
Patch boolean Use this option only after consulting with Expert.

Indicates if all or only the supplied fields should be changed.

true
Indicates that the message is a patch; only the given fields will be changed. All other fields will keep their last value.

This will enable you to send reserved stock for Expert as a patch on the regular stock update for example.

If you want to use this feature make sure all DistributorStock messages you send use Patch = true.
If you don't fields that are not sent will be set to null because of the messages that do not send Patch = true.

false (default)
Indicates that all fields of the given products should be changed. Attributes that are not provided will be set to null.
Page int The 1-based number of the current page
Required if products are sent in batches and FullCatalog is true.
TotalPages int The total number of pages
Required if products are sent in batches and FullCatalog is true.
Products array If possible, send batches of at most 500 products.
Product
EanCode long 13 The European Article Number (EAN) of the product, this is also the barcode of the product.
StockIndication string Required if the Total Amount (see below) is not sent.

The StockIndication will be ignored if Total Amount or Reserved Amount are sent.

Valid values are:
Available
Delivery should not be a problem.
Limited
Limited stock available.
Expected
Currently unavailable or status unknown. Product will be restocked in the future. Provide expected availability date and/or amount if possible.
Discontinued
No longer restocked but a limited number of units are still available.
Unavailable
End of Life. Product will not be restocked in the future.
Total
Amount int 6 The exact amount of products in stock.
If sent, the StockIndication will be ignored.
Required if the StockIndication (see above) is not sent.
Expected
Date date The date a product is expected to be in stock again.

The format is based on ISO 8601:
YYYY-MM-DD
For example: 2019-08-14
Amount int 6 The amount of products that are expected to be in stock at the date above.
Reserved
Amount int 6 The exact amount of products in stock reserved for Expert. If sent, the StockIndication will be ignored.
Expected
Date date The date a product reserved for Expert is expected to be in stock again.

The format is based on ISO 8601:
YYYY-MM-DD
For example: 2019-08-14
Amount int 6 The amount of products ordered specifically for Expert, to arrive at the date above.

Supported Data Formats

See the Implementation Guide on the Get Started page for details about the different data formats we support.

XML SOAP JSON

Examples

Pick the data format that best fits your needs.
Include your authorization token in the "Authorization" HTTP header and POST the data to:
https://api.expert.nl/DistributorStock/2/0

HTTP Response Codes
Code Description
200 The message was sent successfully
400 Your data does not conform to the specification. See the status description for the exact issue.
401 You are not authorized to send this message. See the status description for the exact issue.
500 An error occured while processing the message. See the status description for the exact issue.
XML Data Format
Request

Minimal content example, containing only the required elements
<DistributorStock xmlns="https://api.expert.nl/distributorstock/2/0">
  <SourceGlnCode>2190000000006</SourceGlnCode>
  <Products>
    <Product>
      <EanCode>8700000000001</EanCode>
      <Total>
        <Amount>12</Amount>
      </Total>
    </Product>
  </Products>
</DistributorStock>
Note: either the total amount or a stock indication is required.

Extensive example
<DistributorStock xmlns="https://api.expert.nl/distributorstock/2/0">
  <SourceGlnCode>2190000000006</SourceGlnCode>
  <FullCatalog>true</FullCatalog>
  <Patch>true</Patch>
  <Page>1</Page>
  <TotalPages>10</TotalPages>
  <Products>
    <Product>
      <EanCode>8700000000001</EanCode>
      <StockIndication>Available</StockIndication>
      <Total>
        <Amount>12</Amount>
        <Expected>
          <Date>2019-12-31</Date>
          <Amount>900</Amount>
        </Expected>
      </Total>
      <Reserved>
        <Amount>396</Amount>
        <Expected>
          <Date>2019-10-14</Date>
          <Amount>20</Amount>
        </Expected>
      </Reserved>
    </Product>
  </Products>
</DistributorStock>
No response data. See HTTP Response Codes

Show XSD   Open in API Playground

SOAP Data Format
Request

Minimal content example, containing only the required elements
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
      <Authorization>Test:YourApiToken=</Authorization>
  </soap:Header>
  <soap:Body>
    <DistributorStock xmlns="https://api.expert.nl/distributorstock/2/0">
      <SourceGlnCode>2190000000006</SourceGlnCode>
      <Products>
        <Product>
          <EanCode>8700000000001</EanCode>
          <Total>
            <Amount>12</Amount>
          </Total>
        </Product>
      </Products>
    </DistributorStock>
  </soap:Body>
</soap:Envelope>
Note: either the total amount or a stock indication is required.

Extensive example
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
      <Authorization>Test:YourApiToken=</Authorization>
  </soap:Header>
  <soap:Body>
    <DistributorStock xmlns="https://api.expert.nl/distributorstock/2/0">
      <SourceGlnCode>2190000000006</SourceGlnCode>
      <FullCatalog>true</FullCatalog>
      <Patch>true</Patch>
      <Page>1</Page>
      <TotalPages>10</TotalPages>
      <Products>
        <Product>
          <EanCode>8700000000001</EanCode>
          <StockIndication>Available</StockIndication>
          <Total>
            <Amount>12</Amount>
            <Expected>
              <Date>2019-12-31</Date>
              <Amount>900</Amount>
            </Expected>
          </Total>
          <Reserved>
            <Amount>396</Amount>
            <Expected>
              <Date>2019-10-14</Date>
              <Amount>20</Amount>
            </Expected>
          </Reserved>
        </Product>
      </Products>
    </DistributorStock>
  </soap:Body>
</soap:Envelope>
Note: you can send your authorization token in the SOAP Header as shown here or you can send it as an HTTP Header. Whatever is easier.

No response data. See HTTP Response Codes

Show WSDL   Open in API Playground

JSON Data Format
Request

Minimal content example, containing only the required elements
{
  "SourceGlnCode": "2190000000006",
  "Products": [{ 
    "EanCode": "8700000000001",
    "Total": { 
      "Amount": 12
    }
  }]
}
Note: either the total amount or a stock indication is required.

Extensive example
{
  "SourceGlnCode": "2190000000006",
  "FullCatalog": "true",
  "Patch": "true",
  "Page": 1,
  "TotalPages": 10,
  "Products": [{ 
    "EanCode": "8700000000001",
    "StockIndication": "Available",
    "Total": { 
      "Amount": 12,
      "Expected": { 
        "Date": "2019-12-31",
        "Amount": 900
      }
    },
    "Reserved": { 
      "Amount": 396,
      "Expected": { 
        "Date": "2019-10-14",
        "Amount": 20
      }
    }
  }]
}
No response data. See HTTP Response Codes

Show Swagger   Open in API Playground   About Swagger