Merchant API: stock movement reports
About this article
This article describes how to download stock movement reports via the Merchant API.
Table of contents
Introduction
If fulfillment is carried out partially or in whole by the channel, then stock movement reports can enhance your inventory operations by providing you with specific records of all stock activity within a given period. Using stock movement reports, you can make proactive decisions to optimize your stock levels to prevent overstocking and stockouts by analyzing where your product has gone and when, in scenarios where the channel is in control of fulfillment.
Via the Merchant API, you can download stock movement reports as JSON files from specific channels. Through ChannelEngine's stock movement reports, you gain insight into diverse stock movement scenarios, including:
An item moves from Zalando’s warehouse A to Zalando’s warehouse B for relocation purposes (selling on another marketplace).
An item sold through Zalando Fulfillment Solutions (ZFS) is returned to Zalando’s warehouse because of a customer return.
An inbound shipment of stock to be sold via fulfillment by About You (FbAY) arrives in About You’s warehouse.
Supported channels
ChannelEngine supports downloading stock movement reports from the following channels:
- About You
- Zalando
Available API endpoints
-
Check for available reports:
GET /v2/reports/available?reportType=STOCK_MOVEMENTS_REPORT
Use this endpoint to check if there are any available stock movement reports to download for your connected channels. The endpoint returns a list of Report IDs for stock movement reports that are ready to download. The Report ID is formatted as SM_{channelId}_{dateOfReport}. E.g.:SM_1_2020-01-01 indicates a report that is ready for download on a stock movement on 1 January 2020.
-
Download reports:
GET /v2/reports/{id}
Use this endpoint to download your stock movement reports one-by-one. Indicate a ReportID from the list of available stock movement reports in the call.
Report body
The stock movement report is returned in the body of the API response in JSON format. Below is an example of the JSON report.
{
"Date": "string" // Date of movements, always in the form yyyy-MM-dd, required
"ChannelId": 0, // Channel ID of the channel, required
"StockMovements": [
{
"MerchantProductNo": "string", // Sku of movement, required
"ProductId": 0, // CE product ID, optional
"Ean": "string" // Ean of movement, required
"ChannelProductNo": "string", // Channel Product No of movement, required
"DestinationLocation": {
"ChannelStockLocationNo": "string", // Channel stock location no, required
"CountryCode": "string", // Country 2 ISO code, required
"ChannelStockLocationName": "string", // Name, optional
"StockLocationId": "string", // CE stock location ID, optional
},
"SourceLocation": {
"ChannelStockLocationNo": "string", // Channel stock location no, required
"CountryCode": "string", // Country 2 ISO code, optional
"ChannelStockLocationName": "string", // Name, optional
"StockLocationId": "string", // CE stock location ID, optional
},
"ChannelType": "string", // Channel's type for movement, required
"Type": "string", // Enum of CE movement type, required
"ChannelReferenceNo": "string", // Channel's reference for movement, required
"Quantity": 0, // Quantity of movement, required
"Date": "string", // Actual date of the movement, format yyyy-MM-dd. Can differ from actual movements if transaction was booked later
}
]
}A combination of required and optional fields appears in the stock movement report.
- Required fields always appear in the JSON report.
- Optional fields are sometimes provided by ChannelEngine or the channel and may appear in the report.
Below is a breakdown of each field in the stock location report.
Header fields
Date - the date of movements, always in the format yyyy-mm-dd. (Required)
ChannelId - the Channel ID of the channel. (Required)
Fields per product
StockMovements - a list of stock movement objects, containing the following fields per product:
MerchantProductNo - the SKU of the movement. (Required)
ProductId - the ChannelEngine product ID. (Optional)
Ean - the EAN (European Article Number) of the movement. (Required)
ChannelProductNo - the Channel Product Number of the movement. (Required)
-
DestinationLocation - information about the destination location of the movement:
ChannelStockLocationNo - the Channel stock location number. (Required)
CountryCode - the 2-character ISO code of the country. (Required)
ChannelStockLocationName - the name of the destination location. (Optional)
StockLocationId - the ChannelEngine stock location ID. (Optional)
-
SourceLocation - information about the source location of the movement:
ChannelStockLocationNo - the Channel stock location number. (Required)
CountryCode - the 2-character ISO code of the country. (Optional)
ChannelStockLocationName - the name of the source location. (Optional)
StockLocationId - the CE stock location ID. (Optional)
ChannelType - the type of channel for the movement. (Required)
Type - the type of movement, represented as an enum of CE movement types. (Required)
ChannelReferenceNo - the Channel's reference number for the movement. (Required)
Quantity - the quantity of the movement. (Required)
Movement types
Seven possible ChannelEngine movement types can be indicated in the Type field.
Possible values for Type (the type of movement)
| Type | Description |
| RELOCATION_ORDER | Relocation to fulfill an order from a different country |
| INBOUND_RETURN | Incoming returns from a customer |
| RELOCATION_OTHER | A different reason for relocation |
| STOCK_CORRECTION | Correction of stock |
| INBOUND_STOCK | Incoming stock from the seller |
| OUTBOUND_SHIPMENT | Stock sent to the customer as part of an order |
| OUTBOUND_RETURN | Stock sent back to seller |
FAQs
How often should I check for available stock movement reports?
It is recommended to check for available stock movement reports once per day, at the same time every day. Stock movement reports become unavailable for download via the Merchant API 14 days after they first become available. ChannelEngine checks for new stock movement reports on connected channels once per day, in the morning CET time.
Comments
0 comments
Please sign in to leave a comment.