[Stage Only] Stock Inward API¶
This API may be used to create a new inward entry.
Authentication:
As explained in the Authentication section, this API requires the Authentication token as a
header.
Coordinates
Staging: seller-network-testing.pincode.com
Production: shopping-network.phonepe.com
Resource: POST /tsp/catalog/v1/listing
curl --request POST \
--url 'https://seller-network-testing.pincode.com/tsp/catalog/v1/listing' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: O-Bearer <token>' \
--data ' {
"requestContext": {
"requestId": "REQ408237401230948923"
},
"messages": [
{
"operationType": "INVENTORY_UPDATE",
"messageId": "messageId28369127019",
"serviceProviderId": "pinpostest",
"serviceProviderItemId": "SKU-20251008-003",
"serviceProviderTransactionId": "12345678",
"data": {
"type": "INVENTORY_INWARD_CREATE",
"serviceProviderInwardBatchId": "INB491239843",
"mrp": 100.0,
"sellingPrice": 75.0,
"quantity": 12,
"barcode": "FKJADSHKJADS",
"vendorDetails": {
"vendorName": "VendorName",
"gstin": "GSTIN412730548123095"
},
"invoiceNumber": "INV873513895",
"batchNumber": "B441972376413928",
"hsn": "test-hsn",
"purchasePriceWithTax": 100.0,
"purchasePriceWithoutTax": 80.0,
"purchasePriceCGSTRate": 0.18,
"purchasePriceSGSTRate": 0.09,
"purchasePriceIGSTRate": 0.09,
"purchasePriceCessRate": 0.05
}
}
]
}'
import requests
url = 'https://seller-network-testing.pincode.com/tsp/catalog/v1/listing'
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': f'O-Bearer {token}'
}
data = {
"requestContext": {
"requestId": "REQ408237401230948923"
},
"messages": [
{
"operationType": "INVENTORY_UPDATE",
"messageId": "messageId28369127019",
"serviceProviderId": "pinpostest",
"serviceProviderItemId": "SKU-20251008-003",
"serviceProviderTransactionId": "12345678",
"data": {
"type": "INVENTORY_INWARD_CREATE",
"serviceProviderInwardBatchId": "INB491239843",
"mrp": 100.0,
"sellingPrice": 75.0,
"quantity": 12,
"barcode": "FKJADSHKJADS",
"vendorDetails": {
"vendorName": "VendorName",
"gstin": "GSTIN412730548123095"
},
"invoiceNumber": "INV873513895",
"batchNumber": "B441972376413928",
"hsn": "test-hsn",
"purchasePriceWithTax": 100.0,
"purchasePriceWithoutTax": 80.0,
"purchasePriceCGSTRate": 0.18,
"purchasePriceSGSTRate": 0.09,
"purchasePriceIGSTRate": 0.09,
"purchasePriceCessRate": 0.05
}
}
]
}
response = requests.post(url, headers=headers, json=data)
Response:
{
"requestContext": {
"requestId" : "R122334343412",
"transactionId": "R122334343412"
},
"response" : {
"submissionId": "28327398273927392"
}
}
Field Explanation:
| Parameter | Type | Description |
|---|---|---|
| requestContext | Object | This object represents the context of the order in which the update is being given |
| requestContext.requestId | String | The unique ID for every request made will be the same in callbacks and identify every new request |
| requestContext.transactionId | String | For catalog related APIs, the transactionId will be same as requestId |
| messages[0].messageId | String | Identifier for the message that is unique within this request. Response messages are correlated to this message id |
| messages[0].serviceProviderId | String | Represents the store identification ID that the receiver platform understands |
| messages[0].operationType | Enum | Represent type of operation. This value would be INVENTORY_UPDATE for stock inward |
| messages[0].serviceProviderItemId | String | Represent the item identification ID for a store that the receiver platform understands |
| messages[0].serviceProviderTransactionId | String | A unique id for corelating the update request on the client side. |
| messages[0].reasonType | String | Represents the source of the update. Sample values: AUDIT, OFFLINE_POS_SALES etc |
| messages[0].subReason | String | User notes |
| messages[0].data.type | Enum | Message data type. This value would be INVENTORY_INWARD_CREATE for stock inward. |
| messages[0].data.mrp | Int | MRP (Maximum Retail Price) of the item |
| messages[0].data.sellingPrice | Int | Selling Price of the item |
| messages[0].data.currency | Enum | INR: Indian Rupees |
| messages[0].data.quantity | Double | Represents inventory being inwarded. |
| messages[0].data.vendorDetails.vendorName | String | Vendor name |
| messages[0].data.vendorDetails.gstin | String | Vendor GST |
| messages[0].data.invoiceNumber | String | Invoice number corresponding to the inward |
| messages[0].data.batchNumber | String | batchNumber of the item being inward |
| messages[0].data.purchasePriceWithTax | Double | Purchase price (Supply price) inclusive of taxes |
| messages[0].data.purchasePriceWithoutTax | Double | Purchase price (Supply price) exclusive of taxes |
| messages[0].data.purchasePriceCGSTRate | Double | CGST rate on the purchase price |
| messages[0].data.purchasePriceSGSTRate | Double | SGST rate on the purchase price |
| messages[0].data.purchasePriceIGSTRate | Double | IGST rate on the purchase price |
| messages[0].data.purchasePriceCessRate | Double | Cess rate on the purchase price |